Apache2
md_reg.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_reg_h
18 #define mod_md_md_reg_h
19 
20 struct apr_hash_t;
21 struct apr_array_header_t;
22 struct md_pkey_t;
23 struct md_cert_t;
24 struct md_result_t;
25 struct md_pkey_spec_t;
26 
27 #include "md_store.h"
28 
33 typedef struct md_reg_t md_reg_t;
34 
39  const char *proxy_url, const char *ca_file);
40 
42 
43 apr_status_t md_reg_set_props(md_reg_t *reg, apr_pool_t *p, int can_http, int can_https);
44 
50 
55 md_t *md_reg_find(md_reg_t *reg, const char *domain, apr_pool_t *p);
56 
62 md_t *md_reg_find_overlap(md_reg_t *reg, const md_t *md, const char **pdomain, apr_pool_t *p);
63 
68 md_t *md_reg_get(md_reg_t *reg, const char *name, apr_pool_t *p);
69 
73 typedef int md_reg_do_cb(void *baton, md_reg_t *reg, md_t *md);
74 
80 int md_reg_do(md_reg_do_cb *cb, void *baton, md_reg_t *reg, apr_pool_t *p);
81 
85 #define MD_UPD_DOMAINS 0x00001
86 #define MD_UPD_CA_URL 0x00002
87 #define MD_UPD_CA_PROTO 0x00004
88 #define MD_UPD_CA_ACCOUNT 0x00008
89 #define MD_UPD_CONTACTS 0x00010
90 #define MD_UPD_AGREEMENT 0x00020
91 #define MD_UPD_DRIVE_MODE 0x00080
92 #define MD_UPD_RENEW_WINDOW 0x00100
93 #define MD_UPD_CA_CHALLENGES 0x00200
94 #define MD_UPD_PKEY_SPEC 0x00400
95 #define MD_UPD_REQUIRE_HTTPS 0x00800
96 #define MD_UPD_TRANSITIVE 0x01000
97 #define MD_UPD_MUST_STAPLE 0x02000
98 #define MD_UPD_PROTO 0x04000
99 #define MD_UPD_WARN_WINDOW 0x08000
100 #define MD_UPD_STAPLING 0x10000
101 #define MD_UPD_ALL 0x7FFFFFFF
102 
108  const char *name, const md_t *md,
109  int fields, int check_consistency);
110 
115 apr_status_t md_reg_get_pubcert(const md_pubcert_t **ppubcert, md_reg_t *reg,
116  const md_t *md, int i, apr_pool_t *p);
117 
122 apr_status_t md_reg_get_cred_files(const char **pkeyfile, const char **pcertfile,
124  const md_t *md, struct md_pkey_spec_t *spec, apr_pool_t *p);
125 
130 
135 
136 
137 apr_status_t md_reg_remove(md_reg_t *reg, apr_pool_t *p, const char *name, int archive);
138 
142 apr_status_t md_reg_delete_acct(md_reg_t *reg, apr_pool_t *p, const char *acct_id);
143 
144 
154  apr_array_header_t *mds);
155 
162 
168 int md_reg_should_renew(md_reg_t *reg, const md_t *md, apr_pool_t *p);
169 
175 
181 
187 int md_reg_should_warn(md_reg_t *reg, const md_t *md, apr_pool_t *p);
188 
189 /**************************************************************************************************/
190 /* protocol drivers */
191 
192 typedef struct md_proto_t md_proto_t;
193 
195 
203  void *baton;
204  struct apr_table_t *env;
205 
208  const char *proxy_url;
209  const char *ca_file;
210  const md_t *md;
211 
212  int can_http;
214  int reset;
216 };
217 
222  md_store_group_t group, struct md_result_t *result);
223 
224 struct md_proto_t {
225  const char *protocol;
230 };
231 
239  struct md_result_t *result, apr_pool_t *p);
240 
247  struct apr_table_t *env, int reset,
248  struct md_result_t *result, apr_pool_t *p);
249 
260  struct md_result_t *result, apr_pool_t *p);
261 
264 
265 struct md_job_t *md_reg_job_make(md_reg_t *reg, const char *mdomain, apr_pool_t *p);
266 
267 #endif /* mod_md_md_reg_h */
apr_time_t md_reg_valid_until(md_reg_t *reg, const md_t *md, apr_pool_t *p)
apr_status_t md_reg_update(md_reg_t *reg, apr_pool_t *p, const char *name, const md_t *md, int fields, int check_consistency)
struct md_cert_t md_cert_t
Definition: md_crypt.h:122
apr_status_t md_reg_add(md_reg_t *reg, md_t *md, apr_pool_t *p)
md_proto_init_preload_cb * init_preload
Definition: md_reg.h:228
Definition: md.h:76
Definition: md_store.h:307
const char * ca_file
Definition: md_reg.h:209
Definition: apr_tables.h:62
int md_reg_do_cb(void *baton, md_reg_t *reg, md_t *md)
Definition: md_reg.h:73
md_store_group_t
Definition: md_store.h:62
const char * proxy_url
Definition: md_reg.h:208
int can_https
Definition: md_reg.h:213
md_reg_t * reg
Definition: md_reg.h:206
md_proto_renew_cb * renew
Definition: md_reg.h:227
apr_status_t md_reg_test_init(md_reg_t *reg, const md_t *md, struct apr_table_t *env, struct md_result_t *result, apr_pool_t *p)
md_proto_init_cb * init
Definition: md_reg.h:226
md_store_t * md_reg_store_get(md_reg_t *reg)
int can_http
Definition: md_reg.h:212
apr_int64_t apr_interval_time_t
Definition: apr_time.h:55
Definition: md_status.h:52
apr_status_t md_proto_preload_cb(md_proto_driver_t *driver, md_store_group_t group, struct md_result_t *result)
Definition: md_reg.h:221
apr_status_t md_proto_renew_cb(md_proto_driver_t *driver, struct md_result_t *result)
Definition: md_reg.h:219
const char * protocol
Definition: md_reg.h:225
Definition: md_reg.h:224
const char * mdomain
Definition: md_status.h:54
apr_interval_time_t activation_delay
Definition: md_reg.h:215
md_t * md_reg_get(md_reg_t *reg, const char *name, apr_pool_t *p)
apr_int64_t apr_time_t
Definition: apr_time.h:45
apr_status_t md_reg_cleanup_challenges(md_reg_t *reg, apr_pool_t *p, apr_pool_t *ptemp, apr_array_header_t *mds)
apr_status_t md_reg_get_cred_files(const char **pkeyfile, const char **pcertfile, md_reg_t *reg, md_store_group_t group, const md_t *md, struct md_pkey_spec_t *spec, apr_pool_t *p)
Definition: md_reg.h:200
const char const dav_liveprop_group * group
Definition: mod_dav.h:1048
int md_reg_should_renew(md_reg_t *reg, const md_t *md, apr_pool_t *p)
apr_status_t md_reg_renew(md_reg_t *reg, const md_t *md, struct apr_table_t *env, int reset, struct md_result_t *result, apr_pool_t *p)
apr_status_t md_proto_init_cb(md_proto_driver_t *driver, struct md_result_t *result)
Definition: md_reg.h:218
apr_status_t md_reg_remove(md_reg_t *reg, apr_pool_t *p, const char *name, int archive)
const md_t * md
Definition: md_reg.h:210
apr_time_t md_reg_renew_at(md_reg_t *reg, const md_t *md, apr_pool_t *p)
apr_status_t md_reg_create(md_reg_t **preg, apr_pool_t *pm, md_store_t *store, const char *proxy_url, const char *ca_file)
apr_status_t md_reg_freeze_domains(md_reg_t *reg, apr_array_header_t *mds)
struct apr_hash_t apr_hash_t
Definition: apr_hash.h:52
Definition: md_time.h:60
apr_status_t md_reg_load_staging(md_reg_t *reg, const md_t *md, struct apr_table_t *env, struct md_result_t *result, apr_pool_t *p)
Definition: md_result.h:29
struct md_reg_t md_reg_t
Definition: md_reg.h:33
void md_reg_set_warn_window_default(md_reg_t *reg, md_timeslice_t *warn_window)
apr_pool_t * p
void md_reg_set_renew_window_default(md_reg_t *reg, md_timeslice_t *renew_window)
void * baton
Definition: md_reg.h:203
apr_pool_t * p
Definition: md_reg.h:202
int md_reg_do(md_reg_do_cb *cb, void *baton, md_reg_t *reg, apr_pool_t *p)
apr_status_t md_reg_set_props(md_reg_t *reg, apr_pool_t *p, int can_http, int can_https)
int md_reg_should_warn(md_reg_t *reg, const md_t *md, apr_pool_t *p)
apr_status_t md_reg_delete_acct(md_reg_t *reg, apr_pool_t *p, const char *acct_id)
Definition: md.h:308
apr_status_t md_reg_sync_start(md_reg_t *reg, apr_array_header_t *master_mds, apr_pool_t *p)
struct apr_table_t apr_table_t
Definition: apr_tables.h:56
const char * name
Definition: mod_dav.h:805
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
int apr_status_t
Definition: apr_errno.h:44
md_proto_preload_cb * preload
Definition: md_reg.h:229
apr_status_t md_proto_init_preload_cb(md_proto_driver_t *driver, struct md_result_t *result)
Definition: md_reg.h:220
md_t * md_reg_find_overlap(md_reg_t *reg, const md_t *md, const char **pdomain, apr_pool_t *p)
const md_proto_t * proto
Definition: md_reg.h:201
struct md_pkey_t md_pkey_t
Definition: md_crypt.h:49
int reset
Definition: md_reg.h:214
struct md_job_t * md_reg_job_make(md_reg_t *reg, const char *mdomain, apr_pool_t *p)
struct apr_table_t * env
Definition: md_reg.h:204
md_t * md_reg_find(md_reg_t *reg, const char *domain, apr_pool_t *p)
apr_status_t md_reg_sync_finish(md_reg_t *reg, md_t *md, apr_pool_t *p, apr_pool_t *ptemp)
Definition: md_crypt.h:65
apr_status_t md_reg_get_pubcert(const md_pubcert_t **ppubcert, md_reg_t *reg, const md_t *md, int i, apr_pool_t *p)
md_store_t * store
Definition: md_reg.h:207