]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: ssl/ckch: make the ckch_conf more generic
authorWilliam Lallemand <wlallemand@haproxy.com>
Wed, 19 Mar 2025 16:43:15 +0000 (17:43 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Wed, 19 Mar 2025 17:08:40 +0000 (18:08 +0100)
commit2fb627091033881256aa4057385ceeea692927c0
tree2c313c4aa992822999623d91d369cb1af6b3b3e3
parentb0ad777902c8e51b127c275b3961e7baba14ec12
MEDIUM: ssl/ckch: make the ckch_conf more generic

The ckch_store_load_files() function makes specific processing for
PARSE_TYPE_STR as if it was a type only used for paths.

This patch changes a little bit the way it's done,
PARSE_TYPE_STR is only meant to strdup() a string and stores the
resulting pointer in the ckch_conf structure.

Any processing regarding the path is now done in the callback.

Since the callbacks were basically doing the same thing, they were
transformed into the DECLARE_CKCH_CONF_LOAD() macros which allows to
do some templating of these functions.

The resulting ckch_conf_load_* functions will do the same as before,
except they will also do the path processing instead of letting
ckch_store_load_files() do it, which means we don't need the "base"
member anymore in the struct ckch_conf_kws.
include/haproxy/ssl_ckch-t.h
include/haproxy/ssl_ckch.h
src/ssl_ckch.c