From 06be436a901bd1f45eb3d21e59101b9784d66839 Mon Sep 17 00:00:00 2001 From: cantor Date: Sat, 15 Mar 2008 04:26:11 +0000 Subject: [PATCH] Solaris changes. git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@2780 cb58f699-b61c-0410-a6fe-9272a202ed29 --- configs/keygen.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/configs/keygen.sh b/configs/keygen.sh index ea9b403..76e91f5 100755 --- a/configs/keygen.sh +++ b/configs/keygen.sh @@ -17,8 +17,8 @@ if [ -n "$FORCE" ] ; then rm sp-key.pem sp-cert.pem fi -if [ -e sp-key.pem ] || [ -e sp-cert.pem ] ; then - if [ -z $BATCH ] ; then +if [ -e sp-key.pem -o -e sp-cert.pem ] ; then + if [ -z "$BATCH" ] ; then echo The files sp-key.pem and/or sp-cert.pem already exist! echo Use -f option to force recreation of keypair. exit 2 @@ -26,17 +26,17 @@ if [ -e sp-key.pem ] || [ -e sp-cert.pem ] ; then exit 0 fi -if [ -z $FQDN ] ; then +if [ -z "$FQDN" ] ; then FQDN=`hostname` fi -if [ -z $YEARS ] ; then +if [ -z "$YEARS" ] ; then YEARS=10 fi -DAYS=$(($YEARS*365)) +DAYS=`expr $YEARS \* 365` -if [ -z $ENTITYID ] ; then +if [ -z "$ENTITYID" ] ; then ALTNAME=DNS:$FQDN else ALTNAME=DNS:$FQDN,URI:$ENTITYID @@ -60,7 +60,7 @@ subjectAltName=$ALTNAME subjectKeyIdentifier=hash EOF -if [ -z $BATCH ] ; then +if [ -z "$BATCH" ] ; then openssl req -config sp-cert.cnf -new -x509 -days $DAYS -keyout sp-key.pem -out sp-cert.pem else openssl req -config sp-cert.cnf -new -x509 -days $DAYS -keyout sp-key.pem -out sp-cert.pem 2> /dev/null -- 2.1.4