aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2018-03-05 19:26:36 +0000
committerMatt Caswell <matt@openssl.org>2018-03-15 12:47:27 +0000
commit0bcc8ec9d386bc067410f169682cef6b5da4455b (patch)
treefa7e20a342f346f3c7a91fd0ebf3978ebc51d5b2
parent82dd65a2a74c151cf62723609510d83d32c83a52 (diff)
downloadopenssl-0bcc8ec9d386bc067410f169682cef6b5da4455b.zip
openssl-0bcc8ec9d386bc067410f169682cef6b5da4455b.tar.gz
openssl-0bcc8ec9d386bc067410f169682cef6b5da4455b.tar.bz2
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)
-rw-r--r--crypto/evp/p_lib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/evp/p_lib.c b/crypto/evp/p_lib.c
index ee121c4..073d2df 100644
--- a/crypto/evp/p_lib.c
+++ b/crypto/evp/p_lib.c
@@ -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;
}