whatever
parent
cada90b882
commit
6df814790b
|
|
@ -25,7 +25,7 @@ if ((doserver)); then
|
|||
echo 1
|
||||
openssl genrsa -out $cakey 4096
|
||||
echo 2
|
||||
openssl req -nodes -new -x509 -days 365 -key $cakey -out $cacrt \
|
||||
openssl req -nodes -new -x509 -days 3650 -key $cakey -out $cacrt \
|
||||
-subj "/C=US/ST=UT/O=breel/CN=${host}" \
|
||||
-reqexts SAN -extensions SAN -config <(cat /etc/ssl/openssl.cnf \
|
||||
<(printf "\n[SAN]\nsubjectAltName=DNS:${host},DNS:*.${host}"))
|
||||
|
|
@ -45,8 +45,9 @@ if ((doclient)); then
|
|||
|
||||
# self-signed
|
||||
echo 5
|
||||
openssl x509 -req -days 365 -in $clientcsr -CA $cacrt -CAkey $cakey \
|
||||
openssl x509 -req -days 3650 -in $clientcsr -CA $cacrt -CAkey $cakey \
|
||||
-set_serial 01 -out $clientcrt
|
||||
rm $clientcsr
|
||||
fi
|
||||
|
||||
if ((doserver)); then
|
||||
|
|
|
|||
Loading…
Reference in New Issue