Skip to content

Commit cf638e7

Browse files
committed
Fixed codeclimate whitespace and blanklines issues
1 parent 5206edc commit cf638e7

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

ssm/crypto.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,28 +72,27 @@ def check_cert_key(certpath, keypath):
7272
public_key_bytes = OpenSSL.crypto.dump_publickey(
7373
OpenSSL.crypto.FILETYPE_PEM, crypto_public_key
7474
)
75-
75+
7676
certificate_public_key = public_key_bytes.decode("utf-8")
7777

7878
except Exception as error:
7979
log.error(error)
8080
return False
81-
81+
8282
try:
8383
private_key = OpenSSL.crypto.load_privatekey(
8484
OpenSSL.crypto.FILETYPE_PEM, key
8585
)
8686
public_key_bytes = OpenSSL.crypto.dump_publickey(
8787
OpenSSL.crypto.FILETYPE_PEM, private_key
8888
)
89-
89+
9090
private_public_key = public_key_bytes.decode("utf-8")
9191

9292
except Exception as error:
9393
log.error(error)
9494
return False
95-
96-
95+
9796
return certificate_public_key.strip() == private_public_key.strip()
9897

9998
def sign(text, certpath, keypath):

0 commit comments

Comments
 (0)