]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MEDIUM: httpclient: initialize the httpclient with default SSL values master
authorWilliam Lallemand <wlallemand@haproxy.com>
Fri, 26 Jun 2026 15:07:51 +0000 (17:07 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Fri, 26 Jun 2026 15:25:50 +0000 (17:25 +0200)
The current httpclient implementation does not initialize its server
with the options from the global section: ciphers, ciphersuites and
various SSL options are always the default of the SSL library.

This patch changes the behavior and apply the ssl-default-server-*
keywords to the httpclient SSL server.

src/http_client.c

index fa205f0f0b04fbf16edb7ec09b85809728e63aef..c1aa994045ce0d3ae22f07db26d570b5c6486120 100644 (file)
@@ -1189,6 +1189,12 @@ struct proxy *httpclient_create_proxy(const char *id)
                goto err;
        }
 #endif
+       if (ssl_sock_init_srv(srv_ssl)) {
+               memprintf(&errmsg, "out of memory.");
+               err_code |= ERR_ALERT | ERR_FATAL;
+               goto err;
+       }
+
        srv_ssl->ssl_ctx.verify = httpclient_ssl_verify;
        /* if the verify is required, try to load the system CA */
        if (httpclient_ssl_verify == SSL_SOCK_VERIFY_REQUIRED) {