summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2024-10-11 18:35:40 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2024-10-11 18:35:40 +0000
commit641c523410fda1790dd015183e4ff88b95ecd5db (patch)
tree4483fd57350eb17ce2f0e87c02c629b2d417185b /lib
parent5950f560e9e37073f8322fc37952dadcba489dee (diff)
Fix a long-standing bug in ec_asn1_group2pkparameters()
Only check for the OPENSSL_EC_NAMED_CURVE being set to treat the curve parameters as named curve parameters. ok jsing
Diffstat (limited to 'lib')
-rw-r--r--lib/libcrypto/ec/ec_asn1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libcrypto/ec/ec_asn1.c b/lib/libcrypto/ec/ec_asn1.c
index c27257bdbbd..3cc91fe4c1f 100644
--- a/lib/libcrypto/ec/ec_asn1.c
+++ b/lib/libcrypto/ec/ec_asn1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ec_asn1.c,v 1.65 2024/10/11 18:34:20 tb Exp $ */
+/* $OpenBSD: ec_asn1.c,v 1.66 2024/10/11 18:35:39 tb Exp $ */
/*
* Written by Nils Larsch for the OpenSSL project.
*/
@@ -803,7 +803,7 @@ ec_asn1_group2pkparameters(const EC_GROUP *group)
goto err;
}
- if (EC_GROUP_get_asn1_flag(group) != 0) {
+ if ((EC_GROUP_get_asn1_flag(group) & OPENSSL_EC_NAMED_CURVE) != 0) {
if ((nid = EC_GROUP_get_curve_name(group)) == NID_undef)
goto err;
if ((aobj = OBJ_nid2obj(nid)) == NULL)