]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MINOR: ssl: fix management of the cache where forged certificates are stored
authorChristopher Faulet <cfaulet@qualys.com>
Tue, 28 Jul 2015 14:03:47 +0000 (16:03 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 9 Oct 2015 08:20:53 +0000 (10:20 +0200)
commitd2cab92e75debdb7008fda9f94773d0c45758058
treea21749132fd5e29cf2e4a87fe615874a81aae66c
parentd57ad648735d228a3fb238d18aa31adfb42e791c
BUG/MINOR: ssl: fix management of the cache where forged certificates are stored

First, the LRU cache must be initialized after the configuration parsing to
correctly set its size.
Next, the function 'ssl_sock_set_generated_cert' returns -1 when an error occurs
(0 if success). In that case, the caller is responsible to free the memory
allocated for the certificate.
Finally, when a SSL certificate is generated by HAProxy but cannot be inserted
in the cache, it must be freed when the SSL connection is closed. This happens
when 'tune.ssl.ssl-ctx-cache-size' is set to 0.
include/proto/ssl_sock.h
src/ssl_sock.c