]> git.kaiwu.me - haproxy.git/commit
MINOR: ech: introduce an ech_store type and helpers in load_echkeys()
authorWilliam Lallemand <wlallemand@haproxy.com>
Fri, 31 Jul 2026 15:26:21 +0000 (15:26 +0000)
committerWilliam Lallemand <wlallemand@haproxy.com>
Mon, 3 Aug 2026 12:42:31 +0000 (14:42 +0200)
commit744a7751452d9dc387254a879203a3a36e895b6d
treeafbb2acae7d9eebee1ce59b05e8b598a40db7590
parentdcc1b7f9b61187f79af7940d0f5954586122c44d
MINOR: ech: introduce an ech_store type and helpers in load_echkeys()

Alias OSSL_ECHSTORE as ech_store, and wrap OSSL_ECHSTORE_new(),
OSSL_ECHSTORE_free(), SSL_CTX_set1_echstore() and the per-file PEM
loading loop behind ech_store_new(), ech_store_free(),
ech_store_set_ctx() and ech_store_load_file(). Use them in
load_echkeys() instead of the OpenSSL calls directly.

ech_store_load_file() no longer reads strerror(errno) to explain a
BIO_new_file() failure: that function records the fopen() failure
reason in the crypto library's error queue, not in errno.
load_echkeys() already drains that queue into *err on any failure, so
just keeping the message filename-only here is enough to get the real
reason appended.

This is pure preparation with no functional change otherwise: a
following commit will give ech_store and these four helpers an
AWS-LC-specific body, so that load_echkeys() can be shared between the
two SSL libraries.
src/ech.c