Subversion Repositories ALCASAR

Rev

Rev 2737 | Rev 2775 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2737 Rev 2758
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
# $Id: alcasar-CA.sh 2737 2019-06-04 22:11:57Z rexy $
2
# $Id: alcasar-CA.sh 2758 2019-11-03 23:17:20Z rexy $
3
 
3
 
4
# alcasar-CA.sh
4
# alcasar-CA.sh
5
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
5
# by Franck BOUIJOUX, Pascal LEVANT and Richard REY
6
# This script is distributed under the Gnu General Public License (GPL)
6
# This script is distributed under the Gnu General Public License (GPL)
7
#
7
#
Line 26... Line 26...
26
PROVINCE="none"
26
PROVINCE="none"
27
LOCATION="Paris"
27
LOCATION="Paris"
28
ORGANIZATION="ALCASAR-Team"
28
ORGANIZATION="ALCASAR-Team"
29
 
29
 
30
mkdir $DIR_TMP || exit 1
30
mkdir $DIR_TMP || exit 1
-
 
31
[ -d $DIR_PKI/CA/private ] || mkdir -p $DIR_PKI/CA/private ; chown -R root:apache $DIR_PKI/CA ; chmod -R 750 $DIR_PKI/CA
31
# dynamic conf file for openssl
32
# dynamic conf file for openssl
32
cat <<EOF >$DIR_TMP/ssl.conf
33
cat <<EOF >$DIR_TMP/ssl.conf
33
RANDFILE		= $HOME/.rnd
34
RANDFILE		= $HOME/.rnd
34
#
35
#
35
[ ca ]
36
[ ca ]
Line 232... Line 233...
232
	ln -s $CACERT $DIR_WEB/certs/certificat_alcasar_ca.crt
233
	ln -s $CACERT $DIR_WEB/certs/certificat_alcasar_ca.crt
233
	ln -s $SRVCERT $DIR_WEB/certs/certificat_alcasar.crt
234
	ln -s $SRVCERT $DIR_WEB/certs/certificat_alcasar.crt
234
	rm -rf $DIR_TMP
235
	rm -rf $DIR_TMP
235
	exit 0
236
	exit 0
236
else
237
else
237
	echo "Problème lors de la création des certificats (cf. $DIR_TMP/openssl-log)" >> $FIC_PARAM
238
	echo "An error occured when generating security certificates (see : $DIR_TMP/openssl-log)" 
238
	exit 1
239
	exit 1
239
fi
240
fi