From: Peiwei Hu Date: Tue, 15 Nov 2022 04:22:24 +0000 (+0800) Subject: Fix the check of EC_GROUP_check_named_curve X-Git-Tag: openssl-3.2.0-alpha1~1714 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b6154ccaf3e64bcdfda4859f2b98ef21b08c5b2;p=thirdparty%2Fopenssl.git Fix the check of EC_GROUP_check_named_curve Reviewed-by: Paul Dale Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/19678) --- diff --git a/providers/implementations/keymgmt/ec_kmgmt.c b/providers/implementations/keymgmt/ec_kmgmt.c index ec5c9548562..fe2465a64b0 100644 --- a/providers/implementations/keymgmt/ec_kmgmt.c +++ b/providers/implementations/keymgmt/ec_kmgmt.c @@ -946,7 +946,7 @@ int ec_validate(const void *keydata, int selection, int checktype) if ((flags & EC_FLAG_CHECK_NAMED_GROUP) != 0) ok = ok && EC_GROUP_check_named_curve(EC_KEY_get0_group(eck), - (flags & EC_FLAG_CHECK_NAMED_GROUP_NIST) != 0, ctx); + (flags & EC_FLAG_CHECK_NAMED_GROUP_NIST) != 0, ctx) > 0; else ok = ok && EC_GROUP_check(EC_KEY_get0_group(eck), ctx); }