Skip to content

Commit

Permalink
replaced log.exception with log.error
Browse files Browse the repository at this point in the history
  • Loading branch information
Will-Cross1 committed Apr 10, 2024
1 parent 7fe9cee commit 4017164
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions ssm/crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@ def _from_file(filename):


def check_cert_key(certpath, keypath):
"""Check that a certificate and a key match.
Uses openssl directly to fetch the modulus of each, which must be the same.
"""
"""Check that a certificate and a key match."""
try:
cert = _from_file(certpath)
key = _from_file(keypath)
Expand All @@ -74,7 +71,7 @@ def check_cert_key(certpath, keypath):
)

except OpenSSL.crypto.Error as error:
log.exception(error)
log.error(error)
return False

try:
Expand All @@ -86,7 +83,7 @@ def check_cert_key(certpath, keypath):
)

except OpenSSL.crypto.Error as error:
log.exception(error)
log.error(error)
return False

return certificate_public_key.strip() == private_public_key.strip()
Expand Down

0 comments on commit 4017164

Please sign in to comment.