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
|
if [ ! -f "$clientcrt" ]; then
|
||||||
#sed -i "s/^dir = .*/dir = ${cadir//\//\\\/}/" "$clientcnf"
|
#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 req -config "$clientcnf" -batch -new -nodes -subj "$subj" -keyout "$clientkey" -out "$clientcsr" &&
|
||||||
openssl ca -config "$clientcnf" -batch -keyfile "$cakey" -notext -out "$clientcrt" -infiles "$clientcsr" &&
|
openssl ca -config "$clientcnf" -batch -keyfile "$cakey" -notext -out "$clientcrt" -infiles "$clientcsr" &&
|
||||||
chmod 644 "$clientcrt" &&
|
chmod 644 "$clientcrt" &&
|
||||||
|
@ -86,7 +86,7 @@ for host in "$@"; do
|
||||||
servercsr="${machine}-server.csr"
|
servercsr="${machine}-server.csr"
|
||||||
servercrt="${machine}-server.crt"
|
servercrt="${machine}-server.crt"
|
||||||
if [ ! -f "$servercrt" ]; then
|
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"
|
sans="DNS:$host,DNS:localhost"
|
||||||
sed -i "s/^subjectAltName = .*/subjectAltName = $sans/" "$servercnf"
|
sed -i "s/^subjectAltName = .*/subjectAltName = $sans/" "$servercnf"
|
||||||
openssl req -config "$servercnf" -batch -new -nodes -subj "$subj" -keyout "$serverkey" -out "$servercsr" &&
|
openssl req -config "$servercnf" -batch -new -nodes -subj "$subj" -keyout "$serverkey" -out "$servercsr" &&
|
||||||
|
|
Loading…
Reference in New Issue