Created
July 5, 2017 10:54
-
-
Save sblask/920d859fc384b994e6caf50dd57dd17a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import socket | |
import ssl | |
ssl_socket = ssl.wrap_socket(socket.socket(), cert_reqs=ssl.CERT_REQUIRED, ca_certs='/etc/ssl/certs/ca-certificates.crt') | |
ssl_socket.connect(('google.com', 443)) | |
print json.dumps(ssl_socket.getpeercert(), indent=4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment