Subversion Repositories ALCASAR

Rev

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

Rev 519 Rev 632
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
# $Id: alcasar-CA.sh 519 2011-03-25 16:30:32Z stephane $
2
# $Id: alcasar-CA.sh 632 2011-06-12 17:48:40Z richard $
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 15... Line 15...
15
CACERT=$DIR_PKI/CA/alcasar-ca.crt
15
CACERT=$DIR_PKI/CA/alcasar-ca.crt
16
CAKEY=$DIR_PKI/CA/private/alcasar-ca.key
16
CAKEY=$DIR_PKI/CA/private/alcasar-ca.key
17
SRVCERT=$DIR_CERT/certs/alcasar.crt
17
SRVCERT=$DIR_CERT/certs/alcasar.crt
18
SRVKEY=$DIR_CERT/private/alcasar.key
18
SRVKEY=$DIR_CERT/private/alcasar.key
19
SRVREQ=$DIR_CERT/alcasar.req
19
SRVREQ=$DIR_CERT/alcasar.req
20
FIC_PARAM="/root/ALCASAR-parameters.txt"
-
 
21
 
20
 
22
CACERT_LIFETIME="1460"
21
CACERT_LIFETIME="1460"
23
SRVCERT_LIFETIME="1460"
22
SRVCERT_LIFETIME="1460"
24
COUNTRY="FR"
23
COUNTRY="FR"
25
PROVINCE="none"
24
PROVINCE="none"
Line 219... Line 218...
219
rm -f $SRVREQ
218
rm -f $SRVREQ
220
chmod a+r $CACERT $SRVCERT 
219
chmod a+r $CACERT $SRVCERT 
221
 
220
 
222
if [ -s "$CACERT" -a -s "$CAKEY" -a -s "$SRVCERT" -a -s "$SRVKEY" ];
221
if [ -s "$CACERT" -a -s "$CAKEY" -a -s "$SRVCERT" -a -s "$SRVKEY" ];
223
 then
222
 then
224
 echo "- Certificat de l'Authorité de Certification : " >> $FIC_PARAM
-
 
225
 echo "   Certificat = $CACERT" >> $FIC_PARAM
-
 
226
 echo "   Clée privée = $CAKEY" >> $FIC_PARAM
-
 
227
 echo "- Certificat du serveur : " >> $FIC_PARAM
-
 
228
 echo "    Certificat = $SRVCERT" >> $FIC_PARAM
-
 
229
 echo "    Clée privée = $SRVKEY" >> $FIC_PARAM
-
 
230
 [ -d $DIR_WEB/certs ] || mkdir -p $DIR_WEB/certs
223
 [ -d $DIR_WEB/certs ] || mkdir -p $DIR_WEB/certs
231
 rm -f $DIR_WEB/certs/*
224
 rm -f $DIR_WEB/certs/*
232
 ln -s $CACERT $DIR_WEB/certs/certificat_alcasar_ca.crt
225
 ln -s $CACERT $DIR_WEB/certs/certificat_alcasar_ca.crt
233
 ln -s $SRVCERT $DIR_WEB/certs/certificat_alcasar.crt
226
 ln -s $SRVCERT $DIR_WEB/certs/certificat_alcasar.crt
234
 rm -rf $DIR_TMP
227
 rm -rf $DIR_TMP