diff --git a/dmcerts b/dmcerts index 57fc687..d4539b4 100755 --- a/dmcerts +++ b/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" &&