MINOR: ssl/cli: assignate a new ckch_store
authorWilliam Lallemand <wlallemand@haproxy.com>
Fri, 18 Oct 2019 09:27:07 +0000 (11:27 +0200)
committerWilliam Lallemand <wlallemand@haproxy.org>
Wed, 23 Oct 2019 09:54:51 +0000 (11:54 +0200)
commit0c3b7d9e1c4f0a0418003a4e8e61c81020bdbec6
treebe78d896a8ae45fc75c9fcacd9f5dc19a28db0da
parent8c1cddef6dc9a8addd9cdc60b28a132402e2c53e
MINOR: ssl/cli: assignate a new ckch_store

When updating a certificate from the CLI, it is not possible to revert
some of the changes if part of the certicate update failed. We now
creates a copy of the ckch_store for the changes so we can revert back
if something goes wrong.

Even if the ckch_store was affected before this change, it wasn't
affecting the SSL_CTXs used for the traffic. It was only a problem if we
try to update a certificate after we failed to do it the first time.

The new ckch_store is also linked to the new sni_ctxs so it's easy to
insert the sni_ctxs before removing the old ones.
src/ssl_sock.c