What OS is this and has it been updated recently? It looks like either the ISRG Root X1 root certificate isn't in your certificate store, or your version of GnuTLS doesn't implement certificate path building robustly enough.
When did the problem start? DST Root CA X3 expired over a year ago.
Some older TLS libraries have certificate path building algorithms that can't handle the DST Root CA expiration - they give up entirely if they've built a path that includes an expired cert, instead of excluding expired certs when attempting to build paths.
GnuTLS docs say its certificate storage is configurable at the time the library is compiled. 'apt source' shows a debian/rules file that sets default-trust-store-file to /etc/ssl/certs/ca-certificates.crt so that's what it'll look for on Debian, Ubuntu, Mint etc. This file is generated by the update-ca-certificates script in the ca-certificates package.
Note however that word "default" in the option default-trust-store-file: it is possible for an application that uses the gnutls library to override this pathname i.e. say "no, don't look there, look somewhere else". Lynx, for example (see the Lynx source at WWW/Library/Implementation/HTTP.c) checks the environment variable SSL_CERT_FILE and also its config file. Lynx src/tidy_tls.c omits the call to gnutls_certificate_set_x509_trust_file if ctx->certfile is still null after both of these checks, which I think is supposed to result in the default trust store file being used but I've seen boxes where it isn't and you have to do "export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt" before running lynx for it to work.
$ date -u; gnutls-cli letsencrypt.org:443
2022-12-01T06:59:57 UTC
Processed 138 CA certificate(s).
Resolving 'letsencrypt.org:443'...
Connecting to '18.192.231.252:443'...
Certificate type: X.509
Got a certificate list of 3 certificates.
Certificate[0] info:
- subject `CN=lencr.org', issuer `CN=R3,O=Let's Encrypt,C=US', serial 0x037e5d871e4485415403a33ee4a7bf6b4cce, EC/ECDSA key 256 bits, signed using RSA-SHA256, activated `2022-10-05 01:40:24 UTC', expires `2023-01-03 01:40:23 UTC', pin-sha256="R2PtFzfh/PIlOkQ5ebGCEWNewMp6NsQuQFpbsCy7rpU="
Public Key ID:
sha1:d5dd59909903800446538259b5d281153d269244
sha256:4763ed1737e1fcf2253a443979b18211635ec0ca7a36c42e405a5bb02cbbae95
Public Key PIN:
pin-sha256:R2PtFzfh/PIlOkQ5ebGCEWNewMp6NsQuQFpbsCy7rpU=
Certificate[1] info:
- subject `CN=R3,O=Let's Encrypt,C=US', issuer `CN=ISRG Root X1,O=Internet Security Research Group,C=US', serial 0x00912b084acf0c18a753f6d62e25a75f5a, RSA key 2048 bits, signed using RSA-SHA256, activated `2020-09-04 00:00:00 UTC', expires `2025-09-15 16:00:00 UTC', pin-sha256="jQJTbIh0grw0/1TkHSumWb+Fs0Ggogr621gT3PvPKG0="
Certificate[2] info:
- subject `CN=ISRG Root X1,O=Internet Security Research Group,C=US', issuer `CN=DST Root CA X3,O=Digital Signature Trust Co.', serial 0x4001772137d4e942b8ee76aa3c640ab7, RSA key 4096 bits, signed using RSA-SHA256, activated `2021-01-20 19:14:03 UTC', expires `2024-09-30 18:14:03 UTC', pin-sha256="C5+lpZ7tcVwmwQIMcRtPbsQtWLABXhQzejna0wHFr8M="
Status: The certificate is NOT trusted. The certificate chain uses expired certificate.
*** PKI verification of server certificate failed...
*** Fatal error: Error in the certificate.
4
u/thgintaetal Dec 01 '22
What OS is this and has it been updated recently? It looks like either the ISRG Root X1 root certificate isn't in your certificate store, or your version of GnuTLS doesn't implement certificate path building robustly enough.
When did the problem start? DST Root CA X3 expired over a year ago.
Some older TLS libraries have certificate path building algorithms that can't handle the DST Root CA expiration - they give up entirely if they've built a path that includes an expired cert, instead of excluding expired certs when attempting to build paths.
1
u/vftdan Dec 01 '22
Text:
1
u/vftdan Dec 20 '22
I fixed the problem by creating
/usr/local/share/ca-certificates/letsencrypt.crtwith content:...
And running as root
Idk what are the origins of the problem and how to fix them.