diff options
Diffstat (limited to 'src/regress/lib/libssl')
| -rw-r--r-- | src/regress/lib/libssl/asn1/asn1test.c | 24 | ||||
| -rw-r--r-- | src/regress/lib/libssl/client/clienttest.c | 360 | ||||
| -rw-r--r-- | src/regress/lib/libssl/interop/Makefile | 4 | ||||
| -rw-r--r-- | src/regress/lib/libssl/interop/botan/Makefile | 9 | ||||
| -rw-r--r-- | src/regress/lib/libssl/interop/cert/Makefile | 9 | ||||
| -rw-r--r-- | src/regress/lib/libssl/interop/cipher/Makefile | 17 | ||||
| -rw-r--r-- | src/regress/lib/libssl/interop/netcat/Makefile | 9 | ||||
| -rw-r--r-- | src/regress/lib/libssl/interop/openssl33/Makefile | 44 | ||||
| -rw-r--r-- | src/regress/lib/libssl/interop/openssl34/Makefile | 44 | ||||
| -rw-r--r-- | src/regress/lib/libssl/interop/openssl35/Makefile | 44 | ||||
| -rw-r--r-- | src/regress/lib/libssl/interop/session/Makefile | 9 | ||||
| -rw-r--r-- | src/regress/lib/libssl/interop/version/Makefile | 12 | ||||
| -rw-r--r-- | src/regress/lib/libssl/openssl-ruby/Makefile | 23 | ||||
| -rw-r--r-- | src/regress/lib/libssl/tlsext/tlsexttest.c | 10 | ||||
| -rw-r--r-- | src/regress/lib/libssl/tlsfuzzer/tlsfuzzer.py | 308 | ||||
| -rw-r--r-- | src/regress/lib/libssl/unit/Makefile | 4 | ||||
| -rw-r--r-- | src/regress/lib/libssl/unit/ssl_verify_param.c | 5 |
17 files changed, 604 insertions, 331 deletions
diff --git a/src/regress/lib/libssl/asn1/asn1test.c b/src/regress/lib/libssl/asn1/asn1test.c index a81c502655..ad2301eace 100644 --- a/src/regress/lib/libssl/asn1/asn1test.c +++ b/src/regress/lib/libssl/asn1/asn1test.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: asn1test.c,v 1.13 2024/07/22 14:50:45 jsing Exp $ */ | 1 | /* $OpenBSD: asn1test.c,v 1.14 2025/10/24 11:45:08 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2014, 2016 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2014, 2016 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -371,7 +371,7 @@ session_cmp(SSL_SESSION *s1, SSL_SESSION *s2) | |||
| 371 | static int | 371 | static int |
| 372 | do_ssl_asn1_test(int test_no, struct ssl_asn1_test *sat) | 372 | do_ssl_asn1_test(int test_no, struct ssl_asn1_test *sat) |
| 373 | { | 373 | { |
| 374 | SSL_SESSION *sp = NULL; | 374 | SSL_SESSION *sp = NULL, *sp_copy = NULL; |
| 375 | unsigned char *ap, *asn1 = NULL; | 375 | unsigned char *ap, *asn1 = NULL; |
| 376 | const unsigned char *pp; | 376 | const unsigned char *pp; |
| 377 | int i, len, rv = 1; | 377 | int i, len, rv = 1; |
| @@ -440,11 +440,31 @@ do_ssl_asn1_test(int test_no, struct ssl_asn1_test *sat) | |||
| 440 | goto failed; | 440 | goto failed; |
| 441 | } | 441 | } |
| 442 | 442 | ||
| 443 | if ((sp_copy = SSL_SESSION_dup(sp)) == NULL) { | ||
| 444 | fprintf(stderr, "FAIL: test %d - session dup failed\n", test_no); | ||
| 445 | goto failed; | ||
| 446 | } | ||
| 447 | |||
| 448 | if (session_cmp(sp, sp_copy) != 0) { | ||
| 449 | fprintf(stderr, "FAIL: test %d - sp and sp_dup differ\n", test_no); | ||
| 450 | goto failed; | ||
| 451 | } | ||
| 452 | |||
| 453 | /* | ||
| 454 | * session_cmp() checks that the certs compare as equal. Part of the | ||
| 455 | * documented API contract is that the certs are equal as pointers. | ||
| 456 | */ | ||
| 457 | if (SSL_SESSION_get0_peer(sp) != SSL_SESSION_get0_peer(sp_copy)) { | ||
| 458 | fprintf(stderr, "FAIL: test %d - peer certs differ\n", test_no); | ||
| 459 | goto failed; | ||
| 460 | } | ||
| 461 | |||
| 443 | rv = 0; | 462 | rv = 0; |
| 444 | 463 | ||
| 445 | failed: | 464 | failed: |
| 446 | ERR_print_errors_fp(stderr); | 465 | ERR_print_errors_fp(stderr); |
| 447 | SSL_SESSION_free(sp); | 466 | SSL_SESSION_free(sp); |
| 467 | SSL_SESSION_free(sp_copy); | ||
| 448 | free(asn1); | 468 | free(asn1); |
| 449 | 469 | ||
| 450 | return (rv); | 470 | return (rv); |
diff --git a/src/regress/lib/libssl/client/clienttest.c b/src/regress/lib/libssl/client/clienttest.c index 7e96944fce..f9258105f8 100644 --- a/src/regress/lib/libssl/client/clienttest.c +++ b/src/regress/lib/libssl/client/clienttest.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: clienttest.c,v 1.45 2024/08/31 12:47:24 jsing Exp $ */ | 1 | /* $OpenBSD: clienttest.c,v 1.46 2025/12/04 21:16:17 beck Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2015 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2015 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -36,8 +36,8 @@ | |||
| 36 | #define TLS13_RANDOM_OFFSET (TLS13_HM_OFFSET + 2) | 36 | #define TLS13_RANDOM_OFFSET (TLS13_HM_OFFSET + 2) |
| 37 | #define TLS13_SESSION_OFFSET (TLS13_HM_OFFSET + 34) | 37 | #define TLS13_SESSION_OFFSET (TLS13_HM_OFFSET + 34) |
| 38 | #define TLS13_CIPHER_OFFSET (TLS13_HM_OFFSET + 69) | 38 | #define TLS13_CIPHER_OFFSET (TLS13_HM_OFFSET + 69) |
| 39 | #define TLS13_KEY_SHARE_OFFSET (TLS13_HM_OFFSET + 198) | 39 | #define TLS13_KEY_SHARE_OFFSET (TLS13_HM_OFFSET + 200) |
| 40 | #define TLS13_ONLY_KEY_SHARE_OFFSET (TLS13_HM_OFFSET + 112) | 40 | #define TLS13_ONLY_KEY_SHARE_OFFSET (TLS13_HM_OFFSET + 114) |
| 41 | 41 | ||
| 42 | #define TLS1_3_VERSION_ONLY (TLS1_3_VERSION | 0x10000) | 42 | #define TLS1_3_VERSION_ONLY (TLS1_3_VERSION | 0x10000) |
| 43 | 43 | ||
| @@ -265,8 +265,8 @@ static const uint8_t cipher_list_tls13_chacha[] = { | |||
| 265 | }; | 265 | }; |
| 266 | 266 | ||
| 267 | static const uint8_t client_hello_tls13[] = { | 267 | static const uint8_t client_hello_tls13[] = { |
| 268 | 0x16, 0x03, 0x03, 0x01, 0x10, 0x01, 0x00, 0x01, | 268 | 0x16, 0x03, 0x03, 0x05, 0xd6, 0x01, 0x00, 0x05, |
| 269 | 0x0c, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, | 269 | 0xd2, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 270 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 270 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 271 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 271 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 272 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 272 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| @@ -286,20 +286,173 @@ static const uint8_t client_hello_tls13[] = { | |||
| 286 | 0x00, 0x45, 0x00, 0x9c, 0x00, 0x3c, 0x00, 0x2f, | 286 | 0x00, 0x45, 0x00, 0x9c, 0x00, 0x3c, 0x00, 0x2f, |
| 287 | 0x00, 0xba, 0x00, 0x41, 0xc0, 0x11, 0xc0, 0x07, | 287 | 0x00, 0xba, 0x00, 0x41, 0xc0, 0x11, 0xc0, 0x07, |
| 288 | 0x00, 0x05, 0xc0, 0x12, 0xc0, 0x08, 0x00, 0x16, | 288 | 0x00, 0x05, 0xc0, 0x12, 0xc0, 0x08, 0x00, 0x16, |
| 289 | 0x00, 0x0a, 0x01, 0x00, 0x00, 0x67, 0x00, 0x2b, | 289 | 0x00, 0x0a, 0x01, 0x00, 0x05, 0x2d, 0x00, 0x2b, |
| 290 | 0x00, 0x05, 0x04, 0x03, 0x04, 0x03, 0x03, 0x00, | 290 | 0x00, 0x05, 0x04, 0x03, 0x04, 0x03, 0x03, 0x00, |
| 291 | 0x0a, 0x00, 0x0a, 0x00, 0x08, 0x00, 0x1d, 0x00, | 291 | 0x0a, 0x00, 0x0c, 0x00, 0x0a, 0x11, 0xec, 0x00, |
| 292 | 0x17, 0x00, 0x18, 0x00, 0x19, 0x00, 0x33, 0x00, | 292 | 0x1d, 0x00, 0x17, 0x00, 0x18, 0x00, 0x19, 0x00, |
| 293 | 0x26, 0x00, 0x24, 0x00, 0x1d, 0x00, 0x20, 0x00, | 293 | 0x33, 0x04, 0xea, 0x04, 0xe8, 0x11, 0xec, 0x04, |
| 294 | 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 294 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 295 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 295 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 296 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 296 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 297 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 297 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 298 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 298 | 0x0b, 0x00, 0x02, 0x01, 0x00, 0x00, 0x23, 0x00, | 299 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 299 | 0x00, 0x00, 0x0d, 0x00, 0x18, 0x00, 0x16, 0x08, | 300 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 300 | 0x06, 0x06, 0x01, 0x06, 0x03, 0x08, 0x05, 0x05, | 301 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 301 | 0x01, 0x05, 0x03, 0x08, 0x04, 0x04, 0x01, 0x04, | 302 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 302 | 0x03, 0x02, 0x01, 0x02, 0x03, | 303 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 304 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 305 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 306 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 307 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 308 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 309 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 310 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 311 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 312 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 313 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 314 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 315 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 316 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 317 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 318 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 319 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 320 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 321 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 322 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 323 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 324 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 325 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 326 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 327 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 328 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 329 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 330 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 331 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 332 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 333 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 334 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 335 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 336 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 337 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 338 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 339 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 340 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 341 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 342 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 343 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 344 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 345 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 346 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 347 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 348 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 349 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 350 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 351 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 352 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 353 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 354 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 355 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 356 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 357 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 358 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 359 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 360 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 361 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 362 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 363 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 364 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 365 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 366 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 367 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 368 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 369 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 370 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 371 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 372 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 373 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 374 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 375 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 376 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 377 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 378 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 379 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 380 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 381 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 382 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 383 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 384 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 385 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 386 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 387 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 388 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 389 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 390 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 391 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 392 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 393 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 394 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 395 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 396 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 397 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 398 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 399 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 400 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 401 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 402 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 403 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 404 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 405 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 406 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 407 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 408 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 409 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 410 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 411 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 412 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 413 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 414 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 415 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 416 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 417 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 418 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 419 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 420 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 421 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 422 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 423 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 424 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 425 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 426 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 427 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 428 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 429 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 430 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 431 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 432 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 433 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 434 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 435 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 436 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 437 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 438 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 439 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 440 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 441 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 442 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 443 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 444 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 445 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 446 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 447 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 448 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 449 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 450 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, | ||
| 451 | 0x02, 0x01, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, | ||
| 452 | 0x0d, 0x00, 0x18, 0x00, 0x16, 0x08, 0x06, 0x06, | ||
| 453 | 0x01, 0x06, 0x03, 0x08, 0x05, 0x05, 0x01, 0x05, | ||
| 454 | 0x03, 0x08, 0x04, 0x04, 0x01, 0x04, 0x03, 0x02, | ||
| 455 | 0x01, 0x02, 0x03, | ||
| 303 | }; | 456 | }; |
| 304 | 457 | ||
| 305 | static const uint8_t cipher_list_tls13_only_aes[] = { | 458 | static const uint8_t cipher_list_tls13_only_aes[] = { |
| @@ -311,8 +464,8 @@ static const uint8_t cipher_list_tls13_only_chacha[] = { | |||
| 311 | }; | 464 | }; |
| 312 | 465 | ||
| 313 | static const uint8_t client_hello_tls13_only[] = { | 466 | static const uint8_t client_hello_tls13_only[] = { |
| 314 | 0x16, 0x03, 0x03, 0x00, 0xb6, 0x01, 0x00, 0x00, | 467 | 0x16, 0x03, 0x03, 0x05, 0x7c, 0x01, 0x00, 0x05, |
| 315 | 0xb2, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, | 468 | 0x78, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 316 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 469 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 317 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 470 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 318 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 471 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| @@ -322,19 +475,172 @@ static const uint8_t client_hello_tls13_only[] = { | |||
| 322 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 475 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 323 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x13, 0x03, | 476 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x13, 0x03, |
| 324 | 0x13, 0x02, 0x13, 0x01, 0x00, 0xff, 0x01, 0x00, | 477 | 0x13, 0x02, 0x13, 0x01, 0x00, 0xff, 0x01, 0x00, |
| 325 | 0x00, 0x61, 0x00, 0x2b, 0x00, 0x03, 0x02, 0x03, | 478 | 0x05, 0x27, 0x00, 0x2b, 0x00, 0x03, 0x02, 0x03, |
| 326 | 0x04, 0x00, 0x0a, 0x00, 0x0a, 0x00, 0x08, 0x00, | 479 | 0x04, 0x00, 0x0a, 0x00, 0x0c, 0x00, 0x0a, 0x11, |
| 327 | 0x1d, 0x00, 0x17, 0x00, 0x18, 0x00, 0x19, 0x00, | 480 | 0xec, 0x00, 0x1d, 0x00, 0x17, 0x00, 0x18, 0x00, |
| 328 | 0x33, 0x00, 0x26, 0x00, 0x24, 0x00, 0x1d, 0x00, | 481 | 0x19, 0x00, 0x33, 0x04, 0xea, 0x04, 0xe8, 0x11, |
| 329 | 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 482 | 0xec, 0x04, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 330 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 483 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 331 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 484 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 332 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | 485 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 333 | 0x00, 0x00, 0x0b, 0x00, 0x02, 0x01, 0x00, 0x00, | 486 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 334 | 0x23, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x14, 0x00, | 487 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 335 | 0x12, 0x08, 0x06, 0x06, 0x01, 0x06, 0x03, 0x08, | 488 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 336 | 0x05, 0x05, 0x01, 0x05, 0x03, 0x08, 0x04, 0x04, | 489 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 337 | 0x01, 0x04, 0x03, | 490 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 491 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 492 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 493 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 494 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 495 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 496 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 497 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 498 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 499 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 500 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 501 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 502 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 503 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 504 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 505 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 506 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 507 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 508 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 509 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 510 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 511 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 512 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 513 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 514 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 515 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 516 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 517 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 518 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 519 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 520 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 521 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 522 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 523 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 524 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 525 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 526 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 527 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 528 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 529 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 530 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 531 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 532 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 533 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 534 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 535 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 536 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 537 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 538 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 539 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 540 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 541 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 542 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 543 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 544 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 545 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 546 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 547 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 548 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 549 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 550 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 551 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 552 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 553 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 554 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 555 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 556 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 557 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 558 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 559 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 560 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 561 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 562 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 563 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 564 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 565 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 566 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 567 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 568 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 569 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 570 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 571 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 572 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 573 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 574 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 575 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 576 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 577 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 578 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 579 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 580 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 581 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 582 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 583 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 584 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 585 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 586 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 587 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 588 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 589 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 590 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 591 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 592 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 593 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 594 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 595 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 596 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 597 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 598 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 599 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 600 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 601 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 602 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 603 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 604 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 605 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 606 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 607 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 608 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 609 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 610 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 611 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 612 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 613 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 614 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 615 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 616 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 617 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 618 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 619 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 620 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 621 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 622 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 623 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 624 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 625 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 626 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 627 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 628 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 629 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 630 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 631 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 632 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 633 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 634 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 635 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 636 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 637 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 638 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
| 639 | 0x0b, 0x00, 0x02, 0x01, 0x00, 0x00, 0x23, 0x00, | ||
| 640 | 0x00, 0x00, 0x0d, 0x00, 0x14, 0x00, 0x12, 0x08, | ||
| 641 | 0x06, 0x06, 0x01, 0x06, 0x03, 0x08, 0x05, 0x05, | ||
| 642 | 0x01, 0x05, 0x03, 0x08, 0x04, 0x04, 0x01, 0x04, | ||
| 643 | 0x03, | ||
| 338 | }; | 644 | }; |
| 339 | 645 | ||
| 340 | struct client_hello_test { | 646 | struct client_hello_test { |
| @@ -702,7 +1008,7 @@ client_hello_test(int testno, const struct client_hello_test *cht) | |||
| 702 | memset(&wbuf[cht->session_start + 1], 0, session_len); | 1008 | memset(&wbuf[cht->session_start + 1], 0, session_len); |
| 703 | } | 1009 | } |
| 704 | if (cht->key_share_start > 0) | 1010 | if (cht->key_share_start > 0) |
| 705 | memset(&wbuf[cht->key_share_start], 0, 32); | 1011 | memset(&wbuf[cht->key_share_start], 0, 1252); |
| 706 | 1012 | ||
| 707 | if (memcmp(client_hello, wbuf, client_hello_len) != 0) { | 1013 | if (memcmp(client_hello, wbuf, client_hello_len) != 0) { |
| 708 | fprintf(stderr, "FAIL: ClientHello differs:\n"); | 1014 | fprintf(stderr, "FAIL: ClientHello differs:\n"); |
diff --git a/src/regress/lib/libssl/interop/Makefile b/src/regress/lib/libssl/interop/Makefile index bdc67f627a..e1e9633d37 100644 --- a/src/regress/lib/libssl/interop/Makefile +++ b/src/regress/lib/libssl/interop/Makefile | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.21 2025/01/15 10:54:17 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.23 2025/07/25 16:33:15 tb Exp $ |
| 2 | 2 | ||
| 3 | SUBDIR = libressl openssl33 openssl34 | 3 | SUBDIR = libressl openssl35 |
| 4 | 4 | ||
| 5 | # the above binaries must have been built before we can continue | 5 | # the above binaries must have been built before we can continue |
| 6 | SUBDIR += netcat | 6 | SUBDIR += netcat |
diff --git a/src/regress/lib/libssl/interop/botan/Makefile b/src/regress/lib/libssl/interop/botan/Makefile index 85877d4290..56bcdaf4bd 100644 --- a/src/regress/lib/libssl/interop/botan/Makefile +++ b/src/regress/lib/libssl/interop/botan/Makefile | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.10 2025/01/15 10:54:17 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.12 2025/07/25 16:33:15 tb Exp $ |
| 2 | 2 | ||
| 3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> |
| 4 | 4 | ||
| @@ -20,11 +20,8 @@ CXX = /usr/local/bin/eg++ | |||
| 20 | .endif | 20 | .endif |
| 21 | 21 | ||
| 22 | LIBRARIES = libressl | 22 | LIBRARIES = libressl |
| 23 | .if exists(/usr/local/bin/eopenssl33) | 23 | .if exists(/usr/local/bin/eopenssl35) |
| 24 | LIBRARIES += openssl33 | 24 | LIBRARIES += openssl35 |
| 25 | .endif | ||
| 26 | .if exists(/usr/local/bin/eopenssl34) | ||
| 27 | LIBRARIES += openssl34 | ||
| 28 | .endif | 25 | .endif |
| 29 | 26 | ||
| 30 | PROGS = client | 27 | PROGS = client |
diff --git a/src/regress/lib/libssl/interop/cert/Makefile b/src/regress/lib/libssl/interop/cert/Makefile index 74c63c86a8..9698c56acd 100644 --- a/src/regress/lib/libssl/interop/cert/Makefile +++ b/src/regress/lib/libssl/interop/cert/Makefile | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.14 2025/01/15 10:54:17 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.16 2025/07/25 16:33:15 tb Exp $ |
| 2 | 2 | ||
| 3 | # Connect a client to a server. Both can be current libressl, or | 3 | # Connect a client to a server. Both can be current libressl, or |
| 4 | # openssl 3.x. Create client and server certificates | 4 | # openssl 3.x. Create client and server certificates |
| @@ -7,11 +7,8 @@ | |||
| 7 | # and check the result of certificate verification. | 7 | # and check the result of certificate verification. |
| 8 | 8 | ||
| 9 | LIBRARIES = libressl | 9 | LIBRARIES = libressl |
| 10 | .if exists(/usr/local/bin/eopenssl33) | 10 | .if exists(/usr/local/bin/eopenssl35) |
| 11 | LIBRARIES += openssl33 | 11 | LIBRARIES += openssl35 |
| 12 | .endif | ||
| 13 | .if exists(/usr/local/bin/eopenssl34) | ||
| 14 | LIBRARIES += openssl34 | ||
| 15 | .endif | 12 | .endif |
| 16 | 13 | ||
| 17 | .for cca in noca ca fakeca | 14 | .for cca in noca ca fakeca |
diff --git a/src/regress/lib/libssl/interop/cipher/Makefile b/src/regress/lib/libssl/interop/cipher/Makefile index fa7e25f9ee..5bdc9089fe 100644 --- a/src/regress/lib/libssl/interop/cipher/Makefile +++ b/src/regress/lib/libssl/interop/cipher/Makefile | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.17 2025/01/15 10:54:17 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.19 2025/07/25 16:33:15 tb Exp $ |
| 2 | 2 | ||
| 3 | # Connect a client to a server. Both can be current libressl, or | 3 | # Connect a client to a server. Both can be current libressl, or |
| 4 | # openssl 1.1 or 3.0. Create lists of supported ciphers | 4 | # openssl 1.1 or 3.0. Create lists of supported ciphers |
| @@ -7,11 +7,8 @@ | |||
| 7 | # have used correct cipher by grepping in their session print out. | 7 | # have used correct cipher by grepping in their session print out. |
| 8 | 8 | ||
| 9 | LIBRARIES = libressl | 9 | LIBRARIES = libressl |
| 10 | .if exists(/usr/local/bin/eopenssl33) | 10 | .if exists(/usr/local/bin/eopenssl35) |
| 11 | LIBRARIES += openssl33 | 11 | LIBRARIES += openssl35 |
| 12 | .endif | ||
| 13 | .if exists(/usr/local/bin/eopenssl34) | ||
| 14 | LIBRARIES += openssl34 | ||
| 15 | .endif | 12 | .endif |
| 16 | 13 | ||
| 17 | CLEANFILES = *.tmp *.ciphers ciphers.mk | 14 | CLEANFILES = *.tmp *.ciphers ciphers.mk |
| @@ -41,8 +38,7 @@ client-${clib}-server-${slib}.ciphers: \ | |||
| 41 | uniq -d <$@.tmp >$@ | 38 | uniq -d <$@.tmp >$@ |
| 42 | # we are only interested in ciphers supported by libressl | 39 | # we are only interested in ciphers supported by libressl |
| 43 | sort $@ client-libressl.ciphers >$@.tmp | 40 | sort $@ client-libressl.ciphers >$@.tmp |
| 44 | . if "${clib}" == "openssl33" || "${slib}" == "openssl33" || \ | 41 | . if "${clib}" == "openssl35" || "${slib}" == "openssl35" |
| 45 | "${clib}" == "openssl34" || "${slib}" == "openssl34" | ||
| 46 | # OpenSSL's SSL_CTX_set_cipher_list doesn't accept TLSv1.3 ciphers | 42 | # OpenSSL's SSL_CTX_set_cipher_list doesn't accept TLSv1.3 ciphers |
| 47 | sed -i '/^TLS_/d' $@.tmp | 43 | sed -i '/^TLS_/d' $@.tmp |
| 48 | . endif | 44 | . endif |
| @@ -70,8 +66,7 @@ regress: ciphers.mk | |||
| 70 | .endif | 66 | .endif |
| 71 | 67 | ||
| 72 | LEVEL_libressl = | 68 | LEVEL_libressl = |
| 73 | LEVEL_openssl33 = ,@SECLEVEL=0 | 69 | LEVEL_openssl35 = ,@SECLEVEL=0 |
| 74 | LEVEL_openssl34 = ,@SECLEVEL=0 | ||
| 75 | 70 | ||
| 76 | .for clib in ${LIBRARIES} | 71 | .for clib in ${LIBRARIES} |
| 77 | .for slib in ${LIBRARIES} | 72 | .for slib in ${LIBRARIES} |
| @@ -132,7 +127,7 @@ check-cipher-${cipher}-client-${clib}-server-${slib}: \ | |||
| 132 | . endif | 127 | . endif |
| 133 | . if "${clib}" == "libressl" | 128 | . if "${clib}" == "libressl" |
| 134 | # libressl client may prefer chacha-poly if aes-ni is not supported | 129 | # libressl client may prefer chacha-poly if aes-ni is not supported |
| 135 | . if "${slib}" == "openssl33" || "${slib}" == "openssl34" | 130 | . if "${slib}" == "openssl35" |
| 136 | egrep -q ' Cipher *: TLS_(AES_256_GCM_SHA384|CHACHA20_POLY1305_SHA256)$$' ${@:S/^check/server/}.out | 131 | egrep -q ' Cipher *: TLS_(AES_256_GCM_SHA384|CHACHA20_POLY1305_SHA256)$$' ${@:S/^check/server/}.out |
| 137 | . else | 132 | . else |
| 138 | egrep -q ' Cipher *: TLS_(AES_256_GCM_SHA384|CHACHA20_POLY1305_SHA256)$$' ${@:S/^check/server/}.out | 133 | egrep -q ' Cipher *: TLS_(AES_256_GCM_SHA384|CHACHA20_POLY1305_SHA256)$$' ${@:S/^check/server/}.out |
diff --git a/src/regress/lib/libssl/interop/netcat/Makefile b/src/regress/lib/libssl/interop/netcat/Makefile index 3b8e3f95be..cff6b7ea76 100644 --- a/src/regress/lib/libssl/interop/netcat/Makefile +++ b/src/regress/lib/libssl/interop/netcat/Makefile | |||
| @@ -1,11 +1,8 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.10 2025/01/15 10:54:17 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.12 2025/07/25 16:33:15 tb Exp $ |
| 2 | 2 | ||
| 3 | LIBRARIES = libressl | 3 | LIBRARIES = libressl |
| 4 | .if exists(/usr/local/bin/eopenssl33) | 4 | .if exists(/usr/local/bin/eopenssl35) |
| 5 | LIBRARIES += openssl33 | 5 | LIBRARIES += openssl35 |
| 6 | .endif | ||
| 7 | .if exists(/usr/local/bin/eopenssl34) | ||
| 8 | LIBRARIES += openssl34 | ||
| 9 | .endif | 6 | .endif |
| 10 | 7 | ||
| 11 | # run netcat server and connect with test client | 8 | # run netcat server and connect with test client |
diff --git a/src/regress/lib/libssl/interop/openssl33/Makefile b/src/regress/lib/libssl/interop/openssl33/Makefile deleted file mode 100644 index eff61704d0..0000000000 --- a/src/regress/lib/libssl/interop/openssl33/Makefile +++ /dev/null | |||
| @@ -1,44 +0,0 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.1 2025/01/15 10:54:17 tb Exp $ | ||
| 2 | |||
| 3 | .if ! exists(/usr/local/bin/eopenssl33) | ||
| 4 | regress: | ||
| 5 | # install openssl-3.3 from ports for interop tests | ||
| 6 | @echo 'Run "pkg_add openssl--%3.3" to run tests against OpenSSL 3.3' | ||
| 7 | @echo SKIPPED | ||
| 8 | .else | ||
| 9 | |||
| 10 | PROGS = client server | ||
| 11 | CFLAGS += -DOPENSSL_SUPPRESS_DEPRECATED | ||
| 12 | CPPFLAGS = -I /usr/local/include/eopenssl33 | ||
| 13 | LDFLAGS = -L /usr/local/lib/eopenssl33 | ||
| 14 | LDADD = -lssl -lcrypto | ||
| 15 | DPADD = /usr/local/lib/eopenssl33/libssl.a \ | ||
| 16 | /usr/local/lib/eopenssl33/libcrypto.a | ||
| 17 | LD_LIBRARY_PATH = /usr/local/lib/eopenssl33 | ||
| 18 | REGRESS_TARGETS = run-self-client-server | ||
| 19 | .for p in ${PROGS} | ||
| 20 | REGRESS_TARGETS += run-ldd-$p run-version-$p run-protocol-$p | ||
| 21 | .endfor | ||
| 22 | |||
| 23 | .for p in ${PROGS} | ||
| 24 | |||
| 25 | run-ldd-$p: ldd-$p.out | ||
| 26 | # check that $p is linked with OpenSSL 3.3 | ||
| 27 | grep -q /usr/local/lib/eopenssl33/libcrypto.so ldd-$p.out | ||
| 28 | grep -q /usr/local/lib/eopenssl33/libssl.so ldd-$p.out | ||
| 29 | # check that $p is not linked with LibreSSL | ||
| 30 | ! grep -v libc.so ldd-$p.out | grep /usr/lib/ | ||
| 31 | |||
| 32 | run-version-$p: $p-self.out | ||
| 33 | # check that runtime version is OpenSSL 3.3 | ||
| 34 | grep 'SSLEAY_VERSION: OpenSSL 3.3' $p-self.out | ||
| 35 | |||
| 36 | run-protocol-$p: $p-self.out | ||
| 37 | # check that OpenSSL 3.3 protocol version is TLS 1.3 | ||
| 38 | grep 'Protocol *: TLSv1.3' $p-self.out | ||
| 39 | |||
| 40 | .endfor | ||
| 41 | |||
| 42 | .endif # exists(/usr/local/bin/eopenssl33) | ||
| 43 | |||
| 44 | .include <bsd.regress.mk> | ||
diff --git a/src/regress/lib/libssl/interop/openssl34/Makefile b/src/regress/lib/libssl/interop/openssl34/Makefile deleted file mode 100644 index 72246bb621..0000000000 --- a/src/regress/lib/libssl/interop/openssl34/Makefile +++ /dev/null | |||
| @@ -1,44 +0,0 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.1 2025/01/15 10:54:17 tb Exp $ | ||
| 2 | |||
| 3 | .if ! exists(/usr/local/bin/eopenssl34) | ||
| 4 | regress: | ||
| 5 | # install openssl-3.4 from ports for interop tests | ||
| 6 | @echo 'Run "pkg_add openssl--%3.4" to run tests against OpenSSL 3.4' | ||
| 7 | @echo SKIPPED | ||
| 8 | .else | ||
| 9 | |||
| 10 | PROGS = client server | ||
| 11 | CFLAGS += -DOPENSSL_SUPPRESS_DEPRECATED | ||
| 12 | CPPFLAGS = -I /usr/local/include/eopenssl34 | ||
| 13 | LDFLAGS = -L /usr/local/lib/eopenssl34 | ||
| 14 | LDADD = -lssl -lcrypto | ||
| 15 | DPADD = /usr/local/lib/eopenssl34/libssl.a \ | ||
| 16 | /usr/local/lib/eopenssl34/libcrypto.a | ||
| 17 | LD_LIBRARY_PATH = /usr/local/lib/eopenssl34 | ||
| 18 | REGRESS_TARGETS = run-self-client-server | ||
| 19 | .for p in ${PROGS} | ||
| 20 | REGRESS_TARGETS += run-ldd-$p run-version-$p run-protocol-$p | ||
| 21 | .endfor | ||
| 22 | |||
| 23 | .for p in ${PROGS} | ||
| 24 | |||
| 25 | run-ldd-$p: ldd-$p.out | ||
| 26 | # check that $p is linked with OpenSSL 3.4 | ||
| 27 | grep -q /usr/local/lib/eopenssl34/libcrypto.so ldd-$p.out | ||
| 28 | grep -q /usr/local/lib/eopenssl34/libssl.so ldd-$p.out | ||
| 29 | # check that $p is not linked with LibreSSL | ||
| 30 | ! grep -v libc.so ldd-$p.out | grep /usr/lib/ | ||
| 31 | |||
| 32 | run-version-$p: $p-self.out | ||
| 33 | # check that runtime version is OpenSSL 3.4 | ||
| 34 | grep 'SSLEAY_VERSION: OpenSSL 3.4' $p-self.out | ||
| 35 | |||
| 36 | run-protocol-$p: $p-self.out | ||
| 37 | # check that OpenSSL 3.4 protocol version is TLS 1.3 | ||
| 38 | grep 'Protocol *: TLSv1.3' $p-self.out | ||
| 39 | |||
| 40 | .endfor | ||
| 41 | |||
| 42 | .endif # exists(/usr/local/bin/eopenssl34) | ||
| 43 | |||
| 44 | .include <bsd.regress.mk> | ||
diff --git a/src/regress/lib/libssl/interop/openssl35/Makefile b/src/regress/lib/libssl/interop/openssl35/Makefile new file mode 100644 index 0000000000..e11ad5dd20 --- /dev/null +++ b/src/regress/lib/libssl/interop/openssl35/Makefile | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.1 2025/07/09 17:48:02 tb Exp $ | ||
| 2 | |||
| 3 | .if ! exists(/usr/local/bin/eopenssl35) | ||
| 4 | regress: | ||
| 5 | # install openssl-3.5 from ports for interop tests | ||
| 6 | @echo 'Run "pkg_add openssl--%3.5" to run tests against OpenSSL 3.5' | ||
| 7 | @echo SKIPPED | ||
| 8 | .else | ||
| 9 | |||
| 10 | PROGS = client server | ||
| 11 | CFLAGS += -DOPENSSL_SUPPRESS_DEPRECATED | ||
| 12 | CPPFLAGS = -I /usr/local/include/eopenssl35 | ||
| 13 | LDFLAGS = -L /usr/local/lib/eopenssl35 | ||
| 14 | LDADD = -lssl -lcrypto | ||
| 15 | DPADD = /usr/local/lib/eopenssl35/libssl.a \ | ||
| 16 | /usr/local/lib/eopenssl35/libcrypto.a | ||
| 17 | LD_LIBRARY_PATH = /usr/local/lib/eopenssl35 | ||
| 18 | REGRESS_TARGETS = run-self-client-server | ||
| 19 | .for p in ${PROGS} | ||
| 20 | REGRESS_TARGETS += run-ldd-$p run-version-$p run-protocol-$p | ||
| 21 | .endfor | ||
| 22 | |||
| 23 | .for p in ${PROGS} | ||
| 24 | |||
| 25 | run-ldd-$p: ldd-$p.out | ||
| 26 | # check that $p is linked with OpenSSL 3.5 | ||
| 27 | grep -q /usr/local/lib/eopenssl35/libcrypto.so ldd-$p.out | ||
| 28 | grep -q /usr/local/lib/eopenssl35/libssl.so ldd-$p.out | ||
| 29 | # check that $p is not linked with LibreSSL | ||
| 30 | ! grep -v -e libc.so -e libpthread.so ldd-$p.out | grep /usr/lib/ | ||
| 31 | |||
| 32 | run-version-$p: $p-self.out | ||
| 33 | # check that runtime version is OpenSSL 3.5 | ||
| 34 | grep 'SSLEAY_VERSION: OpenSSL 3.5' $p-self.out | ||
| 35 | |||
| 36 | run-protocol-$p: $p-self.out | ||
| 37 | # check that OpenSSL 3.5 protocol version is TLS 1.3 | ||
| 38 | grep 'Protocol *: TLSv1.3' $p-self.out | ||
| 39 | |||
| 40 | .endfor | ||
| 41 | |||
| 42 | .endif # exists(/usr/local/bin/eopenssl35) | ||
| 43 | |||
| 44 | .include <bsd.regress.mk> | ||
diff --git a/src/regress/lib/libssl/interop/session/Makefile b/src/regress/lib/libssl/interop/session/Makefile index e9a353f99e..fff66b169b 100644 --- a/src/regress/lib/libssl/interop/session/Makefile +++ b/src/regress/lib/libssl/interop/session/Makefile | |||
| @@ -1,11 +1,8 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.12 2025/01/15 10:54:17 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.14 2025/07/25 16:33:15 tb Exp $ |
| 2 | 2 | ||
| 3 | LIBRARIES = libressl | 3 | LIBRARIES = libressl |
| 4 | .if exists(/usr/local/bin/eopenssl33) | 4 | .if exists(/usr/local/bin/eopenssl35) |
| 5 | #LIBRARIES += openssl33 | 5 | #LIBRARIES += openssl35 |
| 6 | .endif | ||
| 7 | .if exists(/usr/local/bin/eopenssl34) | ||
| 8 | #LIBRARIES += openssl34 | ||
| 9 | .endif | 6 | .endif |
| 10 | 7 | ||
| 11 | run-session-client-libressl-server-libressl: | 8 | run-session-client-libressl-server-libressl: |
diff --git a/src/regress/lib/libssl/interop/version/Makefile b/src/regress/lib/libssl/interop/version/Makefile index 605fba252f..5ee7d4c4f3 100644 --- a/src/regress/lib/libssl/interop/version/Makefile +++ b/src/regress/lib/libssl/interop/version/Makefile | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.10 2025/01/15 10:54:17 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.12 2025/07/25 16:33:15 tb Exp $ |
| 2 | 2 | ||
| 3 | # Connect a client to a server. Both can be current libressl, or | 3 | # Connect a client to a server. Both can be current libressl, or |
| 4 | # openssl 1.1 or openssl 3.0. Pin client or server to a fixed TLS | 4 | # openssl 1.1 or openssl 3.0. Pin client or server to a fixed TLS |
| @@ -7,11 +7,8 @@ | |||
| 7 | # print out. | 7 | # print out. |
| 8 | 8 | ||
| 9 | LIBRARIES = libressl | 9 | LIBRARIES = libressl |
| 10 | .if exists(/usr/local/bin/eopenssl33) | 10 | .if exists(/usr/local/bin/eopenssl35) |
| 11 | LIBRARIES += openssl33 | 11 | LIBRARIES += openssl35 |
| 12 | .endif | ||
| 13 | .if exists(/usr/local/bin/eopenssl34) | ||
| 14 | LIBRARIES += openssl34 | ||
| 15 | .endif | 12 | .endif |
| 16 | 13 | ||
| 17 | VERSIONS = any TLS1_2 TLS1_3 | 14 | VERSIONS = any TLS1_2 TLS1_3 |
| @@ -29,8 +26,7 @@ FAIL_${cver}_${sver} = ! | |||
| 29 | .for slib in ${LIBRARIES} | 26 | .for slib in ${LIBRARIES} |
| 30 | 27 | ||
| 31 | .if ("${cver}" != TLS1_3 && "${sver}" != TLS1_3) && \ | 28 | .if ("${cver}" != TLS1_3 && "${sver}" != TLS1_3) && \ |
| 32 | ((("${clib}" != openssl33 && "${slib}" != openssl33)) || \ | 29 | ((("${clib}" != openssl35 && "${slib}" != openssl35)) || \ |
| 33 | (("${clib}" != openssl34 && "${slib}" != openssl34)) || \ | ||
| 34 | (("${cver}" != any && "${sver}" != any) && \ | 30 | (("${cver}" != any && "${sver}" != any) && \ |
| 35 | ("${cver}" != TLS1 && "${sver}" != TLS1) && \ | 31 | ("${cver}" != TLS1 && "${sver}" != TLS1) && \ |
| 36 | ("${cver}" != TLS1_1 && "${sver}" != TLS1_1))) | 32 | ("${cver}" != TLS1_1 && "${sver}" != TLS1_1))) |
diff --git a/src/regress/lib/libssl/openssl-ruby/Makefile b/src/regress/lib/libssl/openssl-ruby/Makefile index af8083f662..19d2f2fc40 100644 --- a/src/regress/lib/libssl/openssl-ruby/Makefile +++ b/src/regress/lib/libssl/openssl-ruby/Makefile | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.14 2024/08/31 11:14:58 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.17 2025/06/27 03:32:08 tb Exp $ |
| 2 | 2 | ||
| 3 | OPENSSL_RUBY_TESTS = /usr/local/share/openssl-ruby-tests | 3 | OPENSSL_RUBY_TESTS = /usr/local/share/openssl-ruby-tests |
| 4 | .if exists(/usr/local/bin/ruby32) | 4 | .if exists(/usr/local/bin/ruby33) |
| 5 | RUBY_BINREV = 32 | ||
| 6 | .else | ||
| 7 | RUBY_BINREV = 33 | 5 | RUBY_BINREV = 33 |
| 6 | .else | ||
| 7 | RUBY_BINREV = 34 | ||
| 8 | .endif | 8 | .endif |
| 9 | RUBY = ruby${RUBY_BINREV} | 9 | RUBY = ruby${RUBY_BINREV} |
| 10 | 10 | ||
| @@ -71,6 +71,21 @@ ${_t}: ${_BUILD_COOKIE} | |||
| 71 | -n ${_t} | 71 | -n ${_t} |
| 72 | .endfor | 72 | .endfor |
| 73 | 73 | ||
| 74 | # These tests can be a pain to run. To run a small set of individual | ||
| 75 | # ssl tests, set the test names separated by spaces in the environment | ||
| 76 | # variable RUBY_SSL_TEST_TARGETS - then you can type "make <test_name>" | ||
| 77 | # to run a single ruby ssl test. | ||
| 78 | .for _t in ${RUBY_SSL_TEST_TARGETS} | ||
| 79 | REGRESS_TARGETS += ${_t} | ||
| 80 | REGRESS_EXPECTED_FAILURES += ${_t} | ||
| 81 | ${_t}: ${_BUILD_COOKIE} | ||
| 82 | cd ${BUILDDIR} && \ | ||
| 83 | ${RUBY} -I. -I${OPENSSL_RUBY_TESTS}/test/openssl \ | ||
| 84 | -I${OPENSSL_RUBY_TESTS}/lib \ | ||
| 85 | ${OPENSSL_RUBY_TESTS}/test/openssl/test_ssl.rb \ | ||
| 86 | -n ${_t} | ||
| 87 | .endfor | ||
| 88 | |||
| 74 | CLEANFILES += ${_BUILD_COOKIE} ${_TEST_COOKIE} ${_BUILDDIR_COOKIE} | 89 | CLEANFILES += ${_BUILD_COOKIE} ${_TEST_COOKIE} ${_BUILDDIR_COOKIE} |
| 75 | 90 | ||
| 76 | . if make(clean) || make(cleandir) | 91 | . if make(clean) || make(cleandir) |
diff --git a/src/regress/lib/libssl/tlsext/tlsexttest.c b/src/regress/lib/libssl/tlsext/tlsexttest.c index 68584998ce..4c3701a63d 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.94 2025/05/03 08:37:28 tb Exp $ */ | 1 | /* $OpenBSD: tlsexttest.c,v 1.95 2025/12/04 21:03:42 beck 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> |
| @@ -3665,7 +3665,7 @@ test_tlsext_keyshare_client(void) | |||
| 3665 | if ((ssl->s3->hs.key_share = | 3665 | if ((ssl->s3->hs.key_share = |
| 3666 | tls_key_share_new_nid(NID_X25519)) == NULL) | 3666 | tls_key_share_new_nid(NID_X25519)) == NULL) |
| 3667 | errx(1, "failed to create key share"); | 3667 | errx(1, "failed to create key share"); |
| 3668 | if (!tls_key_share_generate(ssl->s3->hs.key_share)) | 3668 | if (!tls_key_share_client_generate(ssl->s3->hs.key_share)) |
| 3669 | errx(1, "failed to generate key share"); | 3669 | errx(1, "failed to generate key share"); |
| 3670 | 3670 | ||
| 3671 | ssl->s3->hs.our_max_tls_version = TLS1_2_VERSION; | 3671 | ssl->s3->hs.our_max_tls_version = TLS1_2_VERSION; |
| @@ -3890,14 +3890,14 @@ test_tlsext_keyshare_server(void) | |||
| 3890 | goto done; | 3890 | goto done; |
| 3891 | } | 3891 | } |
| 3892 | 3892 | ||
| 3893 | if (!tls_key_share_generate(ssl->s3->hs.key_share)) { | 3893 | if (!tls_key_share_server_generate(ssl->s3->hs.key_share)) { |
| 3894 | FAIL("failed to generate key share"); | 3894 | FAIL("failed to generate key share"); |
| 3895 | goto done; | 3895 | goto done; |
| 3896 | } | 3896 | } |
| 3897 | 3897 | ||
| 3898 | CBS_init(&cbs, bogokey, sizeof(bogokey)); | 3898 | CBS_init(&cbs, bogokey, sizeof(bogokey)); |
| 3899 | 3899 | ||
| 3900 | if (!tls_key_share_peer_public(ssl->s3->hs.key_share, &cbs, | 3900 | if (!tls_key_share_server_peer_public(ssl->s3->hs.key_share, &cbs, |
| 3901 | &decode_error, NULL)) { | 3901 | &decode_error, NULL)) { |
| 3902 | FAIL("failed to load peer public key\n"); | 3902 | FAIL("failed to load peer public key\n"); |
| 3903 | goto done; | 3903 | goto done; |
| @@ -3926,7 +3926,7 @@ test_tlsext_keyshare_server(void) | |||
| 3926 | FAIL("failed to create key share"); | 3926 | FAIL("failed to create key share"); |
| 3927 | goto done; | 3927 | goto done; |
| 3928 | } | 3928 | } |
| 3929 | if (!tls_key_share_generate(ssl->s3->hs.key_share)) { | 3929 | if (!tls_key_share_server_generate(ssl->s3->hs.key_share)) { |
| 3930 | FAIL("failed to generate key share"); | 3930 | FAIL("failed to generate key share"); |
| 3931 | goto done; | 3931 | goto done; |
| 3932 | } | 3932 | } |
diff --git a/src/regress/lib/libssl/tlsfuzzer/tlsfuzzer.py b/src/regress/lib/libssl/tlsfuzzer/tlsfuzzer.py index 91aedad165..ff678ec9a8 100644 --- a/src/regress/lib/libssl/tlsfuzzer/tlsfuzzer.py +++ b/src/regress/lib/libssl/tlsfuzzer/tlsfuzzer.py | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: tlsfuzzer.py,v 1.56 2024/09/18 19:12:37 tb Exp $ | 1 | # $OpenBSD: tlsfuzzer.py,v 1.57 2025/06/15 09:44:57 tb Exp $ |
| 2 | # | 2 | # |
| 3 | # Copyright (c) 2020 Theo Buehler <tb@openbsd.org> | 3 | # Copyright (c) 2020 Theo Buehler <tb@openbsd.org> |
| 4 | # | 4 | # |
| @@ -72,7 +72,7 @@ def substitute_alert(want, got): | |||
| 72 | return f"Expected alert description \"{want}\" " \ | 72 | return f"Expected alert description \"{want}\" " \ |
| 73 | + f"does not match received \"{got}\"" | 73 | + f"does not match received \"{got}\"" |
| 74 | 74 | ||
| 75 | # test-tls13-finished.py has 70 failing tests that expect a "decode_error" | 75 | # test_tls13_finished.py has 70 failing tests that expect a "decode_error" |
| 76 | # instead of the "decrypt_error" sent by tls13_server_finished_recv(). | 76 | # instead of the "decrypt_error" sent by tls13_server_finished_recv(). |
| 77 | # Both alerts appear to be reasonable in this context, so work around this | 77 | # Both alerts appear to be reasonable in this context, so work around this |
| 78 | # in the test instead of the library. | 78 | # in the test instead of the library. |
| @@ -164,46 +164,46 @@ def generate_test_tls13_finished_args(): | |||
| 164 | return args | 164 | return args |
| 165 | 165 | ||
| 166 | tls13_tests = TestGroup("TLSv1.3 tests", [ | 166 | tls13_tests = TestGroup("TLSv1.3 tests", [ |
| 167 | Test("test-tls13-ccs.py"), | 167 | Test("test_tls13_ccs.py"), |
| 168 | Test("test-tls13-conversation.py"), | 168 | Test("test_tls13_conversation.py"), |
| 169 | Test("test-tls13-count-tickets.py"), | 169 | Test("test_tls13_count_tickets.py"), |
| 170 | Test("test-tls13-empty-alert.py"), | 170 | Test("test_tls13_empty_alert.py"), |
| 171 | Test("test-tls13-finished.py", generate_test_tls13_finished_args()), | 171 | Test("test_tls13_finished.py", generate_test_tls13_finished_args()), |
| 172 | Test("test-tls13-finished-plaintext.py"), | 172 | Test("test_tls13_finished_plaintext.py"), |
| 173 | Test("test-tls13-hrr.py"), | 173 | Test("test_tls13_hrr.py"), |
| 174 | Test("test-tls13-keyshare-omitted.py"), | 174 | Test("test_tls13_keyshare_omitted.py"), |
| 175 | Test("test-tls13-legacy-version.py"), | 175 | Test("test_tls13_legacy_version.py"), |
| 176 | Test("test-tls13-nociphers.py"), | 176 | Test("test_tls13_nociphers.py"), |
| 177 | Test("test-tls13-record-padding.py"), | 177 | Test("test_tls13_record_padding.py"), |
| 178 | # Exclude QUIC transport parameters | 178 | # Exclude QUIC transport parameters |
| 179 | Test("test-tls13-shuffled-extentions.py", [ "--exc", "57" ]), | 179 | Test("test_tls13_shuffled_extentions.py", [ "--exc", "57" ]), |
| 180 | Test("test-tls13-zero-content-type.py"), | 180 | Test("test_tls13_zero_content_type.py"), |
| 181 | 181 | ||
| 182 | # The skipped tests fail due to a bug in BIO_gets() which masks the retry | 182 | # The skipped tests fail due to a bug in BIO_gets() which masks the retry |
| 183 | # signalled from an SSL_read() failure. Testing with httpd(8) shows we're | 183 | # signalled from an SSL_read() failure. Testing with httpd(8) shows we're |
| 184 | # handling these corner cases correctly since tls13_record_layer.c -r1.47. | 184 | # handling these corner cases correctly since tls13_record_layer.c -r1.47. |
| 185 | Test("test-tls13-zero-length-data.py", [ | 185 | Test("test_tls13_zero_length_data.py", [ |
| 186 | "-e", "zero-length app data", | 186 | "-e", "zero-length app data", |
| 187 | "-e", "zero-length app data with large padding", | 187 | "-e", "zero-length app data with large padding", |
| 188 | "-e", "zero-length app data with padding", | 188 | "-e", "zero-length app data with padding", |
| 189 | ]), | 189 | ]), |
| 190 | 190 | ||
| 191 | # We don't currently handle NSTs | 191 | # We don't currently handle NSTs |
| 192 | Test("test-tls13-connection-abort.py", ["-e", "After NewSessionTicket"]), | 192 | Test("test_tls13_connection_abort.py", ["-e", "After NewSessionTicket"]), |
| 193 | ]) | 193 | ]) |
| 194 | 194 | ||
| 195 | # Tests that take a lot of time (> ~30s on an x280) | 195 | # Tests that take a lot of time (> ~30s on an x280) |
| 196 | tls13_slow_tests = TestGroup("slow TLSv1.3 tests", [ | 196 | tls13_slow_tests = TestGroup("slow TLSv1.3 tests", [ |
| 197 | # XXX: Investigate the occasional message | 197 | # XXX: Investigate the occasional message |
| 198 | # "Got shared secret with 1 most significant bytes equal to zero." | 198 | # "Got shared secret with 1 most significant bytes equal to zero." |
| 199 | Test("test-tls13-dhe-shared-secret-padding.py", tls13_unsupported_ciphers), | 199 | Test("test_tls13_dhe_shared_secret_padding.py", tls13_unsupported_ciphers), |
| 200 | 200 | ||
| 201 | Test("test-tls13-invalid-ciphers.py"), | 201 | Test("test_tls13_invalid_ciphers.py"), |
| 202 | Test("test-tls13-serverhello-random.py", tls13_unsupported_ciphers), | 202 | Test("test_tls13_serverhello_random.py", tls13_unsupported_ciphers), |
| 203 | 203 | ||
| 204 | # Mark two tests cases as xfail for now. The tests expect an arguably | 204 | # Mark two tests cases as xfail for now. The tests expect an arguably |
| 205 | # correct decode_error while we send a decrypt_error (like fizz/boring). | 205 | # correct decode_error while we send a decrypt_error (like fizz/boring). |
| 206 | Test("test-tls13-record-layer-limits.py", [ | 206 | Test("test_tls13_record_layer_limits.py", [ |
| 207 | "-x", "max size payload (2**14) of Finished msg, with 16348 bytes of left padding, cipher TLS_AES_128_GCM_SHA256", | 207 | "-x", "max size payload (2**14) of Finished msg, with 16348 bytes of left padding, cipher TLS_AES_128_GCM_SHA256", |
| 208 | "-X", substitute_alert("decode_error", "decrypt_error"), | 208 | "-X", substitute_alert("decode_error", "decrypt_error"), |
| 209 | "-x", "max size payload (2**14) of Finished msg, with 16348 bytes of left padding, cipher TLS_CHACHA20_POLY1305_SHA256", | 209 | "-x", "max size payload (2**14) of Finished msg, with 16348 bytes of left padding, cipher TLS_CHACHA20_POLY1305_SHA256", |
| @@ -212,22 +212,22 @@ tls13_slow_tests = TestGroup("slow TLSv1.3 tests", [ | |||
| 212 | # We don't accept an empty ECPF extension since it must advertise the | 212 | # We don't accept an empty ECPF extension since it must advertise the |
| 213 | # uncompressed point format. Exclude this extension type from the test. | 213 | # uncompressed point format. Exclude this extension type from the test. |
| 214 | Test( | 214 | Test( |
| 215 | "test-tls13-large-number-of-extensions.py", | 215 | "test_tls13_large_number_of_extensions.py", |
| 216 | tls13_args = ["--exc", "11"], | 216 | tls13_args = ["--exc", "11"], |
| 217 | ), | 217 | ), |
| 218 | ]) | 218 | ]) |
| 219 | 219 | ||
| 220 | tls13_extra_cert_tests = TestGroup("TLSv1.3 certificate tests", [ | 220 | tls13_extra_cert_tests = TestGroup("TLSv1.3 certificate tests", [ |
| 221 | # need to set up client certs to run these | 221 | # need to set up client certs to run these |
| 222 | Test("test-tls13-certificate-request.py"), | 222 | Test("test_tls13_certificate_request.py"), |
| 223 | Test("test-tls13-certificate-verify.py"), | 223 | Test("test_tls13_certificate_verify.py"), |
| 224 | Test("test-tls13-ecdsa-in-certificate-verify.py"), | 224 | Test("test_tls13_ecdsa_in_certificate_verify.py"), |
| 225 | Test("test-tls13-eddsa-in-certificate-verify.py"), | 225 | Test("test_tls13_eddsa_in_certificate_verify.py"), |
| 226 | 226 | ||
| 227 | # Test expects the server to have installed three certificates: | 227 | # Test expects the server to have installed three certificates: |
| 228 | # with P-256, P-384 and P-521 curve. Also SHA1+ECDSA is verified | 228 | # with P-256, P-384 and P-521 curve. Also SHA1+ECDSA is verified |
| 229 | # to not work. | 229 | # to not work. |
| 230 | Test("test-tls13-ecdsa-support.py"), | 230 | Test("test_tls13_ecdsa_support.py"), |
| 231 | ]) | 231 | ]) |
| 232 | 232 | ||
| 233 | tls13_failing_tests = TestGroup("failing TLSv1.3 tests", [ | 233 | tls13_failing_tests = TestGroup("failing TLSv1.3 tests", [ |
| @@ -235,7 +235,7 @@ tls13_failing_tests = TestGroup("failing TLSv1.3 tests", [ | |||
| 235 | # With X25519, we accept weak peer public keys and fail when we actually | 235 | # With X25519, we accept weak peer public keys and fail when we actually |
| 236 | # compute the keyshare. Other tests seem to indicate that we could be | 236 | # compute the keyshare. Other tests seem to indicate that we could be |
| 237 | # stricter about what keyshares we accept. | 237 | # stricter about what keyshares we accept. |
| 238 | Test("test-tls13-crfg-curves.py", [ | 238 | Test("test_tls13_crfg_curves.py", [ |
| 239 | '-e', 'all zero x448 key share', | 239 | '-e', 'all zero x448 key share', |
| 240 | '-e', 'empty x448 key share', | 240 | '-e', 'empty x448 key share', |
| 241 | '-e', 'sanity x448 with compression ansiX962_compressed_char2', | 241 | '-e', 'sanity x448 with compression ansiX962_compressed_char2', |
| @@ -245,7 +245,7 @@ tls13_failing_tests = TestGroup("failing TLSv1.3 tests", [ | |||
| 245 | '-e', 'too small x448 key share', | 245 | '-e', 'too small x448 key share', |
| 246 | '-e', 'x448 key share of "1"', | 246 | '-e', 'x448 key share of "1"', |
| 247 | ]), | 247 | ]), |
| 248 | Test("test-tls13-ecdhe-curves.py", [ | 248 | Test("test_tls13_ecdhe_curves.py", [ |
| 249 | '-e', 'sanity - x448', | 249 | '-e', 'sanity - x448', |
| 250 | '-e', 'x448 - key share from other curve', | 250 | '-e', 'x448 - key share from other curve', |
| 251 | '-e', 'x448 - point at infinity', | 251 | '-e', 'x448 - point at infinity', |
| @@ -258,21 +258,21 @@ tls13_failing_tests = TestGroup("failing TLSv1.3 tests", [ | |||
| 258 | # We have the logic corresponding to NSS's fix for CVE-2020-25648 | 258 | # We have the logic corresponding to NSS's fix for CVE-2020-25648 |
| 259 | # https://hg.mozilla.org/projects/nss/rev/57bbefa793232586d27cee83e74411171e128361 | 259 | # https://hg.mozilla.org/projects/nss/rev/57bbefa793232586d27cee83e74411171e128361 |
| 260 | # so should not be affected by this issue. | 260 | # so should not be affected by this issue. |
| 261 | Test("test-tls13-multiple-ccs-messages.py"), | 261 | Test("test_tls13_multiple_ccs_messages.py"), |
| 262 | 262 | ||
| 263 | # https://github.com/openssl/openssl/issues/8369 | 263 | # https://github.com/openssl/openssl/issues/8369 |
| 264 | Test("test-tls13-obsolete-curves.py"), | 264 | Test("test_tls13_obsolete_curves.py"), |
| 265 | 265 | ||
| 266 | # 3 failing rsa_pss_pss tests | 266 | # 3 failing rsa_pss_pss tests |
| 267 | Test("test-tls13-rsa-signatures.py"), | 267 | Test("test_tls13_rsa_signatures.py"), |
| 268 | 268 | ||
| 269 | # The failing tests all expect an ri extension. What's up with that? | 269 | # The failing tests all expect an ri extension. What's up with that? |
| 270 | Test("test-tls13-version-negotiation.py"), | 270 | Test("test_tls13_version_negotiation.py"), |
| 271 | ]) | 271 | ]) |
| 272 | 272 | ||
| 273 | tls13_slow_failing_tests = TestGroup("slow, failing TLSv1.3 tests", [ | 273 | tls13_slow_failing_tests = TestGroup("slow, failing TLSv1.3 tests", [ |
| 274 | # Other test failures bugs in keyshare/tlsext negotiation? | 274 | # Other test failures bugs in keyshare/tlsext negotiation? |
| 275 | Test("test-tls13-unrecognised-groups.py"), # unexpected closure | 275 | Test("test_tls13_unrecognised_groups.py"), # unexpected closure |
| 276 | 276 | ||
| 277 | # 5 occasional failures: | 277 | # 5 occasional failures: |
| 278 | # 'app data split, conversation with KeyUpdate msg' | 278 | # 'app data split, conversation with KeyUpdate msg' |
| @@ -280,43 +280,43 @@ tls13_slow_failing_tests = TestGroup("slow, failing TLSv1.3 tests", [ | |||
| 280 | # 'multiple KeyUpdate messages' | 280 | # 'multiple KeyUpdate messages' |
| 281 | # 'post-handshake KeyUpdate msg with update_not_request' | 281 | # 'post-handshake KeyUpdate msg with update_not_request' |
| 282 | # 'post-handshake KeyUpdate msg with update_request' | 282 | # 'post-handshake KeyUpdate msg with update_request' |
| 283 | Test("test-tls13-keyupdate.py"), | 283 | Test("test_tls13_keyupdate.py"), |
| 284 | 284 | ||
| 285 | Test("test-tls13-symetric-ciphers.py"), # unexpected message from peer | 285 | Test("test_tls13_symetric_ciphers.py"), # unexpected message from peer |
| 286 | 286 | ||
| 287 | # 6 tests fail: 'rsa_pkcs1_{md5,sha{1,224,256,384,512}} signature' | 287 | # 6 tests fail: 'rsa_pkcs1_{md5,sha{1,224,256,384,512}} signature' |
| 288 | # We send server hello, but the test expects handshake_failure | 288 | # We send server hello, but the test expects handshake_failure |
| 289 | Test("test-tls13-pkcs-signature.py"), | 289 | Test("test_tls13_pkcs_signature.py"), |
| 290 | # 8 tests fail: 'tls13 signature rsa_pss_{pss,rsae}_sha{256,384,512} | 290 | # 8 tests fail: 'tls13 signature rsa_pss_{pss,rsae}_sha{256,384,512} |
| 291 | Test("test-tls13-rsapss-signatures.py"), | 291 | Test("test_tls13_rsapss_signatures.py"), |
| 292 | ]) | 292 | ]) |
| 293 | 293 | ||
| 294 | tls13_unsupported_tests = TestGroup("TLSv1.3 tests for unsupported features", [ | 294 | tls13_unsupported_tests = TestGroup("TLSv1.3 tests for unsupported features", [ |
| 295 | # Tests for features we don't support | 295 | # Tests for features we don't support |
| 296 | Test("test-tls13-0rtt-garbage.py"), | 296 | Test("test_tls13_0rtt_garbage.py"), |
| 297 | Test("test-tls13-ffdhe-groups.py"), | 297 | Test("test_tls13_ffdhe_groups.py"), |
| 298 | Test("test-tls13-ffdhe-sanity.py"), | 298 | Test("test_tls13_ffdhe_sanity.py"), |
| 299 | Test("test-tls13-psk_dhe_ke.py"), | 299 | Test("test_tls13_psk_dhe_ke.py"), |
| 300 | Test("test-tls13-psk_ke.py"), | 300 | Test("test_tls13_psk_ke.py"), |
| 301 | 301 | ||
| 302 | # need server to react to HTTP GET for /keyupdate | 302 | # need server to react to HTTP GET for /keyupdate |
| 303 | Test("test-tls13-keyupdate-from-server.py"), | 303 | Test("test_tls13_keyupdate_from_server.py"), |
| 304 | 304 | ||
| 305 | # needs an echo server | 305 | # needs an echo server |
| 306 | Test("test-tls13-lengths.py"), | 306 | Test("test_tls13_lengths.py"), |
| 307 | 307 | ||
| 308 | # Weird test: tests servers that don't support 1.3 | 308 | # Weird test: tests servers that don't support 1.3 |
| 309 | Test("test-tls13-non-support.py"), | 309 | Test("test_tls13_non_support.py"), |
| 310 | 310 | ||
| 311 | # broken test script | 311 | # broken test script |
| 312 | # UnboundLocalError: local variable 'cert' referenced before assignment | 312 | # UnboundLocalError: local variable 'cert' referenced before assignment |
| 313 | Test("test-tls13-post-handshake-auth.py"), | 313 | Test("test_tls13_post_handshake_auth.py"), |
| 314 | 314 | ||
| 315 | # ExpectNewSessionTicket | 315 | # ExpectNewSessionTicket |
| 316 | Test("test-tls13-session-resumption.py"), | 316 | Test("test_tls13_session_resumption.py"), |
| 317 | 317 | ||
| 318 | # Server must be configured to support only rsa_pss_rsae_sha512 | 318 | # Server must be configured to support only rsa_pss_rsae_sha512 |
| 319 | Test("test-tls13-signature-algorithms.py"), | 319 | Test("test_tls13_signature_algorithms.py"), |
| 320 | ]) | 320 | ]) |
| 321 | 321 | ||
| 322 | tls12_exclude_legacy_protocols = [ | 322 | tls12_exclude_legacy_protocols = [ |
| @@ -345,52 +345,52 @@ tls12_exclude_legacy_protocols = [ | |||
| 345 | 345 | ||
| 346 | tls12_tests = TestGroup("TLSv1.2 tests", [ | 346 | tls12_tests = TestGroup("TLSv1.2 tests", [ |
| 347 | # Tests that pass as they are. | 347 | # Tests that pass as they are. |
| 348 | Test("test-aes-gcm-nonces.py"), | 348 | Test("test_aes_gcm_nonces.py"), |
| 349 | Test("test-connection-abort.py"), | 349 | Test("test_connection_abort.py"), |
| 350 | Test("test-conversation.py"), | 350 | Test("test_conversation.py"), |
| 351 | Test("test-cve-2016-2107.py"), | 351 | Test("test_cve_2016_2107.py"), |
| 352 | Test("test-cve-2016-6309.py"), | 352 | Test("test_cve_2016_6309.py"), |
| 353 | Test("test-dhe-rsa-key-exchange.py"), | 353 | Test("test_dhe_rsa_key_exchange.py"), |
| 354 | Test("test-early-application-data.py"), | 354 | Test("test_early_application_data.py"), |
| 355 | Test("test-empty-extensions.py"), | 355 | Test("test_empty_extensions.py"), |
| 356 | Test("test-extensions.py"), | 356 | Test("test_extensions.py"), |
| 357 | Test("test-fuzzed-MAC.py"), | 357 | Test("test_fuzzed_MAC.py"), |
| 358 | Test("test-fuzzed-ciphertext.py"), | 358 | Test("test_fuzzed_ciphertext.py"), |
| 359 | Test("test-fuzzed-finished.py"), | 359 | Test("test_fuzzed_finished.py"), |
| 360 | Test("test-fuzzed-padding.py"), | 360 | Test("test_fuzzed_padding.py"), |
| 361 | Test("test-fuzzed-plaintext.py"), # fails once in a while | 361 | Test("test_fuzzed_plaintext.py"), # fails once in a while |
| 362 | Test("test-hello-request-by-client.py"), | 362 | Test("test_hello_request_by_client.py"), |
| 363 | Test("test-invalid-cipher-suites.py"), | 363 | Test("test_invalid_cipher_suites.py"), |
| 364 | Test("test-invalid-content-type.py"), | 364 | Test("test_invalid_content_type.py"), |
| 365 | Test("test-invalid-session-id.py"), | 365 | Test("test_invalid_session_id.py"), |
| 366 | Test("test-invalid-version.py"), | 366 | Test("test_invalid_version.py"), |
| 367 | Test("test-large-number-of-extensions.py"), | 367 | Test("test_large_number_of_extensions.py"), |
| 368 | Test("test-lucky13.py"), | 368 | Test("test_lucky13.py"), |
| 369 | Test("test-message-skipping.py"), | 369 | Test("test_message_skipping.py"), |
| 370 | Test("test-no-heartbeat.py"), | 370 | Test("test_no_heartbeat.py"), |
| 371 | Test("test-record-layer-fragmentation.py"), | 371 | Test("test_record_layer_fragmentation.py"), |
| 372 | Test("test-sslv2-connection.py"), | 372 | Test("test_sslv2_connection.py"), |
| 373 | Test("test-truncating-of-finished.py"), | 373 | Test("test_truncating_of_finished.py"), |
| 374 | Test("test-truncating-of-kRSA-client-key-exchange.py"), | 374 | Test("test_truncating_of_kRSA_client_key_exchange.py"), |
| 375 | Test("test-unsupported-curve-fallback.py"), | 375 | Test("test_unsupported_curve_fallback.py"), |
| 376 | Test("test-version-numbers.py"), | 376 | Test("test_version_numbers.py"), |
| 377 | Test("test-zero-length-data.py"), | 377 | Test("test_zero_length_data.py"), |
| 378 | 378 | ||
| 379 | # Tests that need tweaking for unsupported features and ciphers. | 379 | # Tests that need tweaking for unsupported features and ciphers. |
| 380 | Test( | 380 | Test( |
| 381 | "test-atypical-padding.py", [ | 381 | "test_atypical_padding.py", [ |
| 382 | "-e", "sanity - encrypt then MAC", | 382 | "-e", "sanity - encrypt then MAC", |
| 383 | "-e", "2^14 bytes of AppData with 256 bytes of padding (SHA1 + Encrypt then MAC)", | 383 | "-e", "2^14 bytes of AppData with 256 bytes of padding (SHA1 + Encrypt then MAC)", |
| 384 | ] | 384 | ] |
| 385 | ), | 385 | ), |
| 386 | Test( | 386 | Test( |
| 387 | "test-ccs.py", [ | 387 | "test_ccs.py", [ |
| 388 | "-x", "two bytes long CCS", | 388 | "-x", "two bytes long CCS", |
| 389 | "-X", substitute_alert("unexpected_message", "decode_error"), | 389 | "-X", substitute_alert("unexpected_message", "decode_error"), |
| 390 | ] | 390 | ] |
| 391 | ), | 391 | ), |
| 392 | Test( | 392 | Test( |
| 393 | "test-dhe-rsa-key-exchange-signatures.py", [ | 393 | "test_dhe_rsa_key_exchange_signatures.py", [ |
| 394 | "-e", "TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA sha224 signature", | 394 | "-e", "TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA sha224 signature", |
| 395 | "-e", "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 sha224 signature", | 395 | "-e", "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 sha224 signature", |
| 396 | "-e", "TLS_DHE_RSA_WITH_AES_128_CBC_SHA sha224 signature", | 396 | "-e", "TLS_DHE_RSA_WITH_AES_128_CBC_SHA sha224 signature", |
| @@ -398,14 +398,14 @@ tls12_tests = TestGroup("TLSv1.2 tests", [ | |||
| 398 | "-e", "TLS_DHE_RSA_WITH_AES_256_CBC_SHA sha224 signature", | 398 | "-e", "TLS_DHE_RSA_WITH_AES_256_CBC_SHA sha224 signature", |
| 399 | ] | 399 | ] |
| 400 | ), | 400 | ), |
| 401 | Test("test-dhe-rsa-key-exchange-with-bad-messages.py", [ | 401 | Test("test_dhe_rsa_key_exchange_with_bad_messages.py", [ |
| 402 | "-x", "invalid dh_Yc value - missing", | 402 | "-x", "invalid dh_Yc value - missing", |
| 403 | "-X", substitute_alert("decode_error", "illegal_parameter"), | 403 | "-X", substitute_alert("decode_error", "illegal_parameter"), |
| 404 | ]), | 404 | ]), |
| 405 | Test("test-dhe-key-share-random.py", tls12_exclude_legacy_protocols), | 405 | Test("test_dhe_key_share_random.py", tls12_exclude_legacy_protocols), |
| 406 | Test("test-export-ciphers-rejected.py", ["--min-ver", "TLSv1.2"]), | 406 | Test("test_export_ciphers_rejected.py", ["--min-ver", "TLSv1.2"]), |
| 407 | Test( | 407 | Test( |
| 408 | "test-downgrade-protection.py", | 408 | "test_downgrade_protection.py", |
| 409 | tls12_args = ["--server-max-protocol", "TLSv1.2"], | 409 | tls12_args = ["--server-max-protocol", "TLSv1.2"], |
| 410 | tls13_args = [ | 410 | tls13_args = [ |
| 411 | "--server-max-protocol", "TLSv1.3", | 411 | "--server-max-protocol", "TLSv1.3", |
| @@ -414,7 +414,7 @@ tls12_tests = TestGroup("TLSv1.2 tests", [ | |||
| 414 | ] | 414 | ] |
| 415 | ), | 415 | ), |
| 416 | Test( | 416 | Test( |
| 417 | "test-fallback-scsv.py", | 417 | "test_fallback_scsv.py", |
| 418 | tls13_args = [ | 418 | tls13_args = [ |
| 419 | "--tls-1.3", | 419 | "--tls-1.3", |
| 420 | "-e", "FALLBACK - hello TLSv1.1 - pos 0", | 420 | "-e", "FALLBACK - hello TLSv1.1 - pos 0", |
| @@ -428,7 +428,7 @@ tls12_tests = TestGroup("TLSv1.2 tests", [ | |||
| 428 | ] | 428 | ] |
| 429 | ), | 429 | ), |
| 430 | 430 | ||
| 431 | Test("test-invalid-compression-methods.py", [ | 431 | Test("test_invalid_compression_methods.py", [ |
| 432 | "-x", "invalid compression methods", | 432 | "-x", "invalid compression methods", |
| 433 | "-X", substitute_alert("illegal_parameter", "decode_error"), | 433 | "-X", substitute_alert("illegal_parameter", "decode_error"), |
| 434 | "-x", "only deflate compression method", | 434 | "-x", "only deflate compression method", |
| @@ -437,134 +437,134 @@ tls12_tests = TestGroup("TLSv1.2 tests", [ | |||
| 437 | 437 | ||
| 438 | # Skip extended_master_secret test. Since we don't support this | 438 | # Skip extended_master_secret test. Since we don't support this |
| 439 | # extension, we don't notice that it was dropped. | 439 | # extension, we don't notice that it was dropped. |
| 440 | Test("test-renegotiation-changed-clienthello.py", [ | 440 | Test("test_renegotiation_changed_clienthello.py", [ |
| 441 | "-e", "drop extended_master_secret in renegotiation", | 441 | "-e", "drop extended_master_secret in renegotiation", |
| 442 | ]), | 442 | ]), |
| 443 | 443 | ||
| 444 | Test("test-sessionID-resumption.py", [ | 444 | Test("test_sessionID_resumption.py", [ |
| 445 | "-x", "Client Hello too long session ID", | 445 | "-x", "Client Hello too long session ID", |
| 446 | "-X", substitute_alert("decode_error", "illegal_parameter"), | 446 | "-X", substitute_alert("decode_error", "illegal_parameter"), |
| 447 | ]), | 447 | ]), |
| 448 | 448 | ||
| 449 | # Without --sig-algs-drop-ok, two tests fail since we do not currently | 449 | # Without --sig-algs-drop-ok, two tests fail since we do not currently |
| 450 | # implement the signature_algorithms_cert extension (although we MUST). | 450 | # implement the signature_algorithms_cert extension (although we MUST). |
| 451 | Test("test-sig-algs-renegotiation-resumption.py", ["--sig-algs-drop-ok"]), | 451 | Test("test_sig_algs_renegotiation_resumption.py", ["--sig-algs-drop-ok"]), |
| 452 | 452 | ||
| 453 | Test("test-serverhello-random.py", args = tls12_exclude_legacy_protocols), | 453 | Test("test_serverhello_random.py", args = tls12_exclude_legacy_protocols), |
| 454 | 454 | ||
| 455 | Test("test-chacha20.py", [ "-e", "Chacha20 in TLS1.1" ]), | 455 | Test("test_chacha20.py", [ "-e", "Chacha20 in TLS1.1" ]), |
| 456 | ]) | 456 | ]) |
| 457 | 457 | ||
| 458 | tls12_slow_tests = TestGroup("slow TLSv1.2 tests", [ | 458 | tls12_slow_tests = TestGroup("slow TLSv1.2 tests", [ |
| 459 | Test("test-cve-2016-7054.py"), | 459 | Test("test_cve_2016_7054.py"), |
| 460 | Test("test-dhe-no-shared-secret-padding.py", tls12_exclude_legacy_protocols), | 460 | Test("test_dhe_no_shared_secret_padding.py", tls12_exclude_legacy_protocols), |
| 461 | Test("test-ecdhe-padded-shared-secret.py", tls12_exclude_legacy_protocols), | 461 | Test("test_ecdhe_padded_shared_secret.py", tls12_exclude_legacy_protocols), |
| 462 | Test("test-ecdhe-rsa-key-share-random.py", tls12_exclude_legacy_protocols), | 462 | Test("test_ecdhe_rsa_key_share_random.py", tls12_exclude_legacy_protocols), |
| 463 | # Start at extension number 58 to avoid QUIC transport parameters (57) | 463 | # Start at extension number 58 to avoid QUIC transport parameters (57) |
| 464 | Test("test-large-hello.py", [ "-m", "58" ]), | 464 | Test("test_large_hello.py", [ "-m", "58" ]), |
| 465 | ]) | 465 | ]) |
| 466 | 466 | ||
| 467 | tls12_failing_tests = TestGroup("failing TLSv1.2 tests", [ | 467 | tls12_failing_tests = TestGroup("failing TLSv1.2 tests", [ |
| 468 | # no shared cipher | 468 | # no shared cipher |
| 469 | Test("test-aesccm.py"), | 469 | Test("test_aesccm.py"), |
| 470 | # need server to set up alpn | 470 | # need server to set up alpn |
| 471 | Test("test-alpn-negotiation.py"), | 471 | Test("test_alpn_negotiation.py"), |
| 472 | # Failing on TLS_RSA_WITH_AES_128_CBC_SHA because server does not support it. | 472 | # Failing on TLS_RSA_WITH_AES_128_CBC_SHA because server does not support it. |
| 473 | Test("test-bleichenbacher-timing-pregenerate.py"), | 473 | Test("test_bleichenbacher_timing_pregenerate.py"), |
| 474 | # many tests fail due to unexpected server_name extension | 474 | # many tests fail due to unexpected server_name extension |
| 475 | Test("test-bleichenbacher-workaround.py"), | 475 | Test("test_bleichenbacher_workaround.py"), |
| 476 | 476 | ||
| 477 | # need client key and cert plus extra server setup | 477 | # need client key and cert plus extra server setup |
| 478 | Test("test-certificate-malformed.py"), | 478 | Test("test_certificate_malformed.py"), |
| 479 | Test("test-certificate-request.py"), | 479 | Test("test_certificate_request.py"), |
| 480 | Test("test-certificate-verify-malformed-sig.py"), | 480 | Test("test_certificate_verify_malformed_sig.py"), |
| 481 | Test("test-certificate-verify-malformed.py"), | 481 | Test("test_certificate_verify_malformed.py"), |
| 482 | Test("test-certificate-verify.py"), | 482 | Test("test_certificate_verify.py"), |
| 483 | Test("test-ecdsa-in-certificate-verify.py"), | 483 | Test("test_ecdsa_in_certificate_verify.py"), |
| 484 | Test("test-eddsa-in-certificate-verify.py"), | 484 | Test("test_eddsa_in_certificate_verify.py"), |
| 485 | Test("test-renegotiation-disabled-client-cert.py"), | 485 | Test("test_renegotiation_disabled_client_cert.py"), |
| 486 | Test("test-rsa-pss-sigs-on-certificate-verify.py"), | 486 | Test("test_rsa_pss_sigs_on_certificate_verify.py"), |
| 487 | Test("test-rsa-sigs-on-certificate-verify.py"), | 487 | Test("test_rsa_sigs_on_certificate_verify.py"), |
| 488 | 488 | ||
| 489 | # test doesn't expect session ticket | 489 | # test doesn't expect session ticket |
| 490 | Test("test-client-compatibility.py"), | 490 | Test("test_client_compatibility.py"), |
| 491 | # abrupt closure | 491 | # abrupt closure |
| 492 | Test("test-client-hello-max-size.py"), | 492 | Test("test_client_hello_max_size.py"), |
| 493 | # unknown signature algorithms | 493 | # unknown signature algorithms |
| 494 | Test("test-clienthello-md5.py"), | 494 | Test("test_clienthello_md5.py"), |
| 495 | 495 | ||
| 496 | # Tests expect an illegal_parameter or a decode_error alert. Should be | 496 | # Tests expect an illegal_parameter or a decode_error alert. Should be |
| 497 | # added to ssl3_get_client_key_exchange on kex function failure. | 497 | # added to ssl3_get_client_key_exchange on kex function failure. |
| 498 | Test("test-ecdhe-rsa-key-exchange-with-bad-messages.py"), | 498 | Test("test_ecdhe_rsa_key_exchange_with_bad_messages.py"), |
| 499 | 499 | ||
| 500 | # We send a handshake_failure due to no shared ciphers while the | 500 | # We send a handshake_failure due to no shared ciphers while the |
| 501 | # test expects to succeed. | 501 | # test expects to succeed. |
| 502 | Test("test-ecdhe-rsa-key-exchange.py"), | 502 | Test("test_ecdhe_rsa_key_exchange.py"), |
| 503 | 503 | ||
| 504 | # no shared cipher | 504 | # no shared cipher |
| 505 | Test("test-ecdsa-sig-flexibility.py"), | 505 | Test("test_ecdsa_sig_flexibility.py"), |
| 506 | 506 | ||
| 507 | # Tests expect SH but we send unexpected_message or handshake_failure | 507 | # Tests expect SH but we send unexpected_message or handshake_failure |
| 508 | # 'Application data inside Client Hello' | 508 | # 'Application data inside Client Hello' |
| 509 | # 'Application data inside Client Key Exchange' | 509 | # 'Application data inside Client Key Exchange' |
| 510 | # 'Application data inside Finished' | 510 | # 'Application data inside Finished' |
| 511 | Test("test-interleaved-application-data-and-fragmented-handshakes-in-renegotiation.py"), | 511 | Test("test_interleaved_application_data_and_fragmented_handshakes_in_renegotiation.py"), |
| 512 | # Tests expect SH but we send handshake_failure | 512 | # Tests expect SH but we send handshake_failure |
| 513 | # 'Application data before Change Cipher Spec' | 513 | # 'Application data before Change Cipher Spec' |
| 514 | # 'Application data before Client Key Exchange' | 514 | # 'Application data before Client Key Exchange' |
| 515 | # 'Application data before Finished' | 515 | # 'Application data before Finished' |
| 516 | Test("test-interleaved-application-data-in-renegotiation.py"), | 516 | Test("test_interleaved_application_data_in_renegotiation.py"), |
| 517 | 517 | ||
| 518 | # broken test script | 518 | # broken test script |
| 519 | # TypeError: '<' not supported between instances of 'int' and 'NoneType' | 519 | # TypeError: '<' not supported between instances of 'int' and 'NoneType' |
| 520 | Test("test-invalid-client-hello-w-record-overflow.py"), | 520 | Test("test_invalid_client_hello_w_record_overflow.py"), |
| 521 | 521 | ||
| 522 | # Lots of failures. abrupt closure | 522 | # Lots of failures. abrupt closure |
| 523 | Test("test-invalid-client-hello.py"), | 523 | Test("test_invalid_client_hello.py"), |
| 524 | 524 | ||
| 525 | # abrupt closure | 525 | # abrupt closure |
| 526 | # 'encrypted premaster set to all zero (n)' n in 256 384 512 | 526 | # 'encrypted premaster set to all zero (n)' n in 256 384 512 |
| 527 | Test("test-invalid-rsa-key-exchange-messages.py"), | 527 | Test("test_invalid_rsa_key_exchange_messages.py"), |
| 528 | 528 | ||
| 529 | # test expects illegal_parameter, we send unrecognized_name (which seems | 529 | # test expects illegal_parameter, we send unrecognized_name (which seems |
| 530 | # correct according to rfc 6066?) | 530 | # correct according to rfc 6066?) |
| 531 | Test("test-invalid-server-name-extension-resumption.py"), | 531 | Test("test_invalid_server_name_extension_resumption.py"), |
| 532 | # let through some server names without sending an alert | 532 | # let through some server names without sending an alert |
| 533 | # again illegal_parameter vs unrecognized_name | 533 | # again illegal_parameter vs unrecognized_name |
| 534 | Test("test-invalid-server-name-extension.py"), | 534 | Test("test_invalid_server_name_extension.py"), |
| 535 | 535 | ||
| 536 | # 4 failures: | 536 | # 4 failures: |
| 537 | # 'insecure (legacy) renegotiation with GET after 2nd handshake' | 537 | # 'insecure (legacy) renegotiation with GET after 2nd handshake' |
| 538 | # 'insecure (legacy) renegotiation with incomplete GET' | 538 | # 'insecure (legacy) renegotiation with incomplete GET' |
| 539 | # 'secure renegotiation with GET after 2nd handshake' | 539 | # 'secure renegotiation with GET after 2nd handshake' |
| 540 | # 'secure renegotiation with incomplete GET' | 540 | # 'secure renegotiation with incomplete GET' |
| 541 | Test("test-legacy-renegotiation.py"), | 541 | Test("test_legacy_renegotiation.py"), |
| 542 | 542 | ||
| 543 | # 1 failure (timeout): we don't send the unexpected_message alert | 543 | # 1 failure (timeout): we don't send the unexpected_message alert |
| 544 | # 'duplicate change cipher spec after Finished' | 544 | # 'duplicate change cipher spec after Finished' |
| 545 | Test("test-message-duplication.py"), | 545 | Test("test_message_duplication.py"), |
| 546 | 546 | ||
| 547 | # server should send status_request | 547 | # server should send status_request |
| 548 | Test("test-ocsp-stapling.py"), | 548 | Test("test_ocsp_stapling.py"), |
| 549 | 549 | ||
| 550 | # unexpected closure | 550 | # unexpected closure |
| 551 | Test("test-openssl-3712.py"), | 551 | Test("test_openssl_3712.py"), |
| 552 | 552 | ||
| 553 | # failed: 3 (expect an alert, we send AD) | 553 | # failed: 3 (expect an alert, we send AD) |
| 554 | # 'try insecure (legacy) renegotiation with incomplete GET' | 554 | # 'try insecure (legacy) renegotiation with incomplete GET' |
| 555 | # 'try secure renegotiation with GET after 2nd CH' | 555 | # 'try secure renegotiation with GET after 2nd CH' |
| 556 | # 'try secure renegotiation with incomplete GET' | 556 | # 'try secure renegotiation with incomplete GET' |
| 557 | Test("test-renegotiation-disabled.py"), | 557 | Test("test_renegotiation_disabled.py"), |
| 558 | 558 | ||
| 559 | # 'resumption of safe session with NULL cipher' | 559 | # 'resumption of safe session with NULL cipher' |
| 560 | # 'resumption with cipher from old CH but not selected by server' | 560 | # 'resumption with cipher from old CH but not selected by server' |
| 561 | Test("test-resumption-with-wrong-ciphers.py"), | 561 | Test("test_resumption_with_wrong_ciphers.py"), |
| 562 | 562 | ||
| 563 | # 'session resumption with empty session_id' | 563 | # 'session resumption with empty session_id' |
| 564 | # 'session resumption with random session_id' | 564 | # 'session resumption with random session_id' |
| 565 | # 'session resumption with renegotiation' | 565 | # 'session resumption with renegotiation' |
| 566 | # AssertionError: Server did not send extension(s): session_ticket | 566 | # AssertionError: Server did not send extension(s): session_ticket |
| 567 | Test("test-session-ticket-resumption.py"), | 567 | Test("test_session_ticket_resumption.py"), |
| 568 | 568 | ||
| 569 | # 5 failures: | 569 | # 5 failures: |
| 570 | # 'empty sigalgs' | 570 | # 'empty sigalgs' |
| @@ -572,7 +572,7 @@ tls12_failing_tests = TestGroup("failing TLSv1.2 tests", [ | |||
| 572 | # 'rsa_pss_pss_sha256 only' | 572 | # 'rsa_pss_pss_sha256 only' |
| 573 | # 'rsa_pss_pss_sha384 only' | 573 | # 'rsa_pss_pss_sha384 only' |
| 574 | # 'rsa_pss_pss_sha512 only' | 574 | # 'rsa_pss_pss_sha512 only' |
| 575 | Test("test-sig-algs.py"), | 575 | Test("test_sig_algs.py"), |
| 576 | 576 | ||
| 577 | # 13 failures: | 577 | # 13 failures: |
| 578 | # 'duplicated n non-rsa schemes' for n in 202 2342 8119 23741 32744 | 578 | # 'duplicated n non-rsa schemes' for n in 202 2342 8119 23741 32744 |
| @@ -581,51 +581,51 @@ tls12_failing_tests = TestGroup("failing TLSv1.2 tests", [ | |||
| 581 | # 'tolerance 32758 methods with sig_alg_cert' | 581 | # 'tolerance 32758 methods with sig_alg_cert' |
| 582 | # 'tolerance max 32744 number of methods with sig_alg_cert' | 582 | # 'tolerance max 32744 number of methods with sig_alg_cert' |
| 583 | # 'tolerance max (32760) number of methods' | 583 | # 'tolerance max (32760) number of methods' |
| 584 | Test("test-signature-algorithms.py"), | 584 | Test("test_signature_algorithms.py"), |
| 585 | 585 | ||
| 586 | # times out | 586 | # times out |
| 587 | Test("test-ssl-death-alert.py"), | 587 | Test("test_ssl_death_alert.py"), |
| 588 | 588 | ||
| 589 | # 17 pass, 13 fail. padding and truncation | 589 | # 17 pass, 13 fail. padding and truncation |
| 590 | Test("test-truncating-of-client-hello.py"), | 590 | Test("test_truncating_of_client_hello.py"), |
| 591 | 591 | ||
| 592 | # x448 tests need disabling plus x25519 corner cases need sorting out | 592 | # x448 tests need disabling plus x25519 corner cases need sorting out |
| 593 | Test("test-x25519.py"), | 593 | Test("test_x25519.py"), |
| 594 | 594 | ||
| 595 | # Needs TLS 1.0 or 1.1 | 595 | # Needs TLS 1.0 or 1.1 |
| 596 | Test("test-TLSv1_2-rejected-without-TLSv1_2.py"), | 596 | Test("test_TLSv1_2_rejected_without_TLSv1_2.py"), |
| 597 | ]) | 597 | ]) |
| 598 | 598 | ||
| 599 | tls12_unsupported_tests = TestGroup("TLSv1.2 for unsupported features", [ | 599 | tls12_unsupported_tests = TestGroup("TLSv1.2 for unsupported features", [ |
| 600 | # protocol_version | 600 | # protocol_version |
| 601 | Test("test-SSLv3-padding.py"), | 601 | Test("test_SSLv3_padding.py"), |
| 602 | # we don't do RSA key exchanges | 602 | # we don't do RSA key exchanges |
| 603 | Test("test-bleichenbacher-timing.py"), | 603 | Test("test_bleichenbacher_timing.py"), |
| 604 | # no encrypt-then-mac | 604 | # no encrypt-then-mac |
| 605 | Test("test-encrypt-then-mac-renegotiation.py"), | 605 | Test("test_encrypt_then_mac_renegotiation.py"), |
| 606 | Test("test-encrypt-then-mac.py"), | 606 | Test("test_encrypt_then_mac.py"), |
| 607 | # no EME support | 607 | # no EME support |
| 608 | Test("test-extended-master-secret-extension-with-client-cert.py"), | 608 | Test("test_extended_master_secret_extension_with_client_cert.py"), |
| 609 | Test("test-extended-master-secret-extension.py"), | 609 | Test("test_extended_master_secret_extension.py"), |
| 610 | # no ffdhe | 610 | # no ffdhe |
| 611 | Test("test-ffdhe-expected-params.py"), | 611 | Test("test_ffdhe_expected_params.py"), |
| 612 | Test("test-ffdhe-negotiation.py"), | 612 | Test("test_ffdhe_negotiation.py"), |
| 613 | # record_size_limit/max_fragment_length extension (RFC 8449) | 613 | # record_size_limit/max_fragment_length extension (RFC 8449) |
| 614 | Test("test-record-size-limit.py"), | 614 | Test("test_record_size_limit.py"), |
| 615 | # expects the server to send the heartbeat extension | 615 | # expects the server to send the heartbeat extension |
| 616 | Test("test-heartbeat.py"), | 616 | Test("test_heartbeat.py"), |
| 617 | # needs an echo server | 617 | # needs an echo server |
| 618 | Test("test-lengths.py"), | 618 | Test("test_lengths.py"), |
| 619 | ]) | 619 | ]) |
| 620 | 620 | ||
| 621 | # These tests take a ton of time to fail against an 1.3 server, | 621 | # These tests take a ton of time to fail against an 1.3 server, |
| 622 | # so don't run them against 1.3 pending further investigation. | 622 | # so don't run them against 1.3 pending further investigation. |
| 623 | legacy_tests = TestGroup("Legacy protocol tests", [ | 623 | legacy_tests = TestGroup("Legacy protocol tests", [ |
| 624 | Test("test-sslv2-force-cipher-3des.py"), | 624 | Test("test_sslv2_force_cipher_3des.py"), |
| 625 | Test("test-sslv2-force-cipher-non3des.py"), | 625 | Test("test_sslv2_force_cipher_non3des.py"), |
| 626 | Test("test-sslv2-force-cipher.py"), | 626 | Test("test_sslv2_force_cipher.py"), |
| 627 | Test("test-sslv2-force-export-cipher.py"), | 627 | Test("test_sslv2_force_export_cipher.py"), |
| 628 | Test("test-sslv2hello-protocol.py"), | 628 | Test("test_sslv2hello_protocol.py"), |
| 629 | ]) | 629 | ]) |
| 630 | 630 | ||
| 631 | all_groups = [ | 631 | all_groups = [ |
diff --git a/src/regress/lib/libssl/unit/Makefile b/src/regress/lib/libssl/unit/Makefile index 6a925069ca..edc0d910c4 100644 --- a/src/regress/lib/libssl/unit/Makefile +++ b/src/regress/lib/libssl/unit/Makefile | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.16 2023/05/24 09:15:14 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.17 2025/10/24 11:44:08 tb Exp $ |
| 2 | 2 | ||
| 3 | PROGS += cipher_list | 3 | PROGS += cipher_list |
| 4 | PROGS += ssl_get_shared_ciphers | 4 | PROGS += ssl_get_shared_ciphers |
| @@ -16,6 +16,4 @@ CFLAGS+= -DLIBRESSL_INTERNAL -Wall -Wundef -Werror | |||
| 16 | CFLAGS+= -DCERTSDIR=\"${.CURDIR}/../certs\" | 16 | CFLAGS+= -DCERTSDIR=\"${.CURDIR}/../certs\" |
| 17 | CFLAGS+= -I${.CURDIR}/../../../../lib/libssl | 17 | CFLAGS+= -I${.CURDIR}/../../../../lib/libssl |
| 18 | 18 | ||
| 19 | LDADD_ssl_verify_param = ${LIBSSL} ${CRYPTO_INT} | ||
| 20 | |||
| 21 | .include <bsd.regress.mk> | 19 | .include <bsd.regress.mk> |
diff --git a/src/regress/lib/libssl/unit/ssl_verify_param.c b/src/regress/lib/libssl/unit/ssl_verify_param.c index cdb52c56a8..05af9be2be 100644 --- a/src/regress/lib/libssl/unit/ssl_verify_param.c +++ b/src/regress/lib/libssl/unit/ssl_verify_param.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ssl_verify_param.c,v 1.1 2023/05/24 08:54:59 tb Exp $ */ | 1 | /* $OpenBSD: ssl_verify_param.c,v 1.3 2025/10/24 11:43:34 tb Exp $ */ |
| 2 | 2 | ||
| 3 | /* | 3 | /* |
| 4 | * Copyright (c) 2023 Theo Buehler <tb@openbsd.org> | 4 | * Copyright (c) 2023 Theo Buehler <tb@openbsd.org> |
| @@ -20,10 +20,9 @@ | |||
| 20 | #include <stdio.h> | 20 | #include <stdio.h> |
| 21 | 21 | ||
| 22 | #include <openssl/ssl.h> | 22 | #include <openssl/ssl.h> |
| 23 | #include <openssl/x509_vfy.h> | ||
| 23 | #include <openssl/x509v3.h> | 24 | #include <openssl/x509v3.h> |
| 24 | 25 | ||
| 25 | unsigned int X509_VERIFY_PARAM_get_hostflags(X509_VERIFY_PARAM *param); | ||
| 26 | |||
| 27 | static int | 26 | static int |
| 28 | ssl_verify_param_flags_inherited(void) | 27 | ssl_verify_param_flags_inherited(void) |
| 29 | { | 28 | { |
