]> git.kaiwu.me - haproxy.git/commit
BUG/MINOR: ssl: don't uppercase the native group name
authorWilliam Lallemand <wlallemand@haproxy.com>
Mon, 5 Oct 2026 16:21:29 +0000 (16:21 +0000)
committerWilliam Lallemand <wlallemand@irq6.net>
Tue, 6 Oct 2026 13:39:56 +0000 (15:39 +0200)
commitfde74a992dc52be98e08b1fa64efc774528e3fa7
treebb7efbcd876e97f7745a82fcbde4d48b18df22f8
parent4321fcc5591f7081b7caf75fc0ed97a5d40c5c86
BUG/MINOR: ssl: don't uppercase the native group name

The change to SSL_get0_group_name() assumed that its output differed
from SSL_get_negotiated_group() followed by OBJ_nid2sn() only in
case. This is true for x25519/X25519 and x448/X448, but cannot be
generalized to other groups.

For P-256, the APIs return secp256r1 and prime256v1 respectively:
these are aliases, not a case difference. For P-384 and P-521, both
APIs already return secp384r1 and secp521r1, so uppercasing actually
introduces a mismatch. It also changes native mixed-case hybrid names
such as SecP256r1MLKEM768.

Moreover, SSL_get0_group_name() returns a library-owned string shared
through the SSL_CTX. Uppercasing it in place modifies OpenSSL state
and risks concurrent access to that string.

Remove the uppercase conversion and return the native name unchanged.

This should not be backported as it would could break matching of the
curves.
reg-tests/ssl/ssl_curve_name.vtci
reg-tests/ssl/ssl_curves_selection.vtci
src/ssl_sample.c