diff options
| author | tb <> | 2026-06-08 11:38:04 +0000 |
|---|---|---|
| committer | tb <> | 2026-06-08 11:38:04 +0000 |
| commit | baa9a5c738f68f3c75ae79a408cabd4e9ea2d12c (patch) | |
| tree | e3b4a1d8acc0622b9493cd5322db2774b4e8e3af /src/lib | |
| parent | 1091a3721fde40f0f1c76e8cef8455c495204356 (diff) | |
| download | openbsd-baa9a5c738f68f3c75ae79a408cabd4e9ea2d12c.tar.gz openbsd-baa9a5c738f68f3c75ae79a408cabd4e9ea2d12c.tar.bz2 openbsd-baa9a5c738f68f3c75ae79a408cabd4e9ea2d12c.zip | |
Add a decode_error argument to ssl_kex_peer_public_ecdhe_ecp()
ok jsing kenjiro
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/libssl/ssl_kex.c | 5 | ||||
| -rw-r--r-- | src/lib/libssl/ssl_local.h | 5 | ||||
| -rw-r--r-- | src/lib/libssl/tls_key_share.c | 9 |
3 files changed, 11 insertions, 8 deletions
diff --git a/src/lib/libssl/ssl_kex.c b/src/lib/libssl/ssl_kex.c index 9f7e471fe7..ad69b2f485 100644 --- a/src/lib/libssl/ssl_kex.c +++ b/src/lib/libssl/ssl_kex.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ssl_kex.c,v 1.13 2026/06/07 02:36:04 tb Exp $ */ | 1 | /* $OpenBSD: ssl_kex.c,v 1.14 2026/06/08 11:38:04 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2020, 2021 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2020, 2021 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -356,7 +356,8 @@ ssl_kex_public_ecdhe_ecp(EC_KEY *ecdh, CBB *cbb) | |||
| 356 | } | 356 | } |
| 357 | 357 | ||
| 358 | int | 358 | int |
| 359 | ssl_kex_peer_public_ecdhe_ecp(EC_KEY *ecdh, int nid, CBS *cbs) | 359 | ssl_kex_peer_public_ecdhe_ecp(EC_KEY *ecdh, int nid, CBS *cbs, |
| 360 | int *decode_error) | ||
| 360 | { | 361 | { |
| 361 | EC_GROUP *group = NULL; | 362 | EC_GROUP *group = NULL; |
| 362 | EC_POINT *point = NULL; | 363 | EC_POINT *point = NULL; |
diff --git a/src/lib/libssl/ssl_local.h b/src/lib/libssl/ssl_local.h index 95913f81a6..9999d55963 100644 --- a/src/lib/libssl/ssl_local.h +++ b/src/lib/libssl/ssl_local.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ssl_local.h,v 1.41 2026/06/06 15:08:15 jsing Exp $ */ | 1 | /* $OpenBSD: ssl_local.h,v 1.42 2026/06/08 11:38:04 tb Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -1336,7 +1336,8 @@ int ssl_kex_derive_dhe(DH *dh, DH *dh_peer, | |||
| 1336 | int ssl_kex_dummy_ecdhe_x25519(EVP_PKEY *pkey); | 1336 | int ssl_kex_dummy_ecdhe_x25519(EVP_PKEY *pkey); |
| 1337 | int ssl_kex_generate_ecdhe_ecp(EC_KEY *ecdh, int nid); | 1337 | int ssl_kex_generate_ecdhe_ecp(EC_KEY *ecdh, int nid); |
| 1338 | int ssl_kex_public_ecdhe_ecp(EC_KEY *ecdh, CBB *cbb); | 1338 | int ssl_kex_public_ecdhe_ecp(EC_KEY *ecdh, CBB *cbb); |
| 1339 | int ssl_kex_peer_public_ecdhe_ecp(EC_KEY *ecdh, int nid, CBS *cbs); | 1339 | int ssl_kex_peer_public_ecdhe_ecp(EC_KEY *ecdh, int nid, CBS *cbs, |
| 1340 | int *decode_error); | ||
| 1340 | int ssl_kex_derive_ecdhe_ecp(EC_KEY *ecdh, EC_KEY *ecdh_peer, | 1341 | int ssl_kex_derive_ecdhe_ecp(EC_KEY *ecdh, EC_KEY *ecdh_peer, |
| 1341 | uint8_t **shared_key, size_t *shared_key_len); | 1342 | uint8_t **shared_key, size_t *shared_key_len); |
| 1342 | 1343 | ||
diff --git a/src/lib/libssl/tls_key_share.c b/src/lib/libssl/tls_key_share.c index 48b353d318..adaf147584 100644 --- a/src/lib/libssl/tls_key_share.c +++ b/src/lib/libssl/tls_key_share.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: tls_key_share.c,v 1.11 2026/05/06 15:02:51 jsing Exp $ */ | 1 | /* $OpenBSD: tls_key_share.c,v 1.12 2026/06/08 11:38:04 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2020, 2021 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2020, 2021 Joel Sing <jsing@openbsd.org> |
| 4 | * | 4 | * |
| @@ -491,7 +491,8 @@ tls_key_share_peer_public_dhe(struct tls_key_share *ks, CBS *cbs, | |||
| 491 | } | 491 | } |
| 492 | 492 | ||
| 493 | static int | 493 | static int |
| 494 | tls_key_share_peer_public_ecdhe_ecp(struct tls_key_share *ks, CBS *cbs) | 494 | tls_key_share_peer_public_ecdhe_ecp(struct tls_key_share *ks, CBS *cbs, |
| 495 | int *decode_error) | ||
| 495 | { | 496 | { |
| 496 | EC_KEY *ecdhe = NULL; | 497 | EC_KEY *ecdhe = NULL; |
| 497 | int ret = 0; | 498 | int ret = 0; |
| @@ -501,7 +502,7 @@ tls_key_share_peer_public_ecdhe_ecp(struct tls_key_share *ks, CBS *cbs) | |||
| 501 | 502 | ||
| 502 | if ((ecdhe = EC_KEY_new()) == NULL) | 503 | if ((ecdhe = EC_KEY_new()) == NULL) |
| 503 | goto err; | 504 | goto err; |
| 504 | if (!ssl_kex_peer_public_ecdhe_ecp(ecdhe, ks->nid, cbs)) | 505 | if (!ssl_kex_peer_public_ecdhe_ecp(ecdhe, ks->nid, cbs, decode_error)) |
| 505 | goto err; | 506 | goto err; |
| 506 | 507 | ||
| 507 | ks->ecdhe_peer = ecdhe; | 508 | ks->ecdhe_peer = ecdhe; |
| @@ -625,7 +626,7 @@ tls_key_share_peer_public(struct tls_key_share *ks, CBS *cbs, int *decode_error, | |||
| 625 | if (ks->nid == NID_X25519) | 626 | if (ks->nid == NID_X25519) |
| 626 | return tls_key_share_peer_public_x25519(ks, cbs, decode_error); | 627 | return tls_key_share_peer_public_x25519(ks, cbs, decode_error); |
| 627 | 628 | ||
| 628 | return tls_key_share_peer_public_ecdhe_ecp(ks, cbs); | 629 | return tls_key_share_peer_public_ecdhe_ecp(ks, cbs, decode_error); |
| 629 | } | 630 | } |
| 630 | 631 | ||
| 631 | /* Called from client to process a server peer */ | 632 | /* Called from client to process a server peer */ |
