Created
October 2, 2021 07:48
-
-
Save JuniYadi/55600aa63390ad3f67edd0d313afd3b8 to your computer and use it in GitHub Desktop.
Fixed Expired SSL Let's Encrypt DST CA (Ubuntu/Debian)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ISRG_CHECK=$( openssl x509 -noout -text -in /usr/share/ca-certificates/mozilla/ISRG_Root_X1.crt | grep Issuer | grep "CN = ISRG Root X1" ) | |
if [[ ! $ISRG_CHECK ]]; then | |
mkdir -p /usr/share/ca-certificates/letsencrypt | |
curl -o /usr/share/ca-certificates/letsencrypt/ISRG_Root_X1.crt https://letsencrypt.org/certs/isrgrootx1.pem | |
sed -i 's/mozilla\/DST_Root_CA_X3.crt/!mozilla\/DST_Root_CA_X3.crt/g' /etc/ca-certificates.conf | |
echo "letsencrypt/ISRG_Root_X1.crt" | tee -a /etc/ca-certificates.conf | |
update-ca-certificates | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment