diff options
Diffstat (limited to '')
-rw-r--r-- | src/regress/lib/libcrypto/ec/ec_asn1_test.c | 122 | ||||
-rw-r--r-- | src/regress/lib/libcrypto/mlkem/mlkem_tests.c | 3 | ||||
-rw-r--r-- | src/regress/lib/libcrypto/mlkem/mlkem_unittest.c | 16 | ||||
-rw-r--r-- | src/regress/lib/libssl/pqueue/Makefile | 7 | ||||
-rw-r--r-- | src/regress/lib/libssl/pqueue/expected.txt | 3 | ||||
-rw-r--r-- | src/regress/lib/libssl/pqueue/pq_test.c | 95 | ||||
-rw-r--r-- | src/regress/lib/libssl/tlsext/tlsexttest.c | 7 |
7 files changed, 77 insertions, 176 deletions
diff --git a/src/regress/lib/libcrypto/ec/ec_asn1_test.c b/src/regress/lib/libcrypto/ec/ec_asn1_test.c index 03358e69ca..d9501922de 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 @@ | |||
1 | /* $OpenBSD: ec_asn1_test.c,v 1.32 2025/03/08 20:09:35 tb Exp $ */ | 1 | /* $OpenBSD: ec_asn1_test.c,v 1.33 2025/05/04 05:00:03 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2017, 2021 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2017, 2021 Joel Sing <jsing@openbsd.org> |
4 | * Copyright (c) 2024 Theo Buehler <tb@openbsd.org> | 4 | * Copyright (c) 2024 Theo Buehler <tb@openbsd.org> |
@@ -1281,126 +1281,6 @@ static const struct ec_private_key { | |||
1281 | }, | 1281 | }, |
1282 | }, | 1282 | }, |
1283 | { | 1283 | { |
1284 | .name = "prime239v1", | ||
1285 | .der_len = 115, | ||
1286 | .der = { | ||
1287 | 0x30, 0x71, 0x02, 0x01, 0x01, 0x04, 0x1e, 0x6e, | ||
1288 | 0x26, 0x5e, 0xde, 0x5b, 0x67, 0xd6, 0x38, 0x52, | ||
1289 | 0xe7, 0x1e, 0x8d, 0x44, 0xb1, 0xfb, 0xf8, 0xaf, | ||
1290 | 0xf9, 0x94, 0x2c, 0xe2, 0x0d, 0xa8, 0x5f, 0x03, | ||
1291 | 0x67, 0x53, 0x7b, 0x8b, 0x2e, 0xa0, 0x0a, 0x06, | ||
1292 | 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, | ||
1293 | 0x04, 0xa1, 0x40, 0x03, 0x3e, 0x00, 0x04, 0x33, | ||
1294 | 0xc6, 0xe5, 0x8a, 0xc1, 0x8b, 0x7c, 0x96, 0x19, | ||
1295 | 0xc9, 0xe1, 0x54, 0x7f, 0x81, 0x9e, 0x59, 0x62, | ||
1296 | 0xec, 0xc0, 0x1e, 0xe5, 0x53, 0xd5, 0xae, 0x6b, | ||
1297 | 0xd3, 0xe0, 0x09, 0x07, 0xc5, 0x27, 0x81, 0xa6, | ||
1298 | 0x8d, 0x39, 0x8e, 0xfe, 0x01, 0xc2, 0x1d, 0xda, | ||
1299 | 0xde, 0x7b, 0xdc, 0x76, 0x27, 0x17, 0xf9, 0x6f, | ||
1300 | 0xe3, 0x04, 0xef, 0x5d, 0x65, 0x75, 0x98, 0x7f, | ||
1301 | 0x2d, 0xd0, 0x68, | ||
1302 | }, | ||
1303 | .hex = "0433C6E58AC18B7C" | ||
1304 | "9619C9E1547F819E" | ||
1305 | "5962ECC01EE553D5" | ||
1306 | "AE6BD3E00907C527" | ||
1307 | "81A68D398EFE01C2" | ||
1308 | "1DDADE7BDC762717" | ||
1309 | "F96FE304EF5D6575" | ||
1310 | "987F2DD068", | ||
1311 | .oct_len = 61, | ||
1312 | .oct = { | ||
1313 | 0x04, 0x33, 0xc6, 0xe5, 0x8a, 0xc1, 0x8b, 0x7c, | ||
1314 | 0x96, 0x19, 0xc9, 0xe1, 0x54, 0x7f, 0x81, 0x9e, | ||
1315 | 0x59, 0x62, 0xec, 0xc0, 0x1e, 0xe5, 0x53, 0xd5, | ||
1316 | 0xae, 0x6b, 0xd3, 0xe0, 0x09, 0x07, 0xc5, 0x27, | ||
1317 | 0x81, 0xa6, 0x8d, 0x39, 0x8e, 0xfe, 0x01, 0xc2, | ||
1318 | 0x1d, 0xda, 0xde, 0x7b, 0xdc, 0x76, 0x27, 0x17, | ||
1319 | 0xf9, 0x6f, 0xe3, 0x04, 0xef, 0x5d, 0x65, 0x75, | ||
1320 | 0x98, 0x7f, 0x2d, 0xd0, 0x68, | ||
1321 | }, | ||
1322 | }, | ||
1323 | { | ||
1324 | .name = "prime239v2", | ||
1325 | .der_len = 115, | ||
1326 | .der = { | ||
1327 | 0x30, 0x71, 0x02, 0x01, 0x01, 0x04, 0x1e, 0x30, | ||
1328 | 0x2f, 0x01, 0x10, 0xe9, 0x09, 0x15, 0xdd, 0xe3, | ||
1329 | 0xdd, 0xae, 0xcb, 0x9d, 0x3a, 0x58, 0x92, 0x02, | ||
1330 | 0x1e, 0x6e, 0x02, 0x57, 0xa8, 0x36, 0x0b, 0x20, | ||
1331 | 0x0b, 0x7e, 0xf4, 0xad, 0x0b, 0xa0, 0x0a, 0x06, | ||
1332 | 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, | ||
1333 | 0x05, 0xa1, 0x40, 0x03, 0x3e, 0x00, 0x04, 0x3c, | ||
1334 | 0x10, 0x27, 0x7b, 0xac, 0xdf, 0x86, 0xc9, 0x4f, | ||
1335 | 0xf8, 0x39, 0x87, 0x02, 0x39, 0xaf, 0x41, 0xbc, | ||
1336 | 0x4b, 0x67, 0xd8, 0x5e, 0x04, 0x96, 0x84, 0xb5, | ||
1337 | 0x60, 0x50, 0x48, 0x6a, 0x20, 0x1d, 0x2b, 0x7e, | ||
1338 | 0x9f, 0xaf, 0xf8, 0x8e, 0x7e, 0xa4, 0xcd, 0x00, | ||
1339 | 0xad, 0xb1, 0xad, 0x22, 0x69, 0x32, 0x10, 0x6c, | ||
1340 | 0xe0, 0xcc, 0xdd, 0x45, 0xd8, 0xa6, 0x29, 0x2f, | ||
1341 | 0xad, 0x6b, 0xf9, | ||
1342 | }, | ||
1343 | .hex = "043C10277BACDF86" | ||
1344 | "C94FF839870239AF" | ||
1345 | "41BC4B67D85E0496" | ||
1346 | "84B56050486A201D" | ||
1347 | "2B7E9FAFF88E7EA4" | ||
1348 | "CD00ADB1AD226932" | ||
1349 | "106CE0CCDD45D8A6" | ||
1350 | "292FAD6BF9", | ||
1351 | .oct_len = 61, | ||
1352 | .oct = { | ||
1353 | 0x04, 0x3c, 0x10, 0x27, 0x7b, 0xac, 0xdf, 0x86, | ||
1354 | 0xc9, 0x4f, 0xf8, 0x39, 0x87, 0x02, 0x39, 0xaf, | ||
1355 | 0x41, 0xbc, 0x4b, 0x67, 0xd8, 0x5e, 0x04, 0x96, | ||
1356 | 0x84, 0xb5, 0x60, 0x50, 0x48, 0x6a, 0x20, 0x1d, | ||
1357 | 0x2b, 0x7e, 0x9f, 0xaf, 0xf8, 0x8e, 0x7e, 0xa4, | ||
1358 | 0xcd, 0x00, 0xad, 0xb1, 0xad, 0x22, 0x69, 0x32, | ||
1359 | 0x10, 0x6c, 0xe0, 0xcc, 0xdd, 0x45, 0xd8, 0xa6, | ||
1360 | 0x29, 0x2f, 0xad, 0x6b, 0xf9, | ||
1361 | }, | ||
1362 | }, | ||
1363 | { | ||
1364 | .name = "prime239v3", | ||
1365 | .der_len = 115, | ||
1366 | .der = { | ||
1367 | 0x30, 0x71, 0x02, 0x01, 0x01, 0x04, 0x1e, 0x26, | ||
1368 | 0x3f, 0x23, 0x4c, 0xe7, 0xbd, 0xa8, 0xe4, 0xfe, | ||
1369 | 0x7c, 0xf6, 0x18, 0x6a, 0xb2, 0xa6, 0x39, 0x15, | ||
1370 | 0x6d, 0x72, 0xe8, 0x9e, 0x3f, 0x0f, 0x10, 0x1e, | ||
1371 | 0xe5, 0xdf, 0xac, 0xe8, 0x2f, 0xa0, 0x0a, 0x06, | ||
1372 | 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, | ||
1373 | 0x06, 0xa1, 0x40, 0x03, 0x3e, 0x00, 0x04, 0x37, | ||
1374 | 0xba, 0x07, 0x7f, 0xd9, 0x46, 0x5a, 0x33, 0x03, | ||
1375 | 0x31, 0x77, 0x38, 0xef, 0xee, 0xcc, 0x3d, 0xe1, | ||
1376 | 0xaa, 0x57, 0xe3, 0x8d, 0xb7, 0xcd, 0xe3, 0x01, | ||
1377 | 0xf4, 0xd6, 0x75, 0x49, 0x72, 0x61, 0x4c, 0xbf, | ||
1378 | 0xc0, 0x1f, 0x8b, 0x5f, 0x98, 0x9b, 0xa7, 0xe5, | ||
1379 | 0x6a, 0xb7, 0xfe, 0x63, 0xdb, 0xb0, 0x40, 0xcb, | ||
1380 | 0x26, 0x81, 0x2a, 0x91, 0x14, 0x0f, 0xc7, 0x31, | ||
1381 | 0x13, 0x78, 0x16, | ||
1382 | }, | ||
1383 | .hex = "0437BA077FD9465A" | ||
1384 | "3303317738EFEECC" | ||
1385 | "3DE1AA57E38DB7CD" | ||
1386 | "E301F4D675497261" | ||
1387 | "4CBFC01F8B5F989B" | ||
1388 | "A7E56AB7FE63DBB0" | ||
1389 | "40CB26812A91140F" | ||
1390 | "C731137816", | ||
1391 | .oct_len = 61, | ||
1392 | .oct = { | ||
1393 | 0x04, 0x37, 0xba, 0x07, 0x7f, 0xd9, 0x46, 0x5a, | ||
1394 | 0x33, 0x03, 0x31, 0x77, 0x38, 0xef, 0xee, 0xcc, | ||
1395 | 0x3d, 0xe1, 0xaa, 0x57, 0xe3, 0x8d, 0xb7, 0xcd, | ||
1396 | 0xe3, 0x01, 0xf4, 0xd6, 0x75, 0x49, 0x72, 0x61, | ||
1397 | 0x4c, 0xbf, 0xc0, 0x1f, 0x8b, 0x5f, 0x98, 0x9b, | ||
1398 | 0xa7, 0xe5, 0x6a, 0xb7, 0xfe, 0x63, 0xdb, 0xb0, | ||
1399 | 0x40, 0xcb, 0x26, 0x81, 0x2a, 0x91, 0x14, 0x0f, | ||
1400 | 0xc7, 0x31, 0x13, 0x78, 0x16, | ||
1401 | }, | ||
1402 | }, | ||
1403 | { | ||
1404 | .name = "prime256v1", | 1284 | .name = "prime256v1", |
1405 | .der_len = 121, | 1285 | .der_len = 121, |
1406 | .der = { | 1286 | .der = { |
diff --git a/src/regress/lib/libcrypto/mlkem/mlkem_tests.c b/src/regress/lib/libcrypto/mlkem/mlkem_tests.c index 2801a58890..e9ae417887 100644 --- a/src/regress/lib/libcrypto/mlkem/mlkem_tests.c +++ b/src/regress/lib/libcrypto/mlkem/mlkem_tests.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: mlkem_tests.c,v 1.2 2024/12/26 00:10:19 tb Exp $ */ | 1 | /* $OpenBSD: mlkem_tests.c,v 1.3 2025/05/03 08:34:07 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2024 Google Inc. | 3 | * Copyright (c) 2024 Google Inc. |
4 | * Copyright (c) 2024 Theo Buehler <tb@openbsd.org> | 4 | * Copyright (c) 2024 Theo Buehler <tb@openbsd.org> |
@@ -655,6 +655,7 @@ mlkem_keygen_tests(const char *fn, size_t size, enum test_type test_type) | |||
655 | .encoded_public_key_len = sizeof(encoded_public_key768), | 655 | .encoded_public_key_len = sizeof(encoded_public_key768), |
656 | .private_key_len = MLKEM768_PRIVATE_KEY_BYTES, | 656 | .private_key_len = MLKEM768_PRIVATE_KEY_BYTES, |
657 | .public_key_len = MLKEM768_PUBLIC_KEY_BYTES, | 657 | .public_key_len = MLKEM768_PUBLIC_KEY_BYTES, |
658 | |||
658 | .generate_key_external_entropy = | 659 | .generate_key_external_entropy = |
659 | mlkem768_generate_key_external_entropy, | 660 | mlkem768_generate_key_external_entropy, |
660 | .encode_private_key = | 661 | .encode_private_key = |
diff --git a/src/regress/lib/libcrypto/mlkem/mlkem_unittest.c b/src/regress/lib/libcrypto/mlkem/mlkem_unittest.c index 23b3d8b261..597297b8cc 100644 --- a/src/regress/lib/libcrypto/mlkem/mlkem_unittest.c +++ b/src/regress/lib/libcrypto/mlkem/mlkem_unittest.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: mlkem_unittest.c,v 1.6 2024/12/26 12:35:25 tb Exp $ */ | 1 | /* $OpenBSD: mlkem_unittest.c,v 1.7 2025/05/03 08:34:55 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2024 Google Inc. | 3 | * Copyright (c) 2024 Google Inc. |
4 | * Copyright (c) 2024 Bob Beck <beck@obtuse.com> | 4 | * Copyright (c) 2024 Bob Beck <beck@obtuse.com> |
@@ -161,16 +161,22 @@ MlKemUnitTest(struct unittest_ctx *ctx) | |||
161 | tmp_buf = NULL; | 161 | tmp_buf = NULL; |
162 | 162 | ||
163 | ctx->encap(ctx->ciphertext, shared_secret1, ctx->pub); | 163 | ctx->encap(ctx->ciphertext, shared_secret1, ctx->pub); |
164 | ctx->decap(shared_secret2, ctx->ciphertext, ctx->ciphertext_len, | 164 | if (!ctx->decap(shared_secret2, ctx->ciphertext, ctx->ciphertext_len, |
165 | ctx->priv); | 165 | ctx->priv)) { |
166 | warnx("decap() failed using priv"); | ||
167 | failed |= 1; | ||
168 | } | ||
166 | if (compare_data(shared_secret1, shared_secret2, MLKEM_SHARED_SECRET_BYTES, | 169 | if (compare_data(shared_secret1, shared_secret2, MLKEM_SHARED_SECRET_BYTES, |
167 | "shared secrets with priv") != 0) { | 170 | "shared secrets with priv") != 0) { |
168 | warnx("compare_data"); | 171 | warnx("compare_data"); |
169 | failed |= 1; | 172 | failed |= 1; |
170 | } | 173 | } |
171 | 174 | ||
172 | ctx->decap(shared_secret2, ctx->ciphertext, ctx->ciphertext_len, | 175 | if (!ctx->decap(shared_secret2, ctx->ciphertext, ctx->ciphertext_len, |
173 | ctx->priv2); | 176 | ctx->priv2)) { |
177 | warnx("decap() failed using priv2"); | ||
178 | failed |= 1; | ||
179 | } | ||
174 | if (compare_data(shared_secret1, shared_secret2, MLKEM_SHARED_SECRET_BYTES, | 180 | if (compare_data(shared_secret1, shared_secret2, MLKEM_SHARED_SECRET_BYTES, |
175 | "shared secrets with priv2") != 0) { | 181 | "shared secrets with priv2") != 0) { |
176 | warnx("compare_data"); | 182 | warnx("compare_data"); |
diff --git a/src/regress/lib/libssl/pqueue/Makefile b/src/regress/lib/libssl/pqueue/Makefile index 48c2cb7e61..05fe9a268d 100644 --- a/src/regress/lib/libssl/pqueue/Makefile +++ b/src/regress/lib/libssl/pqueue/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.1 2016/11/04 19:45:12 jsing Exp $ | 1 | # $OpenBSD: Makefile,v 1.2 2025/05/04 11:04:02 tb Exp $ |
2 | 2 | ||
3 | PROG= pq_test | 3 | PROG= pq_test |
4 | SRC= ${.CURDIR}/../../../../lib/libssl | 4 | SRC= ${.CURDIR}/../../../../lib/libssl |
@@ -9,9 +9,4 @@ DPADD= ${LIBSSL} ${LIBCRYPTO} | |||
9 | WARNINGS= Yes | 9 | WARNINGS= Yes |
10 | CFLAGS+= -DLIBRESSL_INTERNAL -Werror | 10 | CFLAGS+= -DLIBRESSL_INTERNAL -Werror |
11 | 11 | ||
12 | REGRESS_TARGETS= regress-pq_test | ||
13 | |||
14 | regress-pq_test: ${PROG} | ||
15 | ${.OBJDIR}/pq_test | cmp -s ${.CURDIR}/expected.txt /dev/stdin | ||
16 | |||
17 | .include <bsd.regress.mk> | 12 | .include <bsd.regress.mk> |
diff --git a/src/regress/lib/libssl/pqueue/expected.txt b/src/regress/lib/libssl/pqueue/expected.txt deleted file mode 100644 index c59d6cd838..0000000000 --- a/src/regress/lib/libssl/pqueue/expected.txt +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | item 6966726167696c69 | ||
2 | item 7374696365787069 | ||
3 | item 737570657263616c | ||
diff --git a/src/regress/lib/libssl/pqueue/pq_test.c b/src/regress/lib/libssl/pqueue/pq_test.c index a078ba5366..822fdea961 100644 --- a/src/regress/lib/libssl/pqueue/pq_test.c +++ b/src/regress/lib/libssl/pqueue/pq_test.c | |||
@@ -59,60 +59,77 @@ | |||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <stdlib.h> | 60 | #include <stdlib.h> |
61 | #include <string.h> | 61 | #include <string.h> |
62 | |||
62 | #include "pqueue.h" | 63 | #include "pqueue.h" |
63 | 64 | ||
64 | /* remember to change expected.txt if you change these values */ | 65 | static const unsigned char *pq_expected[3] = { |
65 | unsigned char prio1[8] = "supercal"; | 66 | "ifragili", |
66 | unsigned char prio2[8] = "ifragili"; | 67 | "sticexpi", |
67 | unsigned char prio3[8] = "sticexpi"; | 68 | "supercal" |
69 | }; | ||
68 | 70 | ||
69 | static void | 71 | static int |
70 | pqueue_print(pqueue pq) | 72 | test_pqueue(void) |
71 | { | 73 | { |
72 | pitem *iter, *item; | 74 | const unsigned char *prio1 = pq_expected[2]; |
73 | 75 | const unsigned char *prio2 = pq_expected[0]; | |
74 | iter = pqueue_iterator(pq); | 76 | const unsigned char *prio3 = pq_expected[1]; |
75 | for (item = pqueue_next(&iter); item != NULL; | 77 | pqueue pq = NULL; |
76 | item = pqueue_next(&iter)) { | 78 | pitem *item = NULL; |
77 | printf("item\t%02x%02x%02x%02x%02x%02x%02x%02x\n", | 79 | pitem *iter = NULL; |
78 | item->priority[0], item->priority[1], | 80 | int i = 0; |
79 | item->priority[2], item->priority[3], | 81 | int failed = 1; |
80 | item->priority[4], item->priority[5], | ||
81 | item->priority[6], item->priority[7]); | ||
82 | } | ||
83 | } | ||
84 | 82 | ||
85 | int | 83 | if ((pq = pqueue_new()) == NULL) |
86 | main(void) | 84 | goto failure; |
87 | { | ||
88 | pitem *item; | ||
89 | pqueue pq; | ||
90 | 85 | ||
91 | pq = pqueue_new(); | 86 | if (!pqueue_insert(pq, pitem_new(prio3, NULL))) |
87 | goto failure; | ||
88 | if (!pqueue_insert(pq, pitem_new(prio1, NULL))) | ||
89 | goto failure; | ||
90 | if (!pqueue_insert(pq, pitem_new(prio2, NULL))) | ||
91 | goto failure; | ||
92 | 92 | ||
93 | item = pitem_new(prio3, NULL); | 93 | if (pqueue_size(pq) != 3) |
94 | pqueue_insert(pq, item); | 94 | goto failure; |
95 | 95 | ||
96 | item = pitem_new(prio1, NULL); | 96 | if ((item = pqueue_find(pq, prio1)) == NULL) |
97 | pqueue_insert(pq, item); | 97 | goto failure; |
98 | if ((item = pqueue_find(pq, prio2)) == NULL) | ||
99 | goto failure; | ||
100 | if ((item = pqueue_find(pq, prio3)) == NULL) | ||
101 | goto failure; | ||
98 | 102 | ||
99 | item = pitem_new(prio2, NULL); | 103 | if ((item = pqueue_peek(pq)) == NULL) |
100 | pqueue_insert(pq, item); | 104 | goto failure; |
101 | 105 | ||
102 | item = pqueue_find(pq, prio1); | 106 | if (memcmp(item->priority, pq_expected[0], 8)) |
103 | fprintf(stderr, "found %p\n", item->priority); | 107 | goto failure; |
104 | 108 | ||
105 | item = pqueue_find(pq, prio2); | 109 | iter = pqueue_iterator(pq); |
106 | fprintf(stderr, "found %p\n", item->priority); | 110 | for (item = pqueue_next(&iter); item != NULL; item = pqueue_next(&iter)) { |
111 | if (memcmp(item->priority, pq_expected[i], 8) != 0) | ||
112 | goto failure; | ||
113 | i++; | ||
114 | } | ||
107 | 115 | ||
108 | item = pqueue_find(pq, prio3); | 116 | failed = (i != 3); |
109 | fprintf(stderr, "found %p\n", item ? item->priority: 0); | ||
110 | 117 | ||
111 | pqueue_print(pq); | 118 | failure: |
112 | 119 | ||
113 | for (item = pqueue_pop(pq); item != NULL; item = pqueue_pop(pq)) | 120 | for (item = pqueue_pop(pq); item != NULL; item = pqueue_pop(pq)) |
114 | pitem_free(item); | 121 | pitem_free(item); |
115 | |||
116 | pqueue_free(pq); | 122 | pqueue_free(pq); |
117 | return 0; | 123 | |
124 | return failed; | ||
125 | } | ||
126 | |||
127 | int | ||
128 | main(void) | ||
129 | { | ||
130 | int failed = 0; | ||
131 | |||
132 | failed |= test_pqueue(); | ||
133 | |||
134 | return failed; | ||
118 | } | 135 | } |
diff --git a/src/regress/lib/libssl/tlsext/tlsexttest.c b/src/regress/lib/libssl/tlsext/tlsexttest.c index 32bad7ebc8..68584998ce 100644 --- a/src/regress/lib/libssl/tlsext/tlsexttest.c +++ b/src/regress/lib/libssl/tlsext/tlsexttest.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tlsexttest.c,v 1.93 2025/04/30 13:44:54 tb Exp $ */ | 1 | /* $OpenBSD: tlsexttest.c,v 1.94 2025/05/03 08:37:28 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2017 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2017 Joel Sing <jsing@openbsd.org> |
4 | * Copyright (c) 2017 Doug Hogan <doug@openbsd.org> | 4 | * Copyright (c) 2017 Doug Hogan <doug@openbsd.org> |
@@ -3740,6 +3740,11 @@ test_tlsext_keyshare_client(void) | |||
3740 | FAIL("Did not select a key share"); | 3740 | FAIL("Did not select a key share"); |
3741 | goto done; | 3741 | goto done; |
3742 | } | 3742 | } |
3743 | if (tls_key_share_group(ssl->s3->hs.key_share) != 29) { | ||
3744 | FAIL("wrong key share group: got %d, expected 29\n", | ||
3745 | tls_key_share_group(ssl->s3->hs.key_share)); | ||
3746 | goto done; | ||
3747 | } | ||
3743 | 3748 | ||
3744 | /* | 3749 | /* |
3745 | * Pretend the client did not send the supported groups extension. We | 3750 | * Pretend the client did not send the supported groups extension. We |