mirror of
https://github.com/QuasarApp/qca.git
synced 2025-05-14 03:29:32 +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());
|
MyPKeyContext *pk = new MyPKeyContext(provider());
|
||||||
PKeyBase *k = pk->pkeyToBase(pkey, true); // does an EVP_PKEY_free()
|
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;
|
pk->k = k;
|
||||||
*priv = pk;
|
*priv = pk;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user