dmcerts: cosmetic
This commit is contained in:
parent
11e6021e77
commit
d75783b0eb
4
dmcerts
4
dmcerts
|
@ -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" &&
|
||||
|
|
Loading…
Reference in New Issue