Yesterday I stumbled on Let's Encrypt certificate on a Fedora linux. Read about my initial (failing?) approach from this blog post.
Given the ticket I filed regarding the problem, I got a pointer to study Using Shared System Certificates in Fedora. As you might think, I didn't know anything about that earlier. In a nutshell, ever since Fedora 19 was released in 2013, there has existed an unified storage for X.509 certificates with appropriate tooling to maintain certificates for OpenSSL, which is used by many components of the system, including curl
. Besides the most common one, also a number of other certificate storages are included in the unified system, including NSS (for Firefox browser), GnuTLS and Java. Which is nice!
This subsystem has existed there a while, but marketing for it has been not-so-strong. Now that I know it exists, I'll offer the proper and correct way of adding the missing Let's Encrypt intermediate ISRG X3 certificate into your system.
To fix your curl
, as regular user, download the X.509 certificate from Let's Encrypt website to /tmp/
-folder.
$ wget https://letsencrypt.org/certs/letsencryptauthorityx3.pem.txt
As root, add the newly downloaded file as a trust anchor:
# trust anchor --store /tmp/letsencryptauthorityx3.pem.txt
That's it! No other commands to run. This sequence will update file /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem
with the current set of certificates to be trusted. That dynamically generated file will be used by curl
ia symlink /etc/pki/tls/certs/ca-bundle.crt
.
As an alternative, storing the letsencryptauthorityx3.pem.txt
into directory /etc/pki/ca-trust/source/anchors/
, and running update-ca-trust
as root will do exactly the same thing.
Simple as pie! (if you know the pie exists)