DOH certificate error

Hi guys,

I am using DOH via PiHole. I have recenty started to get Cloudflare SSL security error and DOH is unable to work. Please see the error below. Any ideas?


curl -v ‘

  • About to connect() to port 443 (#0)
  • Trying…
  • Connected to ( port 443 (#0)
  • Initializing NSS with certpath: sql:/etc/pki/nssdb
  • CAfile: /etc/pki/tls/certs/ca-bundle.crt
    CApath: none
  • Server certificate:
  •   subject:,O="Cloudflare, Inc.",L=San Francisco,ST=California,C=US
  •   start date: Jan 28 00:00:00 2019 GMT
  •   expire date: Feb 01 12:00:00 2021 GMT
  •   common name:
  •   issuer: CN=DigiCert ECC Secure Server CA,O=DigiCert Inc,C=US
  • Peer’s Certificate has expired.
  • Closing connection 0
    curl: (60) Peer’s Certificate has expired.
    More details here:

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.


The error shows SEC_ERROR_EXPIRED_CERTIFICATE, but the expire date in the certificate is expire date: Feb 01 12:00:00 2021 GMT, those don’t match. Maybe have a look at your computer’s local time, make sure it is accurate?

1 Like

Many thanks for the heads up. It seems like my NTP client configuration was failed. I fixed it and the issue is gone.