]> git.proxmox.com Git - mirror_acme.sh.git/commitdiff
improve chain.pem exists evaluating
authorPMExtra <pm@jubeat.net>
Fri, 23 Dec 2022 11:17:37 +0000 (19:17 +0800)
committerPMExtra <pm@jubeat.net>
Fri, 23 Dec 2022 11:17:37 +0000 (19:17 +0800)
deploy/vault.sh

index 2e4d070297e408a01b1f26696107f1284f5080b5..6c953fc6248c89347327977fb491dd8deb218e99 100644 (file)
@@ -115,7 +115,7 @@ vault_deploy() {
     fi
 
     # To make it compatible with the wrong ca path `chain.pem` which was used in former versions
-    if _get "$URL/chain.pem" >/dev/null; then
+    if _contains "$(_get "$URL/chain.pem")" "-----BEGIN CERTIFICATE-----"; then
       _err "The CA certificate has moved from chain.pem to ca.pem, if you don't depend on chain.pem anymore, you can delete it to avoid this warning"
       _info "Updating CA certificate to $URL/chain.pem for backward compatibility"
       if [ -n "$VAULT_KV_V2" ]; then