]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: ssl: rework add cert chain to CTX to be libssl independent
authorEmmanuel Hocdet <manu@gandi.net>
Fri, 28 Feb 2020 15:00:34 +0000 (16:00 +0100)
committerWilliam Lallemand <wlallemand@haproxy.org>
Tue, 24 Mar 2020 13:46:01 +0000 (14:46 +0100)
commit4fed93eb725b513dd3b2029daa888311db110851
tree2ec0b3bced6e3da484b715fc9e32219d5c123f0c
parentef87e0a3da37094ad0284700bacca89c5213b3ab
MINOR: ssl: rework add cert chain to CTX to be libssl independent

SSL_CTX_set1_chain is used for openssl >= 1.0.2 and a loop with
SSL_CTX_add_extra_chain_cert for openssl < 1.0.2.
SSL_CTX_add_extra_chain_cert exist with openssl >= 1.0.2 and can be
used for all openssl version (is new name is SSL_CTX_add0_chain_cert).
This patch use SSL_CTX_add_extra_chain_cert to remove any #ifdef for
compatibilty. In addition sk_X509_num()/sk_X509_value() replace
sk_X509_shift() to extract CA from chain, as it is used in others part
of the code.
src/ssl_sock.c