mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-22 06:11:32 +02:00
BUILD: ssl: fix latest LibreSSL reg-test error
starting with OpenSSL 1.0.0 recommended way to disable compression is using SSL_OP_NO_COMPRESSION when creating context. manipulations with SSL_COMP_get_compression_methods, sk_SSL_COMP_num are only required for OpenSSL < 1.0.0
This commit is contained in:
parent
08e2b41e81
commit
0590f44254
@ -9701,8 +9701,10 @@ static void ssl_sock_capture_free_func(void *parent, void *ptr, CRYPTO_EX_DATA *
|
|||||||
__attribute__((constructor))
|
__attribute__((constructor))
|
||||||
static void __ssl_sock_init(void)
|
static void __ssl_sock_init(void)
|
||||||
{
|
{
|
||||||
|
#if (!defined(OPENSSL_NO_COMP) && !defined(SSL_OP_NO_COMPRESSION))
|
||||||
STACK_OF(SSL_COMP)* cm;
|
STACK_OF(SSL_COMP)* cm;
|
||||||
int n;
|
int n;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (global_ssl.listen_default_ciphers)
|
if (global_ssl.listen_default_ciphers)
|
||||||
global_ssl.listen_default_ciphers = strdup(global_ssl.listen_default_ciphers);
|
global_ssl.listen_default_ciphers = strdup(global_ssl.listen_default_ciphers);
|
||||||
@ -9719,11 +9721,13 @@ static void __ssl_sock_init(void)
|
|||||||
#if HA_OPENSSL_VERSION_NUMBER < 0x10100000L
|
#if HA_OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||||
SSL_library_init();
|
SSL_library_init();
|
||||||
#endif
|
#endif
|
||||||
|
#if (!defined(OPENSSL_NO_COMP) && !defined(SSL_OP_NO_COMPRESSION))
|
||||||
cm = SSL_COMP_get_compression_methods();
|
cm = SSL_COMP_get_compression_methods();
|
||||||
n = sk_SSL_COMP_num(cm);
|
n = sk_SSL_COMP_num(cm);
|
||||||
while (n--) {
|
while (n--) {
|
||||||
(void) sk_SSL_COMP_pop(cm);
|
(void) sk_SSL_COMP_pop(cm);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(USE_THREAD) && (HA_OPENSSL_VERSION_NUMBER < 0x10100000L)
|
#if defined(USE_THREAD) && (HA_OPENSSL_VERSION_NUMBER < 0x10100000L)
|
||||||
ssl_locking_init();
|
ssl_locking_init();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user