dmcerts: cosmetic

This commit is contained in:
Jephté Clain 2021-10-24 11:21:07 +04:00
parent 11e6021e77
commit d75783b0eb
1 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ clientcnf="$cadir/openssl/client.cnf"
if [ ! -f "$clientcrt" ]; then
#sed -i "s/^dir = .*/dir = ${cadir//\//\\\/}/" "$clientcnf"
subj="/countryName=FR/stateOrProvinceName=La Reunion/localityName=Sainte Clotilde/organizationName=jclain.$machine/CN=jclain/"
subj="/countryName=FR/stateOrProvinceName=La Reunion/localityName=Sainte Clotilde/organizationName=jclain/CN=dmclient/"
openssl req -config "$clientcnf" -batch -new -nodes -subj "$subj" -keyout "$clientkey" -out "$clientcsr" &&
openssl ca -config "$clientcnf" -batch -keyfile "$cakey" -notext -out "$clientcrt" -infiles "$clientcsr" &&
chmod 644 "$clientcrt" &&
@ -86,7 +86,7 @@ for host in "$@"; do
servercsr="${machine}-server.csr"
servercrt="${machine}-server.crt"
if [ ! -f "$servercrt" ]; then
subj="/countryName=FR/stateOrProvinceName=La Reunion/localityName=Sainte Clotilde/organizationName=jclain.$machine/CN=$host/"
subj="/countryName=FR/stateOrProvinceName=La Reunion/localityName=Sainte Clotilde/organizationName=jclain/CN=dmserver-$host/"
sans="DNS:$host,DNS:localhost"
sed -i "s/^subjectAltName = .*/subjectAltName = $sans/" "$servercnf"
openssl req -config "$servercnf" -batch -new -nodes -subj "$subj" -keyout "$serverkey" -out "$servercsr" &&