mirror of
https://github.com/openssl/openssl.git
synced 2024-12-15 04:53:52 +08:00
Make sure all errors go on the stack in the EVP_PKEY_new*() functions
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/5520)
This commit is contained in:
parent
82dd65a2a7
commit
0bcc8ec9d3
@ -239,7 +239,7 @@ EVP_PKEY *EVP_PKEY_new_private_key(int type, ENGINE *e,
|
||||
}
|
||||
|
||||
if (!ret->ameth->set_priv_key(ret, priv, len)) {
|
||||
/* We assume the method function calls EVPerr */
|
||||
EVPerr(EVP_F_EVP_PKEY_NEW_PRIVATE_KEY, EVP_R_KEY_SETUP_FAILED);
|
||||
goto err;
|
||||
}
|
||||
|
||||
@ -269,7 +269,7 @@ EVP_PKEY *EVP_PKEY_new_public_key(int type, ENGINE *e,
|
||||
}
|
||||
|
||||
if (!ret->ameth->set_pub_key(ret, pub, len)) {
|
||||
/* We assume the method function calls EVPerr */
|
||||
EVPerr(EVP_F_EVP_PKEY_NEW_PUBLIC_KEY, EVP_R_KEY_SETUP_FAILED);
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user