Mercurial > dovecot > original-hg > dovecot-1.2
view doc/mkcert.sh @ 756:17598099d9ac HEAD
Subject printing used wrong certificate file.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 04 Dec 2002 01:21:30 +0200 |
parents | 748cbf0af0ed |
children | 4c5f325df4ac |
line wrap: on
line source
#!/bin/sh # Generates a self-signed certificate. OPENSSL=${OPENSSL-openssl} SSLDIR=${SSLDIR-/etc/ssl} OPENSSLCONFIG=${OPENSSLCONFIG-dovecot-openssl.cnf} CERTFILE=$SSLDIR/certs/imapd.pem KEYFILE=$SSLDIR/private/imapd.pem if [ ! -d $SSLDIR/certs ]; then echo $SSLDIR/certs directory doesn't exist fi if [ ! -d $SSLDIR/private ]; then echo $SSLDIR/private directory doesn't exist fi if [ -f $CERTFILE ]; then echo "$CERTFILE already exists, won't overwrite" exit 1 fi if [ -f $KEYFILE ]; then echo "$KEYFILE already exists, won't overwrite" exit 1 fi $OPENSSL req -new -x509 -nodes -config $OPENSSLCONFIG -out $CERTFILE -keyout $KEYFILE || exit 2 chmod 0600 $KEYFILE echo $OPENSSL x509 -subject -fingerprint -noout -in $CERTFILE || exit 2