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