Apache2
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 
26 #include "md_store.h"
27 
32 typedef struct md_reg_t md_reg_t;
33 
38  const char *proxy_url);
39 
41 
42 apr_status_t md_reg_set_props(md_reg_t *reg, apr_pool_t *p, int can_http, int can_https);
43 
49 
54 md_t *md_reg_find(md_reg_t *reg, const char *domain, apr_pool_t *p);
55 
61 md_t *md_reg_find_overlap(md_reg_t *reg, const md_t *md, const char **pdomain, apr_pool_t *p);
62 
67 md_t *md_reg_get(md_reg_t *reg, const char *name, apr_pool_t *p);
68 
72 typedef int md_reg_do_cb(void *baton, md_reg_t *reg, md_t *md);
73 
79 int md_reg_do(md_reg_do_cb *cb, void *baton, md_reg_t *reg, apr_pool_t *p);
80 
84 #define MD_UPD_DOMAINS 0x00001
85 #define MD_UPD_CA_URL 0x00002
86 #define MD_UPD_CA_PROTO 0x00004
87 #define MD_UPD_CA_ACCOUNT 0x00008
88 #define MD_UPD_CONTACTS 0x00010
89 #define MD_UPD_AGREEMENT 0x00020
90 #define MD_UPD_DRIVE_MODE 0x00080
91 #define MD_UPD_RENEW_WINDOW 0x00100
92 #define MD_UPD_CA_CHALLENGES 0x00200
93 #define MD_UPD_PKEY_SPEC 0x00400
94 #define MD_UPD_REQUIRE_HTTPS 0x00800
95 #define MD_UPD_TRANSITIVE 0x01000
96 #define MD_UPD_MUST_STAPLE 0x02000
97 #define MD_UPD_PROTO 0x04000
98 #define MD_UPD_WARN_WINDOW 0x08000
99 #define MD_UPD_STAPLING 0x10000
100 #define MD_UPD_ALL 0x7FFFFFFF
101 
107  const char *name, const md_t *md,
108  int fields, int check_consistency);
109 
114 apr_status_t md_reg_get_pubcert(const md_pubcert_t **ppubcert, md_reg_t *reg,
115  const md_t *md, apr_pool_t *p);
116 
121 apr_status_t md_reg_get_cred_files(const char **pkeyfile, const char **pcertfile,
123  const md_t *md, apr_pool_t *p);
124 
129 
134 
135 
136 apr_status_t md_reg_remove(md_reg_t *reg, apr_pool_t *p, const char *name, int archive);
137 
141 apr_status_t md_reg_delete_acct(md_reg_t *reg, apr_pool_t *p, const char *acct_id);
142 
143 
153  apr_array_header_t *mds);
154 
161 
167 int md_reg_should_renew(md_reg_t *reg, const md_t *md, apr_pool_t *p);
168 
174 
180 int md_reg_should_warn(md_reg_t *reg, const md_t *md, apr_pool_t *p);
181 
182 /**************************************************************************************************/
183 /* protocol drivers */
184 
185 typedef struct md_proto_t md_proto_t;
186 
188 
196  void *baton;
197  struct apr_table_t *env;
198 
201  const char *proxy_url;
202  const md_t *md;
203 
204  int can_http;
206  int reset;
208 };
209 
214  md_store_group_t group, struct md_result_t *result);
215 
216 struct md_proto_t {
217  const char *protocol;
222 };
223 
230 apr_status_t md_reg_test_init(md_reg_t *reg, const md_t *md, struct apr_table_t *env,
231  struct md_result_t *result, apr_pool_t *p);
232 
238 apr_status_t md_reg_renew(md_reg_t *reg, const md_t *md,
239  struct apr_table_t *env, int reset,
240  struct md_result_t *result, apr_pool_t *p);
241 
251 apr_status_t md_reg_load_staging(md_reg_t *reg, const md_t *md, struct apr_table_t *env,
252  struct md_result_t *result, apr_pool_t *p);
253 
256 
257 void md_reg_set_notify_cb(md_reg_t *reg, md_job_notify_cb *cb, void *baton);
258 struct md_job_t *md_reg_job_make(md_reg_t *reg, const char *mdomain, apr_pool_t *p);
259 
260 #endif /* mod_md_md_reg_h */
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:94
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:220
Definition: md.h:74
Definition: md_store.h:278
Definition: apr_tables.h:62
int md_reg_do_cb(void *baton, md_reg_t *reg, md_t *md)
Definition: md_reg.h:72
md_store_group_t
Definition: md_store.h:61
const char * proxy_url
Definition: md_reg.h:201
int can_https
Definition: md_reg.h:205
md_reg_t * reg
Definition: md_reg.h:199
md_proto_renew_cb * renew
Definition: md_reg.h:219
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:218
md_store_t * md_reg_store_get(md_reg_t *reg)
int can_http
Definition: md_reg.h:204
apr_int64_t apr_interval_time_t
Definition: apr_time.h:55
apr_status_t md_job_notify_cb(struct md_job_t *job, const char *reason, struct md_result_t *result, apr_pool_t *p, void *baton)
Definition: md.h:294
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:213
apr_status_t md_proto_renew_cb(md_proto_driver_t *driver, struct md_result_t *result)
Definition: md_reg.h:211
const char * protocol
Definition: md_reg.h:217
Definition: md_reg.h:216
const char * mdomain
Definition: md_status.h:54
apr_interval_time_t activation_delay
Definition: md_reg.h:207
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, apr_pool_t *p)
Definition: md_reg.h:193
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:210
void md_reg_set_notify_cb(md_reg_t *reg, md_job_notify_cb *cb, void *baton)
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:202
apr_time_t md_reg_renew_at(md_reg_t *reg, const md_t *md, apr_pool_t *p)
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:55
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:27
struct md_reg_t md_reg_t
Definition: md_reg.h:32
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)
apr_status_t md_reg_create(md_reg_t **preg, apr_pool_t *pm, md_store_t *store, const char *proxy_url)
void * baton
Definition: md_reg.h:196
apr_pool_t * p
Definition: md_reg.h:195
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:301
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:221
apr_status_t md_proto_init_preload_cb(md_proto_driver_t *driver, struct md_result_t *result)
Definition: md_reg.h:212
md_t * md_reg_find_overlap(md_reg_t *reg, const md_t *md, const char **pdomain, apr_pool_t *p)
apr_status_t md_reg_get_pubcert(const md_pubcert_t **ppubcert, md_reg_t *reg, const md_t *md, apr_pool_t *p)
const md_proto_t * proto
Definition: md_reg.h:194
struct md_pkey_t md_pkey_t
Definition: md_crypt.h:49
int reset
Definition: md_reg.h:206
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:197
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)
md_store_t * store
Definition: md_reg.h:200