29 |
[ ! -f ${KEYFILE} ] && die "${KEYFILE} doesn't exist!" |
[ ! -f ${KEYFILE} ] && die "${KEYFILE} doesn't exist!" |
30 |
|
|
31 |
# create a new signing request |
# create a new signing request |
32 |
openssl req -new -x509 -nodes -config ${SSLCONFIG} -key ${KEYFILE} -out ${REQFILE} || die "Certificate request failed!" |
openssl req -new -x509 -sha1 -nodes -config ${SSLCONFIG} -key ${KEYFILE} -out ${REQFILE} || die "Certificate request failed!" |
33 |
# generate the new certificate |
# generate the new certificate |
34 |
openssl x509 -subject -fingerprint -in ${REQFILE} -signkey ${KEYFILE} -out ${CERTFILE} -days 365 || die "Fingerprint failed!" |
openssl x509 -sha1 -subject -fingerprint -in ${REQFILE} -signkey ${KEYFILE} -out ${CERTFILE} -days 365 || die "Fingerprint failed!" |
35 |
# verify the certificate |
# verify the certificate |
36 |
openssl verify ${CERTFILE} |
openssl verify ${CERTFILE} |