This file contains hidden or 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
from OpenSSL.crypto import load_certificate, FILETYPE_PEM | |
cert_file_string = open("esx.crt", "rb").read() | |
cert = load_certificate(FILETYPE_PEM, cert_file_string) | |
sha1_fingerprint = cert.digest("sha1") | |
print sha1_fingerprint |