BUG/MINOR: acme: allow 'key' when generating cert
Some checks are pending
Contrib / build (push) Waiting to run
alpine/musl / gcc (push) Waiting to run
VTest / Generate Build Matrix (push) Waiting to run
VTest / (push) Blocked by required conditions
Windows / Windows, gcc, all features (push) Waiting to run

Allow to use the 'key' keyword when 'crt' was generated with both a crt
and a key.

No backport needed.
This commit is contained in:
William Lallemand 2025-11-06 14:11:43 +01:00
parent 05036180d9
commit 094baa1cc0

View file

@ -4779,9 +4779,9 @@ static int ckch_conf_load_key_or_generate(void *value, char *buf, struct ckch_st
errno = 0;
/* if ACME is enabled and the file does not exists, and no key was previously loaded generate the key */
if (s->conf.acme.id &&
(stat(path, &sb) == -1 && errno == ENOENT) &&
(!s->data->key)) {
s->data->key = acme_gen_tmp_pkey();
(stat(path, &sb) == -1 && errno == ENOENT)) {
if (!s->data->key)
s->data->key = acme_gen_tmp_pkey();
} else
#endif
{