mirror of
https://github.com/QuasarApp/qca.git
synced 2025-05-09 17:29:33 +00:00
ossl: pkcs12: Don't crash on unknown private key type
BUGS: 423355
This commit is contained in:
parent
ae5dec259f
commit
3242caee6a
@ -4822,6 +4822,14 @@ public:
|
||||
|
||||
MyPKeyContext *pk = new MyPKeyContext(provider());
|
||||
PKeyBase *k = pk->pkeyToBase(pkey, true); // does an EVP_PKEY_free()
|
||||
if (!k) {
|
||||
delete pk;
|
||||
if(cert)
|
||||
X509_free(cert);
|
||||
if(ca)
|
||||
sk_X509_pop_free(ca, X509_free);
|
||||
return ErrorDecode;
|
||||
}
|
||||
pk->k = k;
|
||||
*priv = pk;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user