BUILD: acme: enable the ACME feature when JWS is present

The ACME feature depends on the JWS, which currently does not work with
every SSL libraries. This patch only enables ACME when JWS is enabled.
This commit is contained in:
William Lallemand 2025-04-12 01:10:14 +02:00
parent a96cbe32b6
commit 39c05cedff
3 changed files with 10 additions and 0 deletions

View File

@ -132,6 +132,10 @@
#define HAVE_JWS
#endif
#if (defined(HAVE_JWS))
#define HAVE_ACME
#endif
#if !defined(HAVE_SSL_SET_SECURITY_LEVEL)
/* define a nope function for set_security_level */
#define SSL_CTX_set_security_level(ctx, level) ({})

View File

@ -31,6 +31,8 @@
#include <haproxy/ssl_utils.h>
#include <haproxy/tools.h>
#if defined(HAVE_ACME)
static struct acme_cfg *acme_cfgs = NULL;
static struct acme_cfg *cur_acme = NULL;
@ -1879,6 +1881,8 @@ static struct cli_kw_list cli_kws = {{ },{
INITCALL1(STG_REGISTER, cli_register_kw, &cli_kws);
#endif /* ! HAVE_ACME */
/*
* Local variables:
* c-indent-level: 8

View File

@ -4599,7 +4599,9 @@ struct ckch_conf_kws ckch_conf_kws[] = {
#if defined(HAVE_SSL_OCSP)
{ "ocsp-update", offsetof(struct ckch_conf, ocsp_update_mode), PARSE_TYPE_ONOFF, ocsp_update_init, },
#endif
#if defined(HAVE_ACME)
{ "acme", offsetof(struct ckch_conf, acme.id), PARSE_TYPE_STR, ckch_conf_acme_init, },
#endif
{ "domains", offsetof(struct ckch_conf, acme.domains), PARSE_TYPE_ARRAY_SUBSTR, NULL, },
{ NULL, -1, PARSE_TYPE_STR, NULL, }
};