Skip to content

Instantly share code, notes, and snippets.

@saidone75
Created October 14, 2021 06:17
Show Gist options
  • Save saidone75/aac8e33d1381809e138c6d4e3299484b to your computer and use it in GitHub Desktop.
Save saidone75/aac8e33d1381809e138c6d4e3299484b to your computer and use it in GitHub Desktop.
Debian DST Root CA X3 expiration fix
#!/bin/bash
if [[ `id -u` -ne 0 ]]; then
echo "Error: you must be root to execute this script!"
exit 1
fi
TMPDIR="$(mktemp -d -p /tmp -t "tmp.XXXXXXXXXX")"
cd $TMPDIR
wget https://letsencrypt.org/certs/isrgrootx1.pem --no-check-certificate
wget https://letsencrypt.org/certs/isrg-root-x2.pem --no-check-certificate
wget https://letsencrypt.org/certs/lets-encrypt-r3.pem --no-check-certificate
mkdir /usr/share/ca-certificates/extra
cp isrgrootx1.pem isrg-root-x2.pem lets-encrypt-r3.pem /usr/share/ca-certificates/extra
echo "extra/isrgrootx1.pem" >> /etc/ca-certificates.conf
echo "extra/isrg-root-x2.pem" >> /etc/ca-certificates.conf
echo "extra/lets-encrypt-r3.pem" >> /etc/ca-certificates.conf
update-ca-certificates
cd $OLDPW
rm -rfv $TMPDIR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment