]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: ssl/ckch: certificates generation from "load" "crt-store" directive
authorFrederic Lecaille <flecaille@haproxy.com>
Mon, 26 Jan 2026 15:05:35 +0000 (16:05 +0100)
committerFrederic Lecaille <flecaille@haproxy.com>
Thu, 29 Jan 2026 19:41:17 +0000 (20:41 +0100)
commit7ec872467f4354737cf8096826280f4419b925ad
treef37d52638cc3101d5e828578347c2131d1fafd85
parent714131f6a6d823f7819ce7e4dcbbd071f844db26
MINOR: ssl/ckch: certificates generation from "load" "crt-store" directive

Add "generate" on/off type keyword to "load" directive to automatically generate
certificates as this is done for ACME from ckch_conf_load_pem_or_generate()
function which is called if a "crt" keyword is also provide for this directive.

Also implement "keytype" to specify the key type used for these certificates.
Only "RSA" or "ECDSA" is accepted. This patch also implements "bits" keyword
for the "load" directive to specify the private key size used for RSA. For
ECDSA, a new "curves" keyword is also provided by this patch to specify the curves
to be used for the EDCSA private keys generation.

ACME code has been modified to use these new parameters. acme_gen_x509()
new function is implemented from acme_gen_tmp_x509() to took an EVP_KEY parameter
as unique parameter contraty to acme_gen_tmp_x509() which directly used <tmp_key>
global EVP_KEY variable initialized by ACME as temporary key before retreiving its
own keys. <tmp_key> is generated by acme_EVP_PKEY_gen() as an 2048 bits RSA key.
This latter function is used by ckch_conf_load_pem_or_generate() with the parameters
provided by "keytype", "bits" and "curves" to generate the private key before
generating the X509 certificate calling acme_gen_x509().
doc/configuration.txt
include/haproxy/ssl_ckch-t.h
include/haproxy/ssl_gencert.h
src/acme.c
src/ssl_ckch.c
src/ssl_gencert.c