Subversion Repositories ALCASAR

Rev

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

Rev 2293 Rev 2454
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
# $Id: alcasar-CA.sh 2293 2017-06-20 15:31:12Z tom.houdayer $
2
# $Id: alcasar-CA.sh 2454 2017-12-09 18:59:31Z tom.houdayer $
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
#
8
# Some ideas from "nessus-mkcert" script written by Renaud Deraison <deraison@cvs.nessus.org> 
8
# Some ideas from "nessus-mkcert" script written by Renaud Deraison <deraison@cvs.nessus.org>
9
# and Michel Arboi <arboi@alussinan.org>
9
# and Michel Arboi <arboi@alussinan.org>
10
#
10
#
11
DIR_TMP=${TMPDIR-/tmp}/alcasar-mkcert.$$
11
DIR_TMP=${TMPDIR-/tmp}/alcasar-mkcert.$$
12
DIR_PKI=/etc/pki
12
DIR_PKI=/etc/pki
13
DIR_CERT=$DIR_PKI/tls
13
DIR_CERT=$DIR_PKI/tls
Line 168... Line 168...
168
#   thus, hostname must be 36 chars or less. If it's too big,
168
#   thus, hostname must be 36 chars or less. If it's too big,
169
#   try removing domain (merci REXY ;-) ).
169
#   try removing domain (merci REXY ;-) ).
170
hostname_len=`echo $hostname| wc -c`
170
hostname_len=`echo $hostname| wc -c`
171
if [ $hostname_len -gt 36 ];
171
if [ $hostname_len -gt 36 ];
172
then
172
then
173
  hostname=`echo $hostname | cut -d '.' -f 1`
173
	hostname=`echo $hostname | cut -d '.' -f 1`
174
fi
174
fi
175
 
175
 
176
CAMAIL=ca@$hostname
176
CAMAIL=ca@$hostname
177
SRVMAIL=apache@$hostname
177
SRVMAIL=apache@$hostname
178
 
178