]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUG/MINOR: ssl: support tune.ssl.cachesize 0 again
authorWilliam Lallemand <wlallemand@haproxy.com>
Mon, 4 Dec 2017 17:46:39 +0000 (18:46 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 4 Dec 2017 17:48:26 +0000 (18:48 +0100)
Since the split of the shctx and the ssl cache, we lost the ability to
disable the cache with tune.ssl.cachesize 0.

Worst than that, when using this configuration, haproxy segfaults during
the configuration parsing.

Must be backported to 1.8.

src/ssl_sock.c

index da1aecbccd280b1fb10abadd45c42ccc8554e5f9..4741be11c577734d0e476925560cd871e3f9550d 100644 (file)
@@ -4705,7 +4705,7 @@ int ssl_sock_prepare_bind_conf(struct bind_conf *bind_conf)
                        return -1;
                }
        }
-       if (!ssl_shctx) {
+       if (!ssl_shctx && global.tune.sslcachesize) {
                alloc_ctx = shctx_init(&ssl_shctx, global.tune.sslcachesize,
                                       sizeof(struct sh_ssl_sess_hdr) + SHSESS_BLOCK_MIN_SIZE,
                                       sizeof(*sh_ssl_sess_tree),