
В моем офисе одна из систем все еще работает под управлением Ubuntu 14.04. Эта система пострадала от проблемы с истекшим корневым сертификатом Let's Encrypt:
https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/
Я вручную загрузил последние сертификаты, следуя инструкциям, найденным здесь:
https://askubuntu.com/questions/1366704/how-to-install-latest-ca-certificates-on-ubuntu-14
# Ensure dependencies
sudo apt install make tar wget
# Make a place to build it in
mkdir -p ~/src
cd ~/src
wget https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/ca-certificates/20210119~20.04.2/ca-certificates_20210119~20.04.2.tar.xz
tar -xJf ca-certificates_20210119~20.04.2.tar.xz
# Now build and install
cd ca-certificates-20210119~20.04.1
make
sudo make install
# You might want to run this interactively to ensure
# you can select the ISRG Root X1
# in which case, just run: sudo dpkg-reconfigure ca-certificates
sudo dpkg-reconfigure -fnoninteractive ca-certificates
sudo update-ca-certificates --fresh --verbose
/usr/bin/c_rehash /etc/ssl/certs
Я выполнил следующие шаги, чтобы удалить «DST Root CA X3» и убедиться, что сертификат «ISRG_Root_X1» включен:
https://jay.gooby.org/2021/09/30/remove-the-dst-root-ca-x3-crt-from-ubuntu-14-04-lts
# Also available at https://askubuntu.com/a/1366719/233579
mkdir -p ~/src
cd ~/src
wget https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/ca- certificates/20210119~20.04.2/ca-certificates_20210119~20.04.2.tar.xz
unxz ca-certificates_20210119~20.04.2.tar.xz
tar -xf ca-certificates_20210119~20.04.2.tar
cd ca-certificates-20210119~20.04.1
make
sudo make install
sudo dpkg-reconfigure -fnoninteractive ca-certificates
sudo update-ca-certificates
Я перезагрузил, чтобы убедиться. Я все еще получал ошибку. Затем я обновил вручную openssl
с 1.0.2 до 1.1.0, следуя этим инструкциям:
https://forums.servethehome.com/index.php?resources/installing-openssl-1-1-0-on-ubuntu.21/
# I had to use the --no-check-certificate flag because openssl's certificate
# is issued by LetsEncrypt
wget https://www.openssl.org/source/openssl-1.1.0e.tar.gz --no-check-certificate
tar xzvf openssl-1.1.0e.tar.gz
cd openssl-1.1.0e
./config -Wl,--enable-new-dtags,-rpath,'$(LIBRPATH)'
make
sudo make install
Я вижу новую версию:
$ openssl version
OpenSSL 1.1.1l 24 Aug 2021
Я убедился, что старый просроченный сертификат удален, а новый активен:
# Look for expired LetsEncrypt certificate.
$ openssl x509 -enddate -noout -in /etc/ssl/certs/DST_Root_CA_X3.pem
Can't open /etc/ssl/certs/DST_Root_CA_X3.pem for reading, No such file or directory
140352100943680:error:02001002:system library:fopen:No such file or directory:crypto/bio/bss_file.c:69:fopen('/etc/ssl/certs/DST_Root_CA_X3.pem','r')
140352100943680:error:2006D080:BIO routines:BIO_new_file:no such file:crypto/bio/bss_file.c:76:
unable to load certificate
# Look for new LetsEncrypt ISRG_Root_X1 certificate
$ openssl x509 -enddate -noout -in /etc/ssl/certs/ISRG_Root_X1.pem
notAfter=Jun 4 11:04:38 2035 GMT
Я перезагрузил снова, просто чтобы убедиться. К сожалению, я все еще получаю ошибку. Вот что произойдет, если я попытаюсь openssl
снова загрузить сборку 1.1.0. Однако на этот раз, без --no-check-certificates
with wget
, как я использовал ранее для получения файла:
$ wget https://www.openssl.org/source/openssl-1.1.0e.tar.gz
--2021-11-24 18:38:38-- https://www.openssl.org/source/openssl-1.1.0e.tar.gz
Resolving www.openssl.org (www.openssl.org)... 2600:1403:5400:59f::c1e, 2600:1403:5400:5b3::c1e, 104.122.65.172
Connecting to www.openssl.org (www.openssl.org)|2600:1403:5400:59f::c1e|:443... connected.
ERROR: cannot verify www.openssl.org's certificate, issued by ‘/C=US/O=Let's Encrypt/CN=R3’:
Unable to locally verify the issuer's authority.
To connect to www.openssl.org insecurely, use `--no-check-certificate'.
Кто-нибудь знает, как это исправить?
решение1
Нет необходимости загружать все сертификаты CA, если вы хотите добавить только один.
Просто загрузите новый корневой сертификат ISRG Root X1 в формате PEM с сайтаРепозиторий Let's Encrypt(конечно, убедившись, что ссылка ведет на настоящий сайт, защищенный HTTPS).
Переименуйте файл так, чтобы его расширение .crt
было /usr/local/share/ca-certificates
.
Наконец, выполните:
sudo update-ca-certificates --fresh