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?

Thanks.

curl -v ‘https://1.1.1.1/dns-query?ct=application/dns-json&name=Cloudflare.com

  • About to connect() to 1.1.1.1 port 443 (#0)
  • Trying 1.1.1.1…
  • Connected to 1.1.1.1 (1.1.1.1) port 443 (#0)
  • Initializing NSS with certpath: sql:/etc/pki/nssdb
  • CAfile: /etc/pki/tls/certs/ca-bundle.crt
    CApath: none
  • Server certificate:
  •   subject: CN=cloudflare-dns.com,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: cloudflare-dns.com
    
  •   issuer: CN=DigiCert ECC Secure Server CA,O=DigiCert Inc,C=US
    
  • NSS error -8181 (SEC_ERROR_EXPIRED_CERTIFICATE)
  • Peer’s Certificate has expired.
  • Closing connection 0
    curl: (60) Peer’s Certificate has expired.
    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.

Hi,

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.