「SSL certificate」- 在证书中的信息



The domain name that the certificate was issued for

Which person, organization, or device it was issued to

Which certificate authority issued it

The certificate authority’s digital signature

Associated subdomains

Issue date of the certificate

Expiration date of the certificate

The public key (the private key is kept secret)


# 查看全部信息
openssl x509 -in "/path/to/cert/file" -text

# 查看证书过期时间
openssl x509 -in "/path/to/file.pem" -noout -enddate

# 查看站点证书过期时间
openssl s_client -servername www.example.com -connect www.example.com:443 | openssl x509 -noout -enddate


What is an SSL Certificate? | How to Get a Free SSL Certificate | Cloudflare
How to determine SSL cert expiration date from a PEM encoded certificate?
X509Certificate2.NotAfter Property
How to determine SSL certificate expiration date from the crt file itself
OpenSSL: Check SSL Certificate Expiration Date and More
The Most Common OpenSSL Commands