Skip to content

Commit 9953568

Browse files
authored
Merge pull request #166 from linuxserver/rootstaging
fix old root detection (staging and acme server)
2 parents 3ff891f + 915f209 commit 9953568

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
332332

333333
## Versions
334334

335+
* **12.10.21:** - Fix deprecated LE root cert check to fix failures when using `STAGING=true`, and failures in revoking.
335336
* **06.10.21:** - Added support for Hurricane Electric (HE) DNS validation. Added lxml build deps.
336337
* **01.10.21:** - Check if the cert uses the old LE root cert, revoke and regenerate if necessary. [Here's more info](https://twitter.com/letsencrypt/status/1443621997288767491) on LE root cert expiration
337338
* **19.09.21:** - Add an optional header to opt out of Google FLoC in `ssl.conf`.

readme-vars.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ app_setup_nginx_reverse_proxy_block: ""
155155

156156
# changelog
157157
changelogs:
158+
- { date: "12.10.21:", desc: "Fix deprecated LE root cert check to fix failures when using `STAGING=true`, and failures in revoking." }
158159
- { date: "06.10.21:", desc: "Added support for Hurricane Electric (HE) DNS validation. Added lxml build deps." }
159160
- { date: "01.10.21:", desc: "Check if the cert uses the old LE root cert, revoke and regenerate if necessary. [Here's more info](https://twitter.com/letsencrypt/status/1443621997288767491) on LE root cert expiration" }
160161
- { date: "19.09.21:", desc: "Add an optional header to opt out of Google FLoC in `ssl.conf`." }

root/etc/cont-init.d/50-config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,9 @@ else
313313
fi
314314

315315
# Check if the cert is using the old LE root cert, revoke and regen if necessary
316-
if [ -f "/config/keys/letsencrypt/chain.pem" ] && ([ "${CERTPROVIDER}" == "letsencrypt" ] || [ "${CERTPROVIDER}" == "" ]) && ! openssl x509 -in /config/keys/letsencrypt/chain.pem -noout -issuer | grep -q "ISRG Root X"; then
316+
if [ -f "/config/keys/letsencrypt/chain.pem" ] && ([ "${CERTPROVIDER}" == "letsencrypt" ] || [ "${CERTPROVIDER}" == "" ]) && [ "${STAGING}" != "true" ] && ! openssl x509 -in /config/keys/letsencrypt/chain.pem -noout -issuer | grep -q "ISRG Root X"; then
317317
echo "The cert seems to be using the old LE root cert, which is no longer valid. Deleting and revoking."
318+
REV_ACMESERVER="https://acme-v02.api.letsencrypt.org/directory"
318319
certbot revoke --non-interactive --cert-path /config/etc/letsencrypt/live/"$ORIGDOMAIN"/fullchain.pem --server $REV_ACMESERVER
319320
rm -rf /config/etc/letsencrypt
320321
mkdir -p /config/etc/letsencrypt

0 commit comments

Comments
 (0)