summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/regress/lib/libcrypto/ec/ectest.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/regress/lib/libcrypto/ec/ectest.c b/src/regress/lib/libcrypto/ec/ectest.c
index 318a8f02ca..212d5eef1a 100644
--- a/src/regress/lib/libcrypto/ec/ectest.c
+++ b/src/regress/lib/libcrypto/ec/ectest.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ectest.c,v 1.29 2025/01/22 15:10:30 tb Exp $ */ 1/* $OpenBSD: ectest.c,v 1.30 2025/01/22 15:15:21 tb Exp $ */
2/* 2/*
3 * Originally written by Bodo Moeller for the OpenSSL project. 3 * Originally written by Bodo Moeller for the OpenSSL project.
4 */ 4 */
@@ -190,12 +190,7 @@ prime_field_tests(void)
190 if (!BN_hex2bn(&b, "1")) 190 if (!BN_hex2bn(&b, "1"))
191 ABORT; 191 ABORT;
192 192
193 group = EC_GROUP_new(EC_GFp_mont_method()); /* applications should use EC_GROUP_new_curve_GFp 193 if ((group = EC_GROUP_new_curve_GFp(p, a, b, ctx)) == NULL)
194 * so that the library gets to choose the EC_METHOD */
195 if (!group)
196 ABORT;
197
198 if (!EC_GROUP_set_curve(group, p, a, b, ctx))
199 ABORT; 194 ABORT;
200 195
201 { 196 {
@@ -526,7 +521,7 @@ prime_field_tests(void)
526 521
527 group_order_tests(group); 522 group_order_tests(group);
528 523
529 if ((P_256 = EC_GROUP_new(EC_GROUP_method_of(group))) == NULL) 524 if ((P_256 = EC_GROUP_dup(group)) == NULL)
530 ABORT; 525 ABORT;
531 526
532 /* Curve P-384 (FIPS PUB 186-2, App. 6) */ 527 /* Curve P-384 (FIPS PUB 186-2, App. 6) */