]> 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>
Wed, 28 Jan 2026 15:09:40 +0000 (16:09 +0100)
commit42be798f3bf5803ca122df592fcc191242141485
tree1b05f6bc88dddee86e7ccaa29d39848ce980ab85
parent9afc83a45f2a4089ec47d79252feb5d77a076375
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().
include/haproxy/acme.h
include/haproxy/ssl_ckch-t.h
src/acme.c
src/ssl_ckch.c