openssl req -new-sha256-key"${BASEDIR}/certs/${domain}/${privkey}"-out"${BASEDIR}/certs/${domain}/cert-${timestamp}.csr"-subj"/CN=${domain}/"-reqexts SAN -config"${tmp_openssl_cnf}"
rm-f"${tmp_openssl_cnf}"
# Request and respond to challenges
# Request and respond to challenges
for altname in${altnames};do
for altname in${altnames};do
...
@@ -385,14 +393,64 @@ sign_domain() {
...
@@ -385,14 +393,64 @@ sign_domain() {
# Finally request certificate from the acme-server and store it in cert-${timestamp}.pem and link from cert.pem
# Finally request certificate from the acme-server and store it in cert-${timestamp}.pem and link from cert.pem
echo" + Requesting certificate..."
echo" + Requesting certificate..."
csr64="$(openssl req -in"${BASEDIR}/certs/${domain}/cert-${timestamp}.csr"-outform DER | urlbase64)"
csr64="$(<<<"${csr}" openssl req-outform DER | urlbase64)"
openssl req -new-sha256-key"${BASEDIR}/certs/${domain}/${privkey}"-out"${BASEDIR}/certs/${domain}/cert-${timestamp}.csr"-subj"/CN=${domain}/"-reqexts SAN -config"${tmp_openssl_cnf}"