mirror of
https://github.com/linuxserver/docker-swag.git
synced 2024-10-01 01:35:49 -04:00
Merge pull request #162 from linuxserver/rootcert
detect old root cert and revoke/regen
This commit is contained in:
commit
d027970b50
@ -331,6 +331,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
|
||||
|
||||
## Versions
|
||||
|
||||
* **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
|
||||
* **19.09.21:** - Add an optional header to opt out of Google FLoC in `ssl.conf`.
|
||||
* **17.09.21:** - Mark `SUBDOMAINS` var as optional.
|
||||
* **01.08.21:** - Add support for ionos dns validation.
|
||||
|
@ -155,6 +155,7 @@ app_setup_nginx_reverse_proxy_block: ""
|
||||
|
||||
# changelog
|
||||
changelogs:
|
||||
- { 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" }
|
||||
- { date: "19.09.21:", desc: "Add an optional header to opt out of Google FLoC in `ssl.conf`." }
|
||||
- { date: "17.09.21:", desc: "Mark `SUBDOMAINS` var as optional." }
|
||||
- { date: "01.08.21:", desc: "Add support for ionos dns validation." }
|
||||
|
@ -312,6 +312,14 @@ else
|
||||
FILENAME="$DNSPLUGIN.ini"
|
||||
fi
|
||||
|
||||
# Check if the cert is using the old LE root cert, revoke and regen if necessary
|
||||
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
|
||||
echo "The cert seems to be using the old LE root cert, which is no longer valid. Deleting and revoking."
|
||||
certbot revoke --non-interactive --cert-path /config/etc/letsencrypt/live/"$ORIGDOMAIN"/fullchain.pem --server $REV_ACMESERVER
|
||||
rm -rf /config/etc/letsencrypt
|
||||
mkdir -p /config/etc/letsencrypt
|
||||
fi
|
||||
|
||||
# generating certs if necessary
|
||||
if [ ! -f "/config/keys/letsencrypt/fullchain.pem" ]; then
|
||||
if [ "$CERTPROVIDER" = "zerossl" ] && [ -n "$EMAIL" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user