openssl_pkcs12: fix crash due to wrong path used for loading key in check mode (#56808)

* Used wrong path for private key.

* Add changelog.
This commit is contained in:
Felix Fontein 2019-05-22 23:34:42 +02:00 committed by René Moser
parent eb9009c4f4
commit 391a1042c2
2 changed files with 3 additions and 1 deletions

View file

@ -0,0 +1,2 @@
bugfixes:
- "openssl_pkcs12 - fixes crash when private key has a passphrase and the module is run a second time."

View file

@ -227,7 +227,7 @@ class Pkcs(crypto_utils.OpenSSLObject):
def _check_pkey_passphrase():
if self.privatekey_passphrase:
try:
crypto_utils.load_privatekey(self.path,
crypto_utils.load_privatekey(self.privatekey_path,
self.privatekey_passphrase)
except crypto.Error:
return False