diff options
| author | tb <> | 2022-07-02 16:01:56 +0000 |
|---|---|---|
| committer | tb <> | 2022-07-02 16:01:56 +0000 |
| commit | ef99055644809bf9803db0f1022b2a923a0e3236 (patch) | |
| tree | e8d96e40c99ab14e8e0ca921fb196ed3ee47f859 /src | |
| parent | 9c3b0c8dc2d9f6d2b9cb9cb675e49a1a04d021b8 (diff) | |
| download | openbsd-ef99055644809bf9803db0f1022b2a923a0e3236.tar.gz openbsd-ef99055644809bf9803db0f1022b2a923a0e3236.tar.bz2 openbsd-ef99055644809bf9803db0f1022b2a923a0e3236.zip | |
Adjust to new tls1_ec_nid2group_id API.
Diffstat (limited to 'src')
| -rw-r--r-- | src/regress/lib/libssl/tlsext/tlsexttest.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/regress/lib/libssl/tlsext/tlsexttest.c b/src/regress/lib/libssl/tlsext/tlsexttest.c index 8166b883b8..5362061783 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.64 2022/06/29 17:39:21 beck Exp $ */ | 1 | /* $OpenBSD: tlsexttest.c,v 1.65 2022/07/02 16:01:56 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2017 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2017 Joel Sing <jsing@openbsd.org> |
| 4 | * Copyright (c) 2017 Doug Hogan <doug@openbsd.org> | 4 | * Copyright (c) 2017 Doug Hogan <doug@openbsd.org> |
| @@ -479,7 +479,7 @@ static uint8_t tlsext_supportedgroups_client_default[] = { | |||
| 479 | }; | 479 | }; |
| 480 | 480 | ||
| 481 | static uint16_t tlsext_supportedgroups_client_secp384r1_val[] = { | 481 | static uint16_t tlsext_supportedgroups_client_secp384r1_val[] = { |
| 482 | 0x0018 /* tls1_ec_nid2curve_id(NID_secp384r1) */ | 482 | 0x0018 /* tls1_ec_nid2group_id(NID_secp384r1) */ |
| 483 | }; | 483 | }; |
| 484 | static uint8_t tlsext_supportedgroups_client_secp384r1[] = { | 484 | static uint8_t tlsext_supportedgroups_client_secp384r1[] = { |
| 485 | 0x00, 0x02, | 485 | 0x00, 0x02, |
| @@ -488,8 +488,8 @@ static uint8_t tlsext_supportedgroups_client_secp384r1[] = { | |||
| 488 | 488 | ||
| 489 | /* Example from RFC 4492 section 5.1.1 */ | 489 | /* Example from RFC 4492 section 5.1.1 */ |
| 490 | static uint16_t tlsext_supportedgroups_client_nistp192and224_val[] = { | 490 | static uint16_t tlsext_supportedgroups_client_nistp192and224_val[] = { |
| 491 | 0x0013, /* tls1_ec_nid2curve_id(NID_X9_62_prime192v1) */ | 491 | 0x0013, /* tls1_ec_nid2group_id(NID_X9_62_prime192v1) */ |
| 492 | 0x0015 /* tls1_ec_nid2curve_id(NID_secp224r1) */ | 492 | 0x0015 /* tls1_ec_nid2group_id(NID_secp224r1) */ |
| 493 | }; | 493 | }; |
| 494 | static uint8_t tlsext_supportedgroups_client_nistp192and224[] = { | 494 | static uint8_t tlsext_supportedgroups_client_nistp192and224[] = { |
| 495 | 0x00, 0x04, | 495 | 0x00, 0x04, |
| @@ -562,7 +562,9 @@ test_tlsext_supportedgroups_client(void) | |||
| 562 | FAIL("client could not malloc\n"); | 562 | FAIL("client could not malloc\n"); |
| 563 | goto err; | 563 | goto err; |
| 564 | } | 564 | } |
| 565 | ssl->session->tlsext_supportedgroups[0] = tls1_ec_nid2curve_id(NID_secp384r1); | 565 | if (!tls1_ec_nid2group_id(NID_secp384r1, |
| 566 | &ssl->session->tlsext_supportedgroups[0])) | ||
| 567 | goto err; | ||
| 566 | ssl->session->tlsext_supportedgroups_length = 1; | 568 | ssl->session->tlsext_supportedgroups_length = 1; |
| 567 | 569 | ||
| 568 | if (!tlsext_supportedgroups_client_needs(ssl, SSL_TLSEXT_MSG_CH)) { | 570 | if (!tlsext_supportedgroups_client_needs(ssl, SSL_TLSEXT_MSG_CH)) { |
| @@ -650,8 +652,12 @@ test_tlsext_supportedgroups_client(void) | |||
| 650 | FAIL("client could not malloc\n"); | 652 | FAIL("client could not malloc\n"); |
| 651 | goto err; | 653 | goto err; |
| 652 | } | 654 | } |
| 653 | ssl->internal->tlsext_supportedgroups[0] = tls1_ec_nid2curve_id(NID_X9_62_prime192v1); | 655 | if (!tls1_ec_nid2group_id(NID_X9_62_prime192v1, |
| 654 | ssl->internal->tlsext_supportedgroups[1] = tls1_ec_nid2curve_id(NID_secp224r1); | 656 | &ssl->internal->tlsext_supportedgroups[0])) |
| 657 | goto err; | ||
| 658 | if (!tls1_ec_nid2group_id(NID_secp224r1, | ||
| 659 | &ssl->internal->tlsext_supportedgroups[1])) | ||
| 660 | goto err; | ||
| 655 | ssl->internal->tlsext_supportedgroups_length = 2; | 661 | ssl->internal->tlsext_supportedgroups_length = 2; |
| 656 | 662 | ||
| 657 | if (!tlsext_supportedgroups_client_needs(ssl, SSL_TLSEXT_MSG_CH)) { | 663 | if (!tlsext_supportedgroups_client_needs(ssl, SSL_TLSEXT_MSG_CH)) { |
