support longer tls fingerprints
This commit is contained in:
parent
2e09464c4d
commit
c3441c8a10
2 changed files with 10 additions and 2 deletions
|
|
@ -13,7 +13,7 @@ def get_fingerprint():
|
|||
with open(settings.ssl_cert_path) as fd:
|
||||
data = fd.read()
|
||||
cert = OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, data)
|
||||
return hashlib.sha1(OpenSSL.crypto.dump_certificate(OpenSSL.crypto.FILETYPE_ASN1, cert)).hexdigest()
|
||||
return hashlib.sha256(OpenSSL.crypto.dump_certificate(OpenSSL.crypto.FILETYPE_ASN1, cert)).hexdigest()
|
||||
|
||||
def generate_ssl():
|
||||
key = OpenSSL.crypto.PKey()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue