Apache HTTPD
mod_md_config.h
Go to the documentation of this file.
1/* Licensed to the Apache Software Foundation (ASF) under one or more
2 * contributor license agreements. See the NOTICE file distributed with
3 * this work for additional information regarding copyright ownership.
4 * The ASF licenses this file to You under the Apache License, Version 2.0
5 * (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#ifndef mod_md_md_config_h
18#define mod_md_md_config_h
19
20struct apr_hash_t;
21struct md_store_t;
22struct md_reg_t;
23struct md_ocsp_reg_t;
24struct md_pkeys_spec_t;
25
43
48
51 apr_array_header_t *mds; /* all md_t* defined in the config, shared */
52 const char *base_dir; /* base dir for store */
53 const char *proxy_url; /* proxy url to use (or NULL) */
54 struct md_reg_t *reg; /* md registry instance */
55 struct md_ocsp_reg_t *ocsp; /* ocsp status registry */
56
57 int local_80; /* On which port http:80 arrives */
58 int local_443; /* On which port https:443 arrives */
59 int can_http; /* Does someone listen to the local port 80 equivalent? */
60 int can_https; /* Does someone listen to the local port 443 equivalent? */
61 int manage_base_server; /* If base server outside vhost may be managed */
62 int hsts_max_age; /* max-age of HSTS (rfc6797) header */
63 const char *hsts_header; /* computed HTST header to use or NULL */
64 apr_array_header_t *unused_names; /* post config, names of all MDs not assigned to a vhost */
65 struct apr_hash_t *init_errors; /* init errors reported with MD name as key */
66
67 const char *notify_cmd; /* notification command to execute on signup/renew */
68 const char *message_cmd; /* message command to execute on signup/renew/warnings */
69 struct apr_table_t *env; /* environment for operation */
70 int dry_run; /* != 0 iff config dry run */
71 int server_status_enabled; /* if module should add to server-status handler */
72 int certificate_status_enabled; /* if module should expose /.httpd/certificate-status */
73 md_timeslice_t *ocsp_keep_window; /* time that we keep ocsp responses around */
74 md_timeslice_t *ocsp_renew_window; /* time before exp. that we start renewing ocsp resp. */
75 const char *cert_check_name; /* name of the linked certificate check site */
76 const char *cert_check_url; /* url "template for" checking a certificate */
77 const char *ca_certs; /* root certificates to use for connections */
78 apr_time_t check_interval; /* duration between cert renewal checks */
79 apr_time_t min_delay; /* minimum delay for retries */
80 int retry_failover; /* number of errors to trigger CA failover */
81 int use_store_locks; /* use locks when updating store */
82 apr_time_t lock_wait_timeout; /* fail after this time when unable to obtain lock */
83 md_match_mode_t match_mode; /* how dns names are match to vhosts */
84};
85
86typedef struct md_srv_conf_t {
87 const char *name;
88 const server_rec *s; /* server this config belongs to */
89 md_mod_conf_t *mc; /* global config settings */
90
91 int transitive; /* != 0 iff VirtualHost names/aliases are auto-added */
92 md_require_t require_https; /* If MDs require https: access */
93 int renew_mode; /* mode of obtaining credentials */
94 int must_staple; /* certificates should set the OCSP Must Staple extension */
95 struct md_pkeys_spec_t *pks; /* specification for private keys */
96 md_timeslice_t *renew_window; /* time before expiration that starts renewal */
97 md_timeslice_t *warn_window; /* time before expiration that warning are sent out */
98
99 struct apr_array_header_t *ca_urls; /* urls of CAs */
100 const char *ca_contact; /* contact email registered to account */
101 const char *ca_proto; /* protocol used vs CA (e.g. ACME) */
102 const char *ca_agreement; /* accepted agreement uri between CA and user */
103 struct apr_array_header_t *ca_challenges; /* challenge types configured */
104 const char *ca_eab_kid; /* != NULL, external account binding keyid */
105 const char *ca_eab_hmac; /* != NULL, external account binding hmac */
106
107 int stapling; /* OCSP stapling enabled */
108 int staple_others; /* Provide OCSP stapling for non-MD certificates */
109
110 const char *dns01_cmd; /* DNS challenge command, override global command */
111
112 md_t *current; /* md currently defined in <MDomainSet xxx> section */
113 struct apr_array_header_t *assigned; /* post_config: MDs that apply to this server */
114 int is_ssl; /* SSLEngine is enabled here */
116
118void *md_config_merge_svr(apr_pool_t *pool, void *basev, void *addv);
119
120extern const command_rec md_cmds[];
121
123
124/* Get the effective md configuration for the connection */
126/* Get the effective md configuration for the server */
128/* Get the effective md configuration for the server, but make it
129 * unique to this server_rec, so that any changes only affect this server */
131
132const char *md_config_gets(const md_srv_conf_t *config, md_config_var_t var);
134
136
137const md_t *md_get_for_domain(server_rec *s, const char *domain);
138
139#endif /* md_config_h */
apr_size_t size
const char int apr_pool_t * pool
Definition apr_cstr.h:84
int apr_status_t
Definition apr_errno.h:44
apr_vformatter_buff_t * c
Definition apr_lib.h:175
const char * s
Definition apr_strings.h:95
apr_int64_t apr_time_t
Definition apr_time.h:45
md_require_t
Definition md.h:61
apr_pool_t * p
Definition md_event.c:32
md_srv_conf_t * md_config_get(server_rec *s)
const char * md_config_gets(const md_srv_conf_t *config, md_config_var_t var)
int md_config_geti(const md_srv_conf_t *config, md_config_var_t var)
md_config_var_t
@ MD_CONFIG_MUST_STAPLE
@ MD_CONFIG_BASE_DIR
@ MD_CONFIG_CA_PROTO
@ MD_CONFIG_RENEW_WINDOW
@ MD_CONFIG_STAPLING
@ MD_CONFIG_CA_AGREEMENT
@ MD_CONFIG_STAPLE_OTHERS
@ MD_CONFIG_REQUIRE_HTTPS
@ MD_CONFIG_CA_CONTACT
@ MD_CONFIG_TRANSITIVE
@ MD_CONFIG_DRIVE_MODE
@ MD_CONFIG_MESSGE_CMD
@ MD_CONFIG_PROXY
@ MD_CONFIG_NOTIFY_CMD
@ MD_CONFIG_WARN_WINDOW
md_match_mode_t
@ MD_MATCH_SERVERNAMES
@ MD_MATCH_ALL
const command_rec md_cmds[]
md_srv_conf_t * md_config_cget(conn_rec *c)
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)
md_srv_conf_t * md_config_get_unique(server_rec *s, apr_pool_t *p)
apr_status_t md_config_post_config(server_rec *s, apr_pool_t *p)
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)
Structure to store things which are per connection.
Definition httpd.h:1152
const char * cert_check_url
struct apr_hash_t * init_errors
md_timeslice_t * ocsp_keep_window
apr_array_header_t * mds
apr_time_t lock_wait_timeout
const char * hsts_header
const char * cert_check_name
const char * proxy_url
const char * notify_cmd
int certificate_status_enabled
const char * message_cmd
struct apr_table_t * env
apr_time_t check_interval
struct md_reg_t * reg
int server_status_enabled
const char * base_dir
md_timeslice_t * ocsp_renew_window
const char * ca_certs
md_match_mode_t match_mode
struct md_ocsp_reg_t * ocsp
apr_time_t min_delay
apr_array_header_t * unused_names
const char * ca_eab_kid
md_timeslice_t * renew_window
struct apr_array_header_t * ca_urls
const char * dns01_cmd
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_contact
const char * name
const char * ca_eab_hmac
const server_rec * s
const char * ca_proto
md_mod_conf_t * mc
const char * ca_agreement
struct md_pkeys_spec_t * pks
Definition md.h:76
A structure to store information for each virtual server.
Definition httpd.h:1322
#define var