summaryrefslogtreecommitdiff
path: root/regress/lib/libcrypto/ec/ec_asn1_test.c
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2024-10-18 17:29:25 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2024-10-18 17:29:25 +0000
commit8dd020cc29180f45750d240458063b762ad95b74 (patch)
tree8d1e4c3246f9878ae750b38b2e31228912f3c2e2 /regress/lib/libcrypto/ec/ec_asn1_test.c
parent4777d4539ed7ccb4570fb5e4aabcb08f95e89557 (diff)
ec_asn1_test: adjust for rejection of non-builtin curve parameters
Diffstat (limited to 'regress/lib/libcrypto/ec/ec_asn1_test.c')
-rw-r--r--regress/lib/libcrypto/ec/ec_asn1_test.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/regress/lib/libcrypto/ec/ec_asn1_test.c b/regress/lib/libcrypto/ec/ec_asn1_test.c
index e5e899264dd..646350b8342 100644
--- a/regress/lib/libcrypto/ec/ec_asn1_test.c
+++ b/regress/lib/libcrypto/ec/ec_asn1_test.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ec_asn1_test.c,v 1.10 2024/10/18 10:40:31 tb Exp $ */
+/* $OpenBSD: ec_asn1_test.c,v 1.11 2024/10/18 17:29:24 tb Exp $ */
/*
* Copyright (c) 2017, 2021 Joel Sing <jsing@openbsd.org>
* Copyright (c) 2024 Theo Buehler <tb@openbsd.org>
@@ -834,9 +834,9 @@ ec_group_non_builtin_curve(const struct curve *curve, const EC_METHOD *method,
}
ERR_clear_error();
+
pder = curve->param;
der_len = curve->param_len;
-#if 0
if ((new_group = d2i_ECPKParameters(NULL, &pder, der_len)) != NULL) {
fprintf(stderr, "FAIL: managed to decode non-builtin parameters %s\n",
curve->descr);
@@ -849,18 +849,6 @@ ec_group_non_builtin_curve(const struct curve *curve, const EC_METHOD *method,
curve->descr, EC_R_UNKNOWN_GROUP, ERR_GET_REASON(error));
goto err;
}
-#else
- if ((new_group = d2i_ECPKParameters(NULL, &pder, der_len)) == NULL) {
- fprintf(stderr, "FAIL: d2i_ECPKParameters(%s)\n", curve->descr);
- goto err;
- }
- if (method == EC_GFp_mont_method() &&
- EC_GROUP_cmp(group, new_group, ctx) != 0) {
- fprintf(stderr, "FAIL: %s Weierstrass groups do not match!\n",
- curve->descr);
- goto err;
- }
-#endif
failed = 0;