Curl can't connect to letsencrypt sites anymore

from within a project container,

$ curl -v https://anildash.com/
*   Trying 50.31.246.1...
* Connected to anildash.com (50.31.246.1) port 443 (#0)
* found 148 certificates in /etc/ssl/certs/ca-certificates.crt
* found 594 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_ECDSA_AES_128_GCM_SHA256
* server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
* Closing connection 0
curl: (60) server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
 of Certificate Authority (CA) public keys (CA certs). If the default
 bundle file isn't adequate, you can specify an alternate file
 using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
 the bundle, the certificate verification probably failed due to a
 problem with the certificate (it might be expired, or the name might
 not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
 the -k (or --insecure) option.
$ openssl s_client -connect anildash.com:443 -servername anildash.com </dev/null
CONNECTED(00000003)
depth=3 O = Digital Signature Trust Co., CN = DST Root CA X3
verify error:num=10:certificate has expired
notAfter=Sep 30 14:01:15 2021 GMT
---
Certificate chain
 0 s:/CN=anildash.com
   i:/C=US/O=Let's Encrypt/CN=R3
 1 s:/C=US/O=Let's Encrypt/CN=R3
   i:/C=US/O=Internet Security Research Group/CN=ISRG Root X1
 2 s:/C=US/O=Internet Security Research Group/CN=ISRG Root X1
   i:/O=Digital Signature Trust Co./CN=DST Root CA X3
---

I can confirm this:

Coming from someone who knows next to nothing about certificates, what would be the fix for this?

3 Likes

Hi, hello! I realize this is a bit of a +1, so apologies for that.

I’ve got a webring running at Glitch :・゚✧ that fetches member homepages to verify webring links. I’m now seeing a whole lot of these errors from jsdom/jsdom for many sites:

RequestError: Error: certificate has expired'

I’ve hand-verified several of these (including my own site at https://martymcgui.re/) and they are running current Let’sEncrypt-issued certificates.

Is there a way to update my app’s container to include the new Let’sEncrypt root, or to otherwise get these connections accepted again?

1 Like

Apologies for polluting a thread about curl! Turns out my project’s issue was fixable by updating node. I was previously running an old node engine at 8.x.

I updated my package.json to use latest stable (14.x):

  ...
  "engines": {
    "node": "14.x"
  },
  ...

And after all the libraries re-installed and re-built it was up and running again and able to make requests to hosts with Let’sEncrypt certs. :tada:

2 Likes

Interesting that node ships with its own database of root certificates.

edit:

3 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.