darcs-hash:20041202095314-41617-c903f39d5ed5cd30bf09d3462f8f0555fc392f86.gz
This commit is contained in:
pauget 2004-12-02 10:53:14 +01:00
parent 6f9244d42b
commit 97063beada
2 changed files with 0 additions and 55 deletions

View file

@ -1,32 +0,0 @@
#!/bin/sh -e
if [ "$1" != "--force" -a -f /etc/apache-ssl/apache.pem ]; then
echo "/etc/apache-ssl/apache.pem exists! Use \"$0 --force.\""
exit 0
fi
if [ "$1" == "--force" ]; then
shift
fi
echo
echo creating selfsingned certificate
echo "replace it with one signed by a certification authority (CA)"
echo
echo enter your ServerName at the Common Name prompt
echo
echo If you want your certificate to expire after x days call this programm
echo with "-days x"
# use special .cnf, because with normal one no valid selfsigned
# certificate is created
export RANDFILE=/dev/random
openssl req $@ -config /etc/ssl/CRANS-ssl.cnf \
-new -x509 -nodes -out /etc/apache-ssl/apache.pem \
-keyout /etc/apache-ssl/apache.pem \
-days 1095
chmod 600 /etc/apache-ssl/apache.pem
ln -sf /etc/apache-ssl/apache.pem \
/etc/apache-ssl/`/usr/bin/openssl \
x509 -noout -hash < /etc/apache-ssl/apache.pem`.0

View file

@ -1,23 +0,0 @@
#!/bin/sh -e
# Yack 27/12/2000
#Création des certificats ssl pour les machines virtuelles ptt, news, et www
#Durée du certificat en jour :
DUREE=1095
export RANDFILE=/dev/random
for certificat in news ptt www; do
if [ -f /etc/ssl/certs/stunnel-$certificat.pem ];
then
echo "le certificat pour la machine $certificat existe deja."
else
openssl req $@ -config /etc/ssl/$certificat-crans-org.cnf \
-new -x509 -nodes -out /etc/ssl/certs/stunnel-$certificat.pem \
-keyout /etc/ssl/certs/stunnel-$certificat.pem \
-days $DUREE
chmod 600 /etc/ssl/certs/stunnel-$certificat.pem
ln -sf /etc/ssl/certs/stunnel-$certificat.pem \
/etc/ssl/certs/`/usr/bin/openssl \
x509 -noout -hash < /etc/ssl/certs/stunnel-$certificat.pem`.0;
fi
done