[Asterisk-cvs] asterisk/contrib/scripts astgenkey,1.1,1.2

markster at lists.digium.com markster at lists.digium.com
Wed Sep 15 00:18:27 CDT 2004


Update of /usr/cvsroot/asterisk/contrib/scripts
In directory mongoose.digium.com:/tmp/cvs-serv23627/contrib/scripts

Modified Files:
	astgenkey 
Log Message:
Update astgenkey to make empty ones too


Index: astgenkey
===================================================================
RCS file: /usr/cvsroot/asterisk/contrib/scripts/astgenkey,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- astgenkey	25 Dec 2001 23:27:38 -0000	1.1
+++ astgenkey	15 Sep 2004 04:19:58 -0000	1.2
@@ -1,10 +1,24 @@
 #!/bin/sh
 #
-# Usage: astgenkey [ -q ] [keyname]
+# Usage: astgenkey [ -q ] [ -n ] [keyname]
 #
+DES3=-des3
 if [ "$1" = "-q" ]; then
 	QUIET='y'
-	KEY=$2
+	if [ "$2" = "-n" ]; then
+		DES3=
+		KEY=$3
+	else
+		KEY=$2
+	fi
+elif [ "$1" = "-n" ]; then
+	DES3=
+	if [ "$2" = "-q" ]; then
+		QUIET='y'
+		KEY=$3
+	else
+		KEY=$2
+	fi
 else
 	KEY=$1
 fi
@@ -33,7 +47,7 @@
 rm -f ${KEY}.key ${KEY}.pub
 
 echo "Generating SSL key '$KEY': "
-openssl genrsa -out ${KEY}.key -des3 1024
+openssl genrsa -out ${KEY}.key ${DES3} 1024
 openssl rsa -in ${KEY}.key -pubout -out ${KEY}.pub
 
 if [ -f "${KEY}.key" ] && [ -f "${KEY}.pub" ]; then




More information about the svn-commits mailing list