3 ms·
Is there a public example certificate with an expiry date above 2050 which I could fetch in order to test a script? I would use conn = ssl.create_default_
by qwertox 5y ago
Is there a public example certificate with an expiry date above 2050 which I could fetch in order to test a script?
I would use
conn = ssl.create_default_context().wrap_socket(socket.socket(socket.AF_INET), server_hostname=hostname)
conn.connect((hostname, 443))
cert = conn.getpeercert()
print(cert['notAfter'])
to test it.
- svenfaw 5y agoThis one expires in 2066, for instance: https://censys.io/certificates/3b639a3248914d0d5e3811c080f3136976109073e5d9c04013c9dfa012b2155d/pem https://censys.io/certificates/3b639a3248914d0d5e3811c080f31...