I’m writing a script for automating reissue & rollover of ECDSA LE certs, since certbot doesn’t provide that automation.
I’ve generated an LE ec cert.
It’s installed on my website.
Browser visit to it works.
Firefox gives it its “green” cert-verified indicator
The cert reports in the browser as
Certification path for "example.com"
Subject: CN=example.com
Issuer: C=US,O=Let's Encrypt,CN=Let's Encrypt Authority X3
Validity: from Wed 03 Aug 2016 03:14:00 PM EST UTC to Tue 01 Nov 2016 03:14:00 PM EST UTC
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
Subject: C=US,O=Let's Encrypt,CN=Let's Encrypt Authority X3
Issuer: O=Digital Signature Trust Co.,CN=DST Root CA X3
Validity: from Thu 17 Mar 2016 04:40:46 PM PST UTC to Wed 17 Mar 2021 04:40:46 PM PST UTC
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
Subject: O=Digital Signature Trust Co.,CN=DST Root CA X3
Issuer: O=Digital Signature Trust Co.,CN=DST Root CA X3
Validity: from Sat 30 Sep 2000 09:12:19 PM PST UTC to Thu 30 Sep 2021 02:01:15 PM PST UTC
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
and SSLLabs gives it an “A+”.
Also checking locally with openssl shows a valid cert date
openssl x509 -enddate -noout -in cert.pem
notAfter=Nov 1 00:14:00 2016 GMT
So all looks OK.
But checking remotely via openssl s_client
echo | openssl s_client -connect example.com:443 -CApath /etc/ssl/certs | openssl x509 -noout -dates
Returns a ‘self-signed’ cert, with dates that don’t relate at all to my server/certs
depth=0 C = US, ST = CA, L = San Francisco Bay Area, O = local / self-signed, CN = local / self-signed
verify error:num=18:self signed certificate
verify return:1
depth=0 C = US, ST = CA, L = San Francisco Bay Area, O = local / self-signed, CN = local / self-signed
verify return:1
DONE
notBefore=Jan 11 01:40:37 2014 GMT
notAfter=Jan 9 01:40:37 2024 GMT
OTOH, the same remote check, to a different domain on the same server,
echo | openssl s_client -connect example2.com:443 -CApath /etc/ssl/certs | openssl x509 -noout -dates
using a Comodo-generated commercial RSA cert returns correct information – both that it’s a commercial, NOT-self-signed cert, and with correct Validity dates
depth=3 C = SE, O = AddTrust AB, OU = AddTrust External TTP Network, CN = AddTrust External CA Root
verify return:1
depth=2 C = GB, ST = Greater Manchester, L = Salford, O = COMODO CA Limited, CN = COMODO RSA Certification Authority
verify return:1
depth=1 C = GB, ST = Greater Manchester, L = Salford, O = COMODO CA Limited, CN = COMODO RSA Domain Validation Secure Server CA
verify return:1
depth=0 OU = Domain Control Validated, OU = EssentialSSL Wildcard, CN = *.example2.com
verify return:1
DONE
notBefore=Sep 1 00:00:00 2015 GMT
notAfter=Oct 21 23:59:59 2016 GMT
Why does the LE cert verify remotely as self-signed, but the Comodo cert verifies correctly?