1234567891011121314151617181920212223242526272829303132333435 |
- $OpenBSD: patch-doc_mkcert_sh,v 1.8 2016/12/04 21:36:02 sthen Exp $
- --- doc/mkcert.sh.orig Tue Nov 29 17:35:50 2016
- +++ doc/mkcert.sh Tue Nov 29 20:53:21 2016
- @@ -6,19 +6,13 @@
- umask 077
- OPENSSL=${OPENSSL-openssl}
- SSLDIR=${SSLDIR-/etc/ssl}
- -OPENSSLCONFIG=${OPENSSLCONFIG-dovecot-openssl.cnf}
- +OPENSSLCONFIG=${OPENSSLCONFIG-${SSLDIR}/dovecot-openssl.cnf}
-
- -CERTDIR=$SSLDIR/certs
- KEYDIR=$SSLDIR/private
-
- -CERTFILE=$CERTDIR/dovecot.pem
- +CERTFILE=$SSLDIR/dovecotcert.pem
- KEYFILE=$KEYDIR/dovecot.pem
-
- -if [ ! -d $CERTDIR ]; then
- - echo "$SSLDIR/certs directory doesn't exist"
- - exit 1
- -fi
- -
- if [ ! -d $KEYDIR ]; then
- echo "$SSLDIR/private directory doesn't exist"
- exit 1
- @@ -34,7 +28,7 @@ if [ -f $KEYFILE ]; then
- exit 1
- fi
-
- -$OPENSSL req -new -x509 -nodes -config $OPENSSLCONFIG -out $CERTFILE -keyout $KEYFILE -days 365 || exit 2
- +$OPENSSL req -new -x509 -nodes -config $OPENSSLCONFIG -out $CERTFILE -keyout $KEYFILE -days 730 || exit 2
- chmod 0600 $KEYFILE
- echo
- $OPENSSL x509 -subject -fingerprint -noout -in $CERTFILE || exit 2
|