MCPcopy Create free account
hub / github.com/apache/httpd / setup_store

Function setup_store

modules/md/mod_md.c:277–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

275}
276
277static apr_status_t setup_store(md_store_t **pstore, md_mod_conf_t *mc,
278 apr_pool_t *p, server_rec *s)
279{
280 const char *base_dir;
281 apr_status_t rv;
282
283 base_dir = ap_server_root_relative(p, mc->base_dir);
284
285 if (APR_SUCCESS != (rv = md_store_fs_init(pstore, p, base_dir))) {
286 ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(10046)"setup store for %s", base_dir);
287 goto leave;
288 }
289
290 md_store_fs_set_event_cb(*pstore, store_file_ev, s);
291 if (APR_SUCCESS != (rv = check_group_dir(*pstore, MD_SG_CHALLENGES, p, s))
292 || APR_SUCCESS != (rv = check_group_dir(*pstore, MD_SG_STAGING, p, s))
293 || APR_SUCCESS != (rv = check_group_dir(*pstore, MD_SG_ACCOUNTS, p, s))
294 || APR_SUCCESS != (rv = check_group_dir(*pstore, MD_SG_OCSP, p, s))
295 ) {
296 ap_log_error(APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(10047)
297 "setup challenges directory");
298 goto leave;
299 }
300
301leave:
302 return rv;
303}
304
305/**************************************************************************************************/
306/* post config handling */

Callers 1

Calls 5

ap_server_root_relativeFunction · 0.85
md_store_fs_initFunction · 0.85
md_store_fs_set_event_cbFunction · 0.85
check_group_dirFunction · 0.85
ap_log_errorFunction · 0.50

Tested by

no test coverage detected