Skip to content

Commit

Permalink
Updated get_ssl_cert_thumbprint to allow
Browse files Browse the repository at this point in the history
customizable digest algorithms

Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
  • Loading branch information
mihaelabalutoiu committed Jan 31, 2024
1 parent b53ce8c commit c86567e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion coriolis/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ def get_ssl_cert_thumbprint(context, host, port=443, digest_algorithm="sha1"):
sock.close()

x509 = OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_ASN1, cert)
return x509.digest('sha1').decode()
return x509.digest(digest_algorithm).decode()


def get_resources_dir():
Expand Down

0 comments on commit c86567e

Please sign in to comment.