]> git.ipfire.org Git - thirdparty/openssl.git/commit
ssl/statem: write 16-bit ECDHE group id in SKE
authorJoshua Rogers <MegaManSec@users.noreply.github.com>
Fri, 10 Oct 2025 16:48:52 +0000 (00:48 +0800)
committerTomas Mraz <tomas@openssl.org>
Fri, 17 Oct 2025 17:16:35 +0000 (19:16 +0200)
commitadef53334dc912b119bba1f64be3dba91f95cd63
treed337aaa7f2e5affaa5c51ed3f4f5fd3119cf00a8
parent7ef3f154d24d11101bac42afc24abe165cbd4f5e
ssl/statem: write 16-bit ECDHE group id in SKE

tls_construct_server_key_exchange wrote the named group as two u8 bytes with the high byte set to 0. TLS requires a 16-bit NamedGroup. Use WPACKET_put_bytes_u16(curve_id) so ids >= 256 are encoded correctly. No change for groups < 256.

Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28835)
ssl/statem/statem_srvr.c