]> git.proxmox.com Git - mirror_acme.sh.git/commitdiff
Add ACME v2 test around cert copy. Fixes #1330
authorjim-p <jimp@pfsense.org>
Tue, 6 Mar 2018 22:00:57 +0000 (17:00 -0500)
committerjim-p <jimp@pfsense.org>
Tue, 6 Mar 2018 22:00:57 +0000 (17:00 -0500)
Without this, the work done a few lines above is clobbered, leaving
the fullchain.cer containing only the certificate, not the CA and
certificate chain.

acme.sh

diff --git a/acme.sh b/acme.sh
index 2ca7fa97d5311f4e884c18416ea8b76f7f17ff79..5ea331c9d5311f8fe199da49047af9236e854b14 100755 (executable)
--- a/acme.sh
+++ b/acme.sh
@@ -4078,7 +4078,9 @@ $_authorizations_map"
       _info "Your cert key is in $(__green " $CERT_KEY_PATH ")"
     fi
 
-    cp "$CERT_PATH" "$CERT_FULLCHAIN_PATH"
+    if [ "$ACME_VERSION" != "2" ]; then
+      cp "$CERT_PATH" "$CERT_FULLCHAIN_PATH"
+    fi
 
     if [ ! "$USER_PATH" ] || [ ! "$IN_CRON" ]; then
       USER_PATH="$PATH"