37#define MD_CMD_MD_SECTION "<MDomainSet"
38#define MD_CMD_MD2_SECTION "<MDomain"
42#ifndef MD_DEFAULT_BASE_DIR
43#define MD_DEFAULT_BASE_DIR "md"
59#if AP_MODULE_MAGIC_AT_LEAST(20180906, 2)
160#define CONF_S_NAME(s) (s && s->server_hostname? s->server_hostname : "default")
284 for (
d =
cmd->directive->parent;
d;
d =
d->parent) {
304#define MD_LOC_GLOBAL (0x01)
305#define MD_LOC_MD (0x02)
306#define MD_LOC_ELSE (0x04)
307#define MD_LOC_ALL (0x07)
308#define MD_LOC_NOT_MD (0x102)
338 "', supported parameter values are 'on' and 'off'",
NULL);
361 return "unknown value, use \"auto|manual\"";
393 while (*
arg !=
'\0') {
400 if (domains->
nelts == 0) {
401 return "needs at least one domain name";
405 if (transitive >= 0) {
411 memcpy(&save, sc,
sizeof(save));
458 int i, transitive = -1;
471 if (domains->
nelts == 0) {
472 return "needs at least one domain name";
476 if (transitive >= 0) {
480 if (
cmd->config_file) {
637 return "unrecognized duration format";
640 return "check interval cannot be less than one second";
655 return "unrecognized duration format";
670 if (retry_failover <= 0) {
671 return "invalid argument, must be a number > 0";
696 return "neither 'on', 'off' or a duration specified";
723 return "invalid argument, must be a 'all' or 'servernames'";
748 "', supported parameter values are 'temporary' and 'permanent'",
NULL);
765 err =
"a length of 100% or more is not allowed.";
783 err =
"a length of 100% or more is not allowed.";
827 else if (!
strncmp(
"https:",
value,
sizeof(
"https:") - 1)) {
833 return "unable to parse first port number";
836 if (!endp || *endp !=
':') {
837 return "no ':' after first port number";
846 return "unable to parse second port number";
849 return "invalid number for port map, must be in ]0,65535]";
860 return "mapped port number must be 80 or 443";
866 const char *v1,
const char *v2)
895 ca_challenges = *
pcha;
913 const char *
err, *ptype;
922 return "needs to specify the private key type";
930 return "'Default' allows no other parameter";
934 else if (strlen(ptype) > 3
935 && (ptype[0] ==
'R' || ptype[0] ==
'r')
936 && (ptype[1] ==
'S' || ptype[1] ==
's')
937 && (ptype[2] ==
'A' || ptype[2] ==
'a')
942 "must be %d or higher in order to be considered safe.",
949 return "two keys of type 'RSA' are not possible.";
962 "must be %d or higher in order to be considered safe.",
970 return "two keys of type 'RSA' are not possible.";
1042 return "Only versions `1` and `2` are supported";
1131 err =
"with a length of 100% or more is not allowed.";
1138 const char *
name,
const char *
url)
1163 return "unrecognized duration format";
1216 ": error reading JSON file ",
fpath,
NULL);
1240 "URL(s) or known name(s) of CA issuing the certificates"),
1242 "either 'accepted' or the URL of CA Terms-of-Service agreement you accept"),
1244 "A list of challenge types to be used."),
1246 "Protocol used to obtain/renew certificates"),
1248 "Email address used for account registration"),
1250 "deprecated, older name for MDRenewMode"),
1252 "Controls how renewal of Managed Domain certificates shall be handled."),
1254 "A group of server names with one certificate"),
1256 "Container for a managed domain with common settings and certificate."),
1258 "Short form for <MDomainSet> container."),
1260 "Define domain name(s) part of the Managed Domain. Use 'auto' or "
1261 "'manual' to enable/disable auto adding names from virtual hosts."),
1263 "Define domain name(s) part of the Managed Domain. Use 'auto' or "
1264 "'manual' to enable/disable auto adding names from virtual hosts."),
1266 "Enable/Disable the Must-Staple flag for new certificates."),
1268 "Declare the mapped ports 80 and 443 on the local server. E.g. 80:8000 "
1269 "to indicate that the server port 8000 is reachable as port 80 from the "
1270 "internet. Use 80:- to indicate that port 80 is not reachable from "
1273 "set the type and parameters for private key generation"),
1275 "URL of a HTTP(S) proxy to use for outgoing connections"),
1277 "the directory for file system storage of managed domain data."),
1279 "Time length for renewal before certificate expires (defaults to days)."),
1281 "Redirect non-secure requests to the https: equivalent."),
1283 "Set the command to run when signup/renew of domain is complete."),
1285 "Allow managing of base server outside virtual hosts."),
1287 "Set the command for setup/teardown of dns-01 challenges"),
1289 "Set the type of arguments to call `MDChallengeDns01` with"),
1291 "set the static certificate (chain) file to use for this domain."),
1293 "set the static private key file to use for this domain."),
1295 "On to see Managed Domains in server-status."),
1297 "On to see Managed Domain expose /.httpd/certificate-status."),
1299 "When less time remains for a certificate, send our/log a warning (defaults to days)"),
1301 "Set the command run when a message about a domain is issued."),
1303 "Enable/Disable OCSP Stapling for this/all Managed Domain(s)."),
1305 "Enable/Disable OCSP Stapling for certificates not in Managed Domains."),
1307 "The amount of time to keep an OCSP response in the store."),
1309 "Time length for renewal before OCSP responses expire (defaults to days)."),
1311 "Set name and URL pattern for a certificate monitoring site."),
1313 "How long to delay activation of new certificates"),
1315 "Set the CA file to use for connections"),
1317 "Set the external account binding keyid and hmac values to use at CA"),
1319 "Time length for first retry, doubled on every consecutive error."),
1321 "The number of errors before a failover to another CA is triggered."),
1323 "Configure locking of store for updates."),
1325 "Determines how DNS names are matched to vhosts."),
1327 "Time between certificate checks."),
1340 if (
mc->hsts_max_age > 0) {
1344#if AP_MODULE_MAGIC_AT_LEAST(20180906, 2)
1345 if (
mc->base_dir ==
NULL) {
1357 if (sc->
s !=
s &&
p) {
APR general purpose library routines.
apr_size_t const unsigned char unsigned int unsigned int d
#define AP_INIT_TAKE1(directive, func, mconfig, where, help)
#define ap_get_module_config(v, m)
#define AP_INIT_TAKE_ARGV(directive, func, mconfig, where, help)
char * ap_server_root_relative(apr_pool_t *p, const char *fname)
#define AP_INIT_RAW_ARGS(directive, func, mconfig, where, help)
#define ap_set_module_config(v, m, val)
#define AP_INIT_TAKE12(directive, func, mconfig, where, help)
request_rec int int apr_table_t const char * path
ap_conf_vector_t const char * section
const char * ap_walk_config(ap_directive_t *conftree, cmd_parms *parms, ap_conf_vector_t *section_vector)
#define AP_INIT_TAKE2(directive, func, mconfig, where, help)
#define AP_SQ_RM_CONFIG_DUMP
int ap_state_query(int query_code)
apr_datum_t apr_datum_t * pvalue
const char apr_ssize_t int flags
int ap_cstr_casecmp(const char *s1, const char *s2)
#define ap_strrchr_c(s, c)
char * ap_getword_conf(apr_pool_t *p, const char **line)
const char * ap_check_cmd_context(cmd_parms *cmd, unsigned forbidden)
const char int apr_pool_t * pool
apr_vformatter_buff_t * c
#define apr_pcalloc(p, size)
#define APR_ARRAY_PUSH(ary, type)
#define APR_ARRAY_IDX(ary, i, type)
apr_int32_t apr_int32_t apr_int32_t err
apr_int64_t apr_interval_time_t
#define apr_time_from_sec(sec)
#define MD_PKEY_RSA_BITS_MIN
#define MD_PKEY_RSA_BITS_DEF
#define MD_TIME_OCSP_KEEP_NORM
#define MD_TIME_LIFE_NORM
#define MD_TIME_WARN_WINDOW_DEF
#define MD_KEY_DNS01_VERSION
md_t * md_create(apr_pool_t *p, struct apr_array_header_t *domains)
#define MD_TIME_RENEW_WINDOW_DEF
apr_status_t md_get_ca_url_from_name(const char **purl, apr_pool_t *p, const char *name)
#define MD_KEY_ACTIVATION_DELAY
int md_contains(const md_t *md, const char *domain, int case_sensitive)
#define MD_HSTS_MAX_AGE_DEFAULT
int md_pkeys_spec_contains_rsa(md_pkeys_spec_t *pks)
md_pkeys_spec_t * md_pkeys_spec_make(apr_pool_t *p)
md_pkeys_spec_t * md_pkeys_spec_clone(apr_pool_t *p, const md_pkeys_spec_t *pks)
void md_pkeys_spec_add_default(md_pkeys_spec_t *pks)
void md_pkeys_spec_add_ec(md_pkeys_spec_t *pks, const char *curve)
int md_pkeys_spec_is_empty(const md_pkeys_spec_t *pks)
void md_pkeys_spec_add_rsa(md_pkeys_spec_t *pks, unsigned int bits)
int md_pkeys_spec_contains_ec(md_pkeys_spec_t *pks, const char *curve)
const char * md_json_gets(const md_json_t *json,...)
apr_status_t md_json_readf(md_json_t **pjson, apr_pool_t *p, const char *fpath)
apr_status_t md_duration_parse(apr_interval_time_t *ptimeout, const char *value, const char *def_unit)
const char * md_duration_format(apr_pool_t *p, apr_interval_time_t duration)
const char * md_timeslice_parse(md_timeslice_t **pts, apr_pool_t *p, const char *val, apr_interval_time_t norm)
char * md_util_str_tolower(char *s)
const char * md_util_schemify(apr_pool_t *p, const char *s, const char *def_scheme)
int md_array_str_index(const apr_array_header_t *array, const char *s, int start, int case_sensitive)
int md_file_exists(const char *fname, apr_pool_t *p)
apr_status_t md_util_abs_http_uri_check(apr_pool_t *p, const char *uri, const char **perr)
md_srv_conf_t * md_config_get(server_rec *s)
static md_mod_conf_t * md_mod_conf_get(apr_pool_t *pool, int create)
static const char * md_config_set_store_dir(cmd_parms *cmd, void *arg, const char *value)
static md_timeslice_t def_renew_window
static const char * md_config_set_activation_delay(cmd_parms *cmd, void *mconfig, const char *arg)
static void srv_conf_props_apply(md_t *md, const md_srv_conf_t *from, apr_pool_t *p)
static const char * md_config_set_notify_cmd(cmd_parms *cmd, void *mconfig, const char *arg)
const char * md_config_gets(const md_srv_conf_t *sc, md_config_var_t var)
static const char * md_config_set_ocsp_keep_window(cmd_parms *cmd, void *dc, const char *value)
static const char * md_config_set_ocsp_renew_window(cmd_parms *cmd, void *dc, const char *value)
static const char * md_config_set_ca(cmd_parms *cmd, void *dc, int argc, char *const argv[])
static int inside_md_section(cmd_parms *cmd)
static const char * md_config_set_renew_window(cmd_parms *cmd, void *dc, const char *value)
static const char * md_conf_check_location(cmd_parms *cmd, int flags)
static const char * md_config_set_proxy(cmd_parms *cmd, void *arg, const char *value)
#define MD_CMD_MD_SECTION
static const char * md_config_set_dns01_cmd(cmd_parms *cmd, void *mconfig, const char *arg)
static const char * md_config_set_store_locks(cmd_parms *cmd, void *dc, const char *s)
static const char * md_config_set_agreement(cmd_parms *cmd, void *dc, const char *value)
const command_rec md_cmds[]
static const char * md_config_add_cert_file(cmd_parms *cmd, void *mconfig, const char *arg)
md_srv_conf_t * md_config_cget(conn_rec *c)
static const char * set_transitive(int *ptransitive, const char *value)
static const char * set_port_map(md_mod_conf_t *mc, const char *value)
static const char * md_config_set_cert_check(cmd_parms *cmd, void *dc, const char *name, const char *url)
static const char * md_config_set_port_map(cmd_parms *cmd, void *arg, const char *v1, const char *v2)
static md_srv_conf_t * config_get_int(server_rec *s, apr_pool_t *p)
static md_timeslice_t def_warn_window
static const char * md_config_set_stapling(cmd_parms *cmd, void *dc, const char *value)
static const char * md_config_set_contact(cmd_parms *cmd, void *dc, const char *value)
static md_mod_conf_t * mod_md_config
static md_mod_conf_t defmc
static const char * md_config_set_eab(cmd_parms *cmd, void *dc, const char *keyid, const char *hmac)
static const char * md_config_set_match_mode(cmd_parms *cmd, void *dc, const char *s)
#define MD_DEFAULT_BASE_DIR
static md_timeslice_t def_ocsp_keep_window
static md_srv_conf_t defconf
static const char * md_section_check(cmd_parms *cmd)
static const char * md_config_set_pkeys(cmd_parms *cmd, void *dc, int argc, char *const argv[])
static const char * md_config_set_base_server(cmd_parms *cmd, void *dc, const char *value)
static const char * md_config_set_names(cmd_parms *cmd, void *dc, int argc, char *const argv[])
void md_config_get_timespan(md_timeslice_t **pspan, const md_srv_conf_t *sc, md_config_var_t var)
void * md_config_create_svr(apr_pool_t *pool, server_rec *s)
static const char * md_config_set_min_delay(cmd_parms *cmd, void *dc, const char *value)
static const char * md_config_set_ca_proto(cmd_parms *cmd, void *dc, const char *value)
static const char * md_config_set_server_status(cmd_parms *cmd, void *dc, const char *value)
static const char * md_config_sec_start(cmd_parms *cmd, void *mconfig, const char *arg)
static md_timeslice_t def_ocsp_renew_window
static void srv_conf_props_copy(md_srv_conf_t *to, const md_srv_conf_t *from)
md_srv_conf_t * md_config_get_unique(server_rec *s, apr_pool_t *p)
static apr_status_t cleanup_mod_config(void *dummy)
static const char * md_config_add_key_file(cmd_parms *cmd, void *mconfig, const char *arg)
static const char * md_config_set_ca_certs(cmd_parms *cmd, void *dc, const char *path)
static const char * md_config_set_staple_others(cmd_parms *cmd, void *dc, const char *value)
static int inside_section(cmd_parms *cmd, const char *section)
static void srv_conf_props_clear(md_srv_conf_t *sc)
apr_status_t md_config_post_config(server_rec *s, apr_pool_t *p)
static void * md_config_merge(apr_pool_t *pool, void *basev, void *addv)
static const char * md_config_set_cha_tyes(cmd_parms *cmd, void *dc, int argc, char *const argv[])
static const char * md_config_set_msg_cmd(cmd_parms *cmd, void *mconfig, const char *arg)
static const char * md_config_set_require_https(cmd_parms *cmd, void *dc, const char *value)
#define MD_CMD_MD2_SECTION
static const char * md_config_set_must_staple(cmd_parms *cmd, void *dc, const char *value)
static void add_domain_name(apr_array_header_t *domains, const char *name, apr_pool_t *p)
static const char * md_config_set_retry_failover(cmd_parms *cmd, void *dc, const char *value)
static const char * md_config_set_renew_mode(cmd_parms *cmd, void *dc, const char *value)
static const char * set_on_off(int *pvalue, const char *s, apr_pool_t *p)
static const char * md_config_sec_add_members(cmd_parms *cmd, void *dc, int argc, char *const argv[])
const md_t * md_get_for_domain(server_rec *s, const char *domain)
void * md_config_merge_svr(apr_pool_t *pool, void *basev, void *addv)
int md_config_geti(const md_srv_conf_t *sc, md_config_var_t var)
static const char * md_config_set_warn_window(cmd_parms *cmd, void *dc, const char *value)
static const char * md_config_set_check_interval(cmd_parms *cmd, void *dc, const char *value)
static const char * md_config_set_certificate_status(cmd_parms *cmd, void *dc, const char *value)
static const char * md_config_set_dns01_version(cmd_parms *cmd, void *mconfig, const char *value)
@ MD_CONFIG_STAPLE_OTHERS
@ MD_CONFIG_REQUIRE_HTTPS
Structure used to build the config tree.
Structure to store things which are per connection.
const char * cert_check_url
struct apr_hash_t * init_errors
md_timeslice_t * ocsp_keep_window
apr_time_t lock_wait_timeout
const char * cert_check_name
int certificate_status_enabled
apr_time_t check_interval
int server_status_enabled
md_timeslice_t * ocsp_renew_window
md_match_mode_t match_mode
apr_array_header_t * unused_names
md_timeslice_t * renew_window
struct apr_array_header_t * ca_urls
md_require_t require_https
struct apr_array_header_t * ca_challenges
md_timeslice_t * warn_window
struct apr_array_header_t * assigned
const char * ca_agreement
struct md_pkeys_spec_t * pks
md_timeslice_t * renew_window
struct apr_array_header_t * domains
md_timeslice_t * warn_window
md_require_t require_https
struct apr_array_header_t * pkey_files
unsigned defn_line_number
struct apr_array_header_t * ca_urls
struct md_pkeys_spec_t * pks
const char * ca_agreement
struct apr_array_header_t * contacts
struct apr_array_header_t * cert_files
struct apr_array_header_t * ca_challenges
A structure to store information for each virtual server.
typedef int(WSAAPI *apr_winapi_fpt_WSAPoll)(IN OUT LPWSAPOLLFD fdArray