]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: ssl: split ssl_sock_add_cert_sni()
authorWilliam Lallemand <wlallemand@haproxy.com>
Thu, 3 Oct 2019 22:53:29 +0000 (00:53 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Fri, 11 Oct 2019 15:32:03 +0000 (17:32 +0200)
commit1d29c7438e24a8e7d30aabe9282cf479a07a89f2
treeabd58d342cac916efd0880e3936d434887125a09
parent9117de9e370f6b8d178dc987f47dab685dec9655
MEDIUM: ssl: split ssl_sock_add_cert_sni()

In order to allow the creation of sni_ctx in runtime, we need to split
the function to allow rollback.

We need to be able to allocate all sni_ctxs required before inserting
them in case we need to rollback if we didn't succeed the allocation.

The function was splitted in 2 parts.

The first one ckch_inst_add_cert_sni() allocates a struct sni_ctx, fill
it with the right data and insert it in the ckch_inst's list of sni_ctx.

The second will take every sni_ctx in the ckch_inst and insert them in
the bind_conf's sni tree.
include/types/ssl_sock.h
src/ssl_sock.c