[dovecot-cvs] dovecot/doc dovecot-openssl.cnf,NONE,1.1 mkcert.sh,NONE,1.1 Makefile.am,1.2,1.3
cras at procontrol.fi
cras at procontrol.fi
Mon Nov 25 00:07:56 EET 2002
Update of /home/cvs/dovecot/doc
In directory danu:/tmp/cvs-serv14966/doc
Modified Files:
Makefile.am
Added Files:
dovecot-openssl.cnf mkcert.sh
Log Message:
Added script to easily generate self-signed certificate.
--- NEW FILE: dovecot-openssl.cnf ---
[ req ]
default_bits = 1024
encrypt_key = yes
distinguished_name = req_dn
x509_extensions = cert_type
prompt = no
[ req_dn ]
# country (2 letter code)
#C=FI
# State or Province Name (full name)
#ST=
# Locality Name (eg. city)
#L=Helsinki
# Organization (eg. company)
#O=Dovecot
# Organizational Unit Name (eg. section)
OU=IMAP server
# Common Name (*.example.com is also possible)
CN=imap.example.com
# E-mail contact
emailAddress=postmaster at example.com
[ cert_type ]
nsCertType = server
--- NEW FILE: mkcert.sh ---
#!/bin/sh
# Generates a self-signed certificate.
OPENSSL=${OPENSSL-openssl}
SSLDIR=${SSLDIR-/etc/ssl}
OPENSSLCONFIG=${OPENSSLCONFIG-dovecot-openssl.cnf}
CERTFILE=$SSLDIR/certs/dovecot.cer
KEYFILE=$SSLDIR/private/dovecot.key
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 $SSLDIR/certs/dovecot.cer || exit 2
Index: Makefile.am
===================================================================
RCS file: /home/cvs/dovecot/doc/Makefile.am,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Makefile.am 24 Nov 2002 19:56:25 -0000 1.2
+++ Makefile.am 24 Nov 2002 22:07:54 -0000 1.3
@@ -10,4 +10,6 @@
nfs.txt
EXTRA_DIST = \
+ mkcert.sh \
+ dovecot-openssl.cnf \
$(doc_DATA)
More information about the dovecot-cvs
mailing list