File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff 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
9998def sign (text , certpath , keypath ):
You can’t perform that action at this time.
0 commit comments