summaryrefslogtreecommitdiff
path: root/src/regress/lib/libcrypto/ecdh
diff options
context:
space:
mode:
authortb <>2024-11-24 10:13:16 +0000
committertb <>2024-11-24 10:13:16 +0000
commit4c908616aa50e22645747c285720f6f2addd285c (patch)
tree6608b0422a07e27678d36227594c61815b7c60c1 /src/regress/lib/libcrypto/ecdh
parentd0bd014cdc526e4c2c4d4a2c7cc7cc089664a114 (diff)
downloadopenbsd-4c908616aa50e22645747c285720f6f2addd285c.tar.gz
openbsd-4c908616aa50e22645747c285720f6f2addd285c.tar.bz2
openbsd-4c908616aa50e22645747c285720f6f2addd285c.zip
Disable regression tests for small builtin curves
Diffstat (limited to 'src/regress/lib/libcrypto/ecdh')
-rw-r--r--src/regress/lib/libcrypto/ecdh/ecc_cdh.c4
-rw-r--r--src/regress/lib/libcrypto/ecdh/ecdhtest.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/regress/lib/libcrypto/ecdh/ecc_cdh.c b/src/regress/lib/libcrypto/ecdh/ecc_cdh.c
index 0333cf1e87..0ab031276d 100644
--- a/src/regress/lib/libcrypto/ecdh/ecc_cdh.c
+++ b/src/regress/lib/libcrypto/ecdh/ecc_cdh.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecc_cdh.c,v 1.2 2023/07/16 08:25:41 tb Exp $ */ 1/* $OpenBSD: ecc_cdh.c,v 1.3 2024/11/24 10:13:16 tb Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2023 Theo Buehler <tb@openbsd.org> 4 * Copyright (c) 2023 Theo Buehler <tb@openbsd.org>
@@ -40,6 +40,7 @@ static const struct ecc_cdh_test {
40 const char *pub_y; 40 const char *pub_y;
41 const char *want; 41 const char *want;
42} ecc_cdh_tests[] = { 42} ecc_cdh_tests[] = {
43#ifdef ENABLE_SMALL_CURVES
43 { 44 {
44 .nid = NID_X9_62_prime192v1, 45 .nid = NID_X9_62_prime192v1,
45 .peer_x = "42ea6dd9969dd2a61fea1aac7f8e98edcc896c6e55857cc0", 46 .peer_x = "42ea6dd9969dd2a61fea1aac7f8e98edcc896c6e55857cc0",
@@ -265,6 +266,7 @@ static const struct ecc_cdh_test {
265 .pub_y = "58ea42edbeeafca9ff44cfd7f29abd2cbde7626d79e422c9", 266 .pub_y = "58ea42edbeeafca9ff44cfd7f29abd2cbde7626d79e422c9",
266 .want = "72e88f3ea67d46d46dbf83926e7e2a6b85b54536741e6d2c", 267 .want = "72e88f3ea67d46d46dbf83926e7e2a6b85b54536741e6d2c",
267 }, 268 },
269#endif /* ENABLE_SMALL_CURVES */
268 270
269 { 271 {
270 .nid = NID_secp224r1, 272 .nid = NID_secp224r1,
diff --git a/src/regress/lib/libcrypto/ecdh/ecdhtest.c b/src/regress/lib/libcrypto/ecdh/ecdhtest.c
index 7d7bbf5465..2f726ecb50 100644
--- a/src/regress/lib/libcrypto/ecdh/ecdhtest.c
+++ b/src/regress/lib/libcrypto/ecdh/ecdhtest.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ecdhtest.c,v 1.20 2023/07/16 07:34:07 tb Exp $ */ 1/* $OpenBSD: ecdhtest.c,v 1.21 2024/11/24 10:13:16 tb Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. 3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
4 * 4 *
@@ -174,12 +174,14 @@ static const struct ecdh_kat_test {
174 const char *want; 174 const char *want;
175} ecdh_kat_tests[] = { 175} ecdh_kat_tests[] = {
176 /* Keys and shared secrets from RFC 5114 */ 176 /* Keys and shared secrets from RFC 5114 */
177#ifdef ENABLE_SMALL_CURVES
177 { 178 {
178 .nid = NID_X9_62_prime192v1, 179 .nid = NID_X9_62_prime192v1,
179 .keya = "323fa3169d8e9c6593f59476bc142000ab5be0e249c43426", 180 .keya = "323fa3169d8e9c6593f59476bc142000ab5be0e249c43426",
180 .keyb = "631f95bb4a67632c9c476eee9ab695ab240a0499307fcf62", 181 .keyb = "631f95bb4a67632c9c476eee9ab695ab240a0499307fcf62",
181 .want = "ad420182633f8526bfe954acda376f05e5ff4f837f54febe", 182 .want = "ad420182633f8526bfe954acda376f05e5ff4f837f54febe",
182 }, 183 },
184#endif
183 { 185 {
184 .nid = NID_secp224r1, 186 .nid = NID_secp224r1,
185 .keya = "b558eb6c288da707bbb4f8fbae2ab9e9cb62e3bc5c7573e2" 187 .keya = "b558eb6c288da707bbb4f8fbae2ab9e9cb62e3bc5c7573e2"