Score:1

Update certificates and OpenSSL on Ubuntu 14.04 and still getting expired LetsEncrypt certificate errors?

bj flag

In my office one of the systems is still running Ubuntu 14.04. This system has been affected by the Let's Encrypt expired root certificate problem:

https://letsencrypt.org/docs/dst-root-ca-x3-expiration-september-2021/

I downloaded manually the latest certificates using the instructions found here:

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

I followed the steps here to remove the "DST Root CA X3" and made sure the "ISRG_Root_X1" certificate was enabled:

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 

I rebooted to make sure. I still got the error. Then I updated manually openssl from 1.0.2 to 1.1.0 using these instructions:

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

I do see the new version:

$ openssl version
OpenSSL 1.1.1l  24 Aug 2021

I made sure the old expired cert was gone and the new one was active:

# 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

I rebooted again just to be sure. Unfortunately I am still getting the error. Here is what happens if I try to download the the openssl 1.1.0 build again. However this time, without --no-check-certificates with wget like I used earlier to get the file:

$  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'.

Does anyone know how I can fix this?

Paul avatar
cn flag
14.04 is EOL. The best way to fix this is to upgrade to a supported version.
Score:2
br flag

There's no need to download all the ca certificates if you just wish to add one.

Simply download the new ISRG Root X1 root certificate in PEM format from Let's Encrypt's repository (having confirmed that the link is to the genuine HTTPS protected site of course).

Rename the file so that it's extension is .crt and place in /usr/local/share/ca-certificates.

Finally, run:

sudo update-ca-certificates --fresh
Robert Oschler avatar
bj flag
Thanks. But I don't see how that solves the problem I'm having since even though I did add more certs than I needed, I do have the cert that should solve the issue, but isn't?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.