]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: ssl: Update ssl_fc_curve/ssl_bc_curve to use SSL_get0_group_name
authorMariam John <john.mariam.oss@gmail.com>
Fri, 29 Dec 2023 17:14:41 +0000 (11:14 -0600)
committerWilliam Lallemand <wlallemand@haproxy.com>
Tue, 9 Jan 2024 10:53:21 +0000 (11:53 +0100)
commit25da2174c62b536b00bc5b0c0bb64ae95fd826b9
tree6d23a5e979b35f84adf639774aa9e309223f006c
parent86298c6913fabb5dba48aeaa9befcd957e2e8ccf
MINOR: ssl: Update ssl_fc_curve/ssl_bc_curve to use SSL_get0_group_name

The function `smp_fetch_ssl_fc_ec` gets the curve name used during key
exchange. It currently uses the `SSL_get_negotiated_group`, available
since OpenSSLv3.0 to get the nid and derive the short name of the curve
from the nid. In OpenSSLv3.2, a new function, `SSL_get0_group_name` was
added that directly gives the curve name.

The function `smp_fetch_ssl_fc_ec` has been updated to use
`SSL_get0_group_name` if using OpenSSL>=3.2 and for versions >=3.0 and <
3.2 use the old SSL_get_negotiated_group to get the curve name. Another
change made is to normalize the return value, so that
`smp_fetch_ssl_fc_ec` returns curve name in uppercase.
(`SSL_get0_group_name` returns the curve name in lowercase and
`SSL_get_negotiated_group` + `OBJ_nid2sn` returns curve name in
uppercase).

Can be backported to 2.8.
src/ssl_sample.c