Lines Matching +full:- +full:- +full:prefix
3 # (c) CopyRight EdelWeb for EdelKey and OpenEvidence, 2000-2004, 2009
9 if [ -f /usr/local/ssl/bin/openssl ] ; then
13 USAGE="echo Usage is genserv.sh <prefix> <caprefix>"
20 # The -sha256 option was introduced in OpenSSL 1.0.1
21 DIGESTALGO=-sha256
27 PREFIX=$1
28 if [ ".$PREFIX" = . ] ; then
29 echo No configuration prefix
32 if [ ! -f $PREFIX-sv.prm ] ; then
33 echo No configuration file $PREFIX-sv.prm
40 echo No CA prefix
43 if [ ! -f $CAPREFIX-ca.cacert ] ; then
44 echo No CA certificate file $CAPREFIX-ca.caert
47 if [ ! -f $CAPREFIX-ca.key ] ; then
60 GETSERIAL="\$t = time ;\$d = \$t . substr(\$t+$$ ,-4,4)-1;print \$d"
61 SERIAL=`/usr/bin/env perl -e "$GETSERIAL"`
64 echo SERIAL=$SERIAL PREFIX=$PREFIX CAPREFIX=$CAPREFIX DURATION=$DURATION KEYSIZE=$KEYSIZE
67 echo "openssl dhparam -2 -out $PREFIX-sv.dhp $KEYSIZE"
68 $OPENSSL dhparam -2 -out $PREFIX-sv.dhp $KEYSIZE
72 …echo "openssl req -config $PREFIX-sv.prm -newkey rsa:$KEYSIZE -keyout $PREFIX-sv.key -out $PREFIX-…
73 …$OPENSSL req -config $PREFIX-sv.prm -newkey rsa:$KEYSIZE -keyout $PREFIX-sv.key -out $PREFIX-sv.cs…
76 echo "openssl rsa -in $PREFIX-sv.key -out $PREFIX-sv.key"
77 $OPENSSL rsa -in $PREFIX-sv.key -out $PREFIX-sv.key -passin pass:secret
80 echo "openssl rsa -in $PREFIX-sv.key -pubout -outform DER -out $PREFIX-sv.pub.der"
81 $OPENSSL rsa -in $PREFIX-sv.key -pubout -outform DER -out $PREFIX-sv.pub.der
83 echo "openssl rsa -in $PREFIX-sv.key -pubout -outform PEM -out $PREFIX-sv.pub.pem"
84 $OPENSSL rsa -in $PREFIX-sv.key -pubout -outform PEM -out $PREFIX-sv.pub.pem
86 …-set_serial $SERIAL -extfile $PREFIX-sv.prm -days $DURATION -CA $CAPREFIX-ca.cacert -CAkey $CAPRE…
88 …-set_serial $SERIAL -extfile $PREFIX-sv.prm -days $DURATION -CA $CAPREFIX-ca.cacert -CAkey $CAPRE…
92 …ENSSL pkcs12 -export -des3 -out $PREFIX-sv.p12 -caname $CAPREFIX -name $PREFIX -inkey $PREFIX-sv.k…
94 …ENSSL pkcs12 -export -des3 -out $PREFIX-sv.p12 -caname $CAPREFIX -name $PREFIX -inkey $PREFIX-sv.k…
97 echo "openssl x509 -noout -text -hash -in $PREFIX-sv.selfcert -nameopt multiline"
98 $OPENSSL x509 -noout -text -hash -in $PREFIX-sv.crt -nameopt multiline
101 touch $CAPREFIX-ca.db
102 echo 01 > $CAPREFIX-ca.cnt
103 echo "openssl ca -config $CAPREFIX-ca.cnf -revoke $PREFIX-sv.crt"
104 $OPENSSL ca -config $CAPREFIX-ca.cnf -revoke $PREFIX-sv.crt
107 echo "openssl ca -config $CAPREFIX-ca.cnf -gencrl -out $PREFIX-sv.crl"
108 $OPENSSL ca -config $CAPREFIX-ca.cnf -gencrl -out $PREFIX-sv.crl
110 echo "openssl x509 -in $PREFIX-sv.crt -outform der -out $PREFIX-sv.der "
111 $OPENSSL x509 -in $PREFIX-sv.crt -outform der -out $PREFIX-sv.der
114 touch $PREFIX-sv.dhp
115 cat $PREFIX-sv.prm $PREFIX-sv.key $PREFIX-sv.crt $PREFIX-sv.dhp >$PREFIX-sv.pem
116 chmod o-r $PREFIX-sv.prm
118 echo "$PREFIX-sv.pem done"