Skip to content

Commit 502d103

Browse files
authored
Merge pull request #503 from linuxserver/zerossl-revoke
fix zerossl cert revocation
2 parents 05bccb9 + 00afe35 commit 502d103

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
400400

401401
## Versions
402402

403+
* **30.08.24:** - Fix zerossl cert revocation.
403404
* **24.07.14:** - Rebase to Alpine 3.20. Remove deprecated Google Domains certbot plugin. Existing users should update their nginx confs to avoid http2 deprecation warnings.
404405
* **01.07.24:** - Fall back to iptables-legacy if iptables doesn't work.
405406
* **23.03.24:** - Fix perms on the generated `priv-fullchain-bundle.pem`.

readme-vars.yml

+1
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ app_setup_block: |
140140
141141
# changelog
142142
changelogs:
143+
- { date: "30.08.24:", desc: "Fix zerossl cert revocation." }
143144
- { date: "24.07.14:", desc: "Rebase to Alpine 3.20. Remove deprecated Google Domains certbot plugin. Existing users should update their nginx confs to avoid http2 deprecation warnings."}
144145
- { date: "01.07.24:", desc: "Fall back to iptables-legacy if iptables doesn't work." }
145146
- { date: "23.03.24:", desc: "Fix perms on the generated `priv-fullchain-bundle.pem`." }

root/etc/s6-overlay/s6-rc.d/init-certbot-config/run

+2-11
Original file line numberDiff line numberDiff line change
@@ -189,24 +189,15 @@ if [[ ! "${URL}" = "${ORIGURL}" ]] ||
189189
[[ ! "${STAGING}" = "${ORIGSTAGING}" ]] ||
190190
[[ ! "${CERTPROVIDER}" = "${ORIGCERTPROVIDER}" ]]; then
191191
echo "Different validation parameters entered than what was used before. Revoking and deleting existing certificate, and an updated one will be created"
192-
if [[ "${ORIGCERTPROVIDER}" = "zerossl" ]] && [[ -n "${ORIGEMAIL}" ]]; then
192+
if [[ "${ORIGCERTPROVIDER}" = "zerossl" ]]; then
193193
REV_ACMESERVER=("https://acme.zerossl.com/v2/DV90")
194-
REV_ZEROSSL_EAB_KID=$(awk -F "=" '/eab-kid/ {print $2}' "/config/etc/letsencrypt/renewal/${ORIGDOMAIN}.conf" | tr -d ' ')
195-
REV_ZEROSSL_EAB_HMAC_KEY=$(awk -F "=" '/eab-hmac-key/ {print $2}' "/config/etc/letsencrypt/renewal/${ORIGDOMAIN}.conf" | tr -d ' ')
196-
if [[ -z "${REV_ZEROSSL_EAB_KID}" ]] || [[ -z "${REV_ZEROSSL_EAB_HMAC_KEY}" ]]; then
197-
REV_ZEROSSL_EAB_KID=$(awk -F "=" '/eab-kid/ {print $2}' /config/etc/letsencrypt/cli.ini | tr -d ' ')
198-
REV_ZEROSSL_EAB_HMAC_KEY=$(awk -F "=" '/eab-hmac-key/ {print $2}' /config/etc/letsencrypt/cli.ini | tr -d ' ')
199-
fi
200-
if [[ -n "${REV_ZEROSSL_EAB_KID}" ]] && [[ -n "${REV_ZEROSSL_EAB_HMAC_KEY}" ]]; then
201-
REV_ACMESERVER+=("--eab-kid" "${REV_ZEROSSL_EAB_KID}" "--eab-hmac-key" "${REV_ZEROSSL_EAB_HMAC_KEY}")
202-
fi
203194
elif [[ "${ORIGSTAGING}" = "true" ]]; then
204195
REV_ACMESERVER=("https://acme-staging-v02.api.letsencrypt.org/directory")
205196
else
206197
REV_ACMESERVER=("https://acme-v02.api.letsencrypt.org/directory")
207198
fi
208199
if [[ -f /config/etc/letsencrypt/live/"${ORIGDOMAIN}"/fullchain.pem ]]; then
209-
certbot revoke --non-interactive --cert-path /config/etc/letsencrypt/live/"${ORIGDOMAIN}"/fullchain.pem --server "${REV_ACMESERVER[@]}" || true
200+
certbot revoke --non-interactive --cert-path /config/etc/letsencrypt/live/"${ORIGDOMAIN}"/fullchain.pem --key-path /config/etc/letsencrypt/live/"${ORIGDOMAIN}"/privkey.pem --server "${REV_ACMESERVER[@]}" || true
210201
else
211202
certbot revoke --non-interactive --cert-name "${ORIGDOMAIN}" --server "${REV_ACMESERVER[@]}" || true
212203
fi

0 commit comments

Comments
 (0)