| 961 | } |
| 962 | |
| 963 | static apr_status_t md_post_config_after_ssl(apr_pool_t *p, apr_pool_t *plog, |
| 964 | apr_pool_t *ptemp, server_rec *s) |
| 965 | { |
| 966 | md_srv_conf_t *sc; |
| 967 | apr_status_t rv = APR_SUCCESS; |
| 968 | md_mod_conf_t *mc; |
| 969 | int watched, i; |
| 970 | md_t *md; |
| 971 | |
| 972 | (void)ptemp; |
| 973 | (void)plog; |
| 974 | sc = md_config_get(s); |
| 975 | |
| 976 | /*6*/ |
| 977 | if (!sc || !sc->mc || sc->mc->dry_run) goto leave; |
| 978 | mc = sc->mc; |
| 979 | |
| 980 | /*7*/ |
| 981 | if (APR_SUCCESS != (rv = check_invalid_duplicates(s))) { |
| 982 | goto leave; |
| 983 | } |
| 984 | apr_array_clear(mc->unused_names); |
| 985 | for (i = 0; i < mc->mds->nelts; ++i) { |
| 986 | md = APR_ARRAY_IDX(mc->mds, i, md_t *); |
| 987 | |
| 988 | ap_log_error( APLOG_MARK, APLOG_TRACE2, rv, s, "md{%s}: auto_add", md->name); |
| 989 | if (APR_SUCCESS != (rv = auto_add_domains(md, s, p))) { |
| 990 | goto leave; |
| 991 | } |
| 992 | init_acme_tls_1_domains(md, s); |
| 993 | ap_log_error( APLOG_MARK, APLOG_TRACE2, rv, s, "md{%s}: check_usage", md->name); |
| 994 | if (APR_SUCCESS != (rv = check_usage(mc, md, s, p, ptemp))) { |
| 995 | goto leave; |
| 996 | } |
| 997 | ap_log_error( APLOG_MARK, APLOG_TRACE2, rv, s, "md{%s}: sync_finish", md->name); |
| 998 | if (APR_SUCCESS != (rv = md_reg_sync_finish(mc->reg, md, p, ptemp))) { |
| 999 | ap_log_error( APLOG_MARK, APLOG_ERR, rv, s, APLOGNO(10172) |
| 1000 | "md[%s]: error syncing to store", md->name); |
| 1001 | goto leave; |
| 1002 | } |
| 1003 | } |
| 1004 | /*8*/ |
| 1005 | ap_log_error( APLOG_MARK, APLOG_TRACE2, rv, s, "init_cert_watch"); |
| 1006 | watched = init_cert_watch_status(mc, p, ptemp, s); |
| 1007 | /*9*/ |
| 1008 | ap_log_error( APLOG_MARK, APLOG_TRACE2, rv, s, "cleanup challenges"); |
| 1009 | md_reg_cleanup_challenges(mc->reg, p, ptemp, mc->mds); |
| 1010 | |
| 1011 | /* From here on, the domains in the registry are readonly |
| 1012 | * and only staging/challenges may be manipulated */ |
| 1013 | md_reg_freeze_domains(mc->reg, mc->mds); |
| 1014 | |
| 1015 | if (watched) { |
| 1016 | /*10*/ |
| 1017 | ap_log_error(APLOG_MARK, APLOG_DEBUG, rv, s, APLOGNO(10074) |
| 1018 | "%d out of %d mds need watching", watched, mc->mds->nelts); |
| 1019 | |
| 1020 | md_http_use_implementation(md_curl_get_impl(p)); |
nothing calls this directly
no test coverage detected