summaryrefslogtreecommitdiffstats
path: root/test/evp_test.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-08-30 11:46:45 +0200
committerRichard Levitte <levitte@openssl.org>2020-09-03 17:48:33 +0200
commit5045abb2e92f9370b05f5e9c6f116fb01bf9e4fe (patch)
treebf1e9ef2d288e9f05e841f84651487497afc84a4 /test/evp_test.c
parent7192e4dfa104f83e54c37e6acfa49fb6a3e1a5dd (diff)
EC: Remove one error record that shadows another
In EC_GROUP_new_from_params(), ERR_R_EC_LIB was reported if group_new_from_name() returned NULL. However, this shadows a possible EC_R_INVALID_CURVE, making that harder to detect, which happens to be important to do in test/evp_test.c. This also extends key_unsupported() in test/evp_test.c to check for this error alongside the check for EC_R_UNKNOWN_GROUP. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/12587)
Diffstat (limited to 'test/evp_test.c')
-rw-r--r--test/evp_test.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/evp_test.c b/test/evp_test.c
index d5ec08c469..52e1dd2e51 100644
--- a/test/evp_test.c
+++ b/test/evp_test.c
@@ -3268,7 +3268,8 @@ static int key_unsupported(void)
* disabled).
*/
if (ERR_GET_LIB(err) == ERR_LIB_EC
- && ERR_GET_REASON(err) == EC_R_UNKNOWN_GROUP) {
+ && (ERR_GET_REASON(err) == EC_R_UNKNOWN_GROUP
+ || ERR_GET_REASON(err) == EC_R_INVALID_CURVE)) {
ERR_clear_error();
return 1;
}