CertNudge

Guides

curl: (60) SSL certificate problem: certificate has expired

Find out which certificate expired: the server's, an intermediate it sends, or a root on your own machine.

2 min read · Updated November 2026

curl stops with curl: (60) SSL certificate problem: certificate has expired. One certificate in the chain is past its date. It can be the server's own certificate, an intermediate the server sends, or a root on your machine.

Find which certificate expired

OpenSSL 3 prints the dates of every certificate the server sends:

echo | openssl s_client -connect example.com:443 -servername example.com 2>/dev/null \
  | grep -E '^ *[0-9] s:|v:NotBefore'

Line 0 is the server's certificate, 1 and up are intermediates. Look for a NotAfter in the past. If every date is fine, the problem is on your side.

The server's certificate expired

Renew it and reload the server. Fixing an expired certificate error has the steps. If certbot says it renewed and curl still fails, the server needs a reload: see old certificate still served.

An intermediate expired

The chain file on the server holds an old intermediate. This happens when someone builds the chain by hand once and never updates it. Download the current chain from your CA, or point the server at certbot's fullchain.pem, and reload. More in incomplete certificate chain.

A root on your machine expired

The server is fine and the same command works from another machine. Your trust store is old. The best-known case is Let's Encrypt's old root DST Root CA X3, which expired on 30 September 2021 and still breaks old systems. Update the CA bundle:

# Debian, Ubuntu
sudo apt update && sudo apt install --only-upgrade ca-certificates
# RHEL, Fedora, Rocky
sudo dnf update ca-certificates
# Alpine
apk add --upgrade ca-certificates

In Docker, rebuild the image on a current base. An image from 2020 carries the trust store from 2020.

Check the clock

date -u
timedatectl

A machine whose clock is a year ahead sees valid certificates as expired. Turn on NTP with sudo timedatectl set-ntp true.

Don't add -k

curl -k skips all checks, so the script works and you stop seeing real problems too. Fix the cause instead.