Openssl and browsers show different expiration dates

For one of the sites I manage, this are the answers in expiration date:

Using openssl s_client -connect… return me Nov 7 2018
Using openssl_x509_parse with Php returns me Nov 7 2018

Using Chrome browser returns me Aug 7 2018
Using https://www.ssllabs.com/ssltest/ returns me Aug 7 2018

Anybody knows why different dates?

Hello. I’ve moved your post to a new thread.

What happens if you use “openssl s_client -connect www.example.com:443 -servername www.example.com”?

Modern clients specify the server hostname in a TLS extension.

With openssl s_client, if a -servername option isn’t included, the server will use its default certificate.

The web server might be configured with different certificates as the default and for your website.

(SSL Labs will show the default certificate further down the page.)


Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command:

It produced this output:

My web server is (include version):

The operating system my web server runs on is (include version):

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don’t know):

I’m using a control panel to manage my site (no, or provide the name and version of the control panel):

3 Likes

That command return me the right date:

echo | openssl s_client -connect domain.com:443 -servername domain.com | openssl x509 -noout -dates

Now I must figure out how to do that (insert the servername) with Php

Thanks

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