From 6d5eefbfffc4b4c846a1b946ad7cbee1df3a046e Mon Sep 17 00:00:00 2001 From: tb <> Date: Sat, 8 Mar 2025 20:09:35 +0000 Subject: ec_asn1_test: Prepare for upcoming bump Linking statically, pull in ec_local.h and provide a prototype for EC_GROUP_new(), which will be removed from the public API. --- src/regress/lib/libcrypto/ec/Makefile | 7 ++++++- src/regress/lib/libcrypto/ec/ec_asn1_test.c | 12 +++++------- 2 files changed, 11 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/regress/lib/libcrypto/ec/Makefile b/src/regress/lib/libcrypto/ec/Makefile index 59311ef79d..b21eacb4bc 100644 --- a/src/regress/lib/libcrypto/ec/Makefile +++ b/src/regress/lib/libcrypto/ec/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.10 2025/01/21 16:47:52 tb Exp $ +# $OpenBSD: Makefile,v 1.11 2025/03/08 20:09:35 tb Exp $ .ifdef EOPENSSL33 LDADD += -Wl,-rpath,/usr/local/lib/eopenssl33 -L/usr/local/lib/eopenssl33 @@ -10,6 +10,11 @@ PROGS += ectest PROGS += ec_asn1_test PROGS += ec_point_conversion +LDADD_ec_asn1_test += ${CRYPTO_INT} + +CFLAGS += -I${.CURDIR}/../../../../lib/libcrypto/bn +CFLAGS += -I${.CURDIR}/../../../../lib/libcrypto/ec + LDADD = -lcrypto DPADD = ${LIBCRYPTO} WARNINGS = Yes diff --git a/src/regress/lib/libcrypto/ec/ec_asn1_test.c b/src/regress/lib/libcrypto/ec/ec_asn1_test.c index 558179277a..03358e69ca 100644 --- a/src/regress/lib/libcrypto/ec/ec_asn1_test.c +++ b/src/regress/lib/libcrypto/ec/ec_asn1_test.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ec_asn1_test.c,v 1.31 2024/12/24 18:32:31 tb Exp $ */ +/* $OpenBSD: ec_asn1_test.c,v 1.32 2025/03/08 20:09:35 tb Exp $ */ /* * Copyright (c) 2017, 2021 Joel Sing * Copyright (c) 2024 Theo Buehler @@ -24,6 +24,10 @@ #include #include +#include "ec_local.h" + +EC_GROUP *EC_GROUP_new(const EC_METHOD *); + /* set to 0 if/when we are going to enforce 0 <= a,b < p. */ #define NEGATIVE_CURVE_COEFFICIENTS_ALLOWED 1 @@ -328,12 +332,6 @@ ec_group_roundtrip_curve(const EC_GROUP *group, const char *descr, int nid) goto err; } - if (EC_GROUP_method_of(group) == EC_GFp_mont_method()) { - if (EC_GROUP_cmp(group, new_group, NULL) != 0) { - fprintf(stderr, "FAIL: %s %d groups mismatch\n", descr, nid); - goto err; - } - } if (EC_GROUP_get_asn1_flag(group) != EC_GROUP_get_asn1_flag(new_group)) { fprintf(stderr, "FAIL: %s %d asn1_flag %x != %x\n", descr, nid, EC_GROUP_get_asn1_flag(group), -- cgit v1.2.3-55-g6feb