| 252 | } |
| 253 | |
| 254 | static void *md_config_merge(apr_pool_t *pool, void *basev, void *addv) |
| 255 | { |
| 256 | md_srv_conf_t *base = (md_srv_conf_t *)basev; |
| 257 | md_srv_conf_t *add = (md_srv_conf_t *)addv; |
| 258 | md_srv_conf_t *nsc; |
| 259 | char *name = apr_pstrcat(pool, "[", CONF_S_NAME(add->s), ", ", CONF_S_NAME(base->s), "]", NULL); |
| 260 | |
| 261 | nsc = (md_srv_conf_t *)apr_pcalloc(pool, sizeof(md_srv_conf_t)); |
| 262 | nsc->name = name; |
| 263 | nsc->mc = add->mc? add->mc : base->mc; |
| 264 | |
| 265 | nsc->transitive = (add->transitive != DEF_VAL)? add->transitive : base->transitive; |
| 266 | nsc->require_https = (add->require_https != MD_REQUIRE_UNSET)? add->require_https : base->require_https; |
| 267 | nsc->renew_mode = (add->renew_mode != DEF_VAL)? add->renew_mode : base->renew_mode; |
| 268 | nsc->must_staple = (add->must_staple != DEF_VAL)? add->must_staple : base->must_staple; |
| 269 | nsc->pks = (!md_pkeys_spec_is_empty(add->pks))? add->pks : base->pks; |
| 270 | nsc->renew_window = add->renew_window? add->renew_window : base->renew_window; |
| 271 | nsc->warn_window = add->warn_window? add->warn_window : base->warn_window; |
| 272 | |
| 273 | nsc->ca_urls = add->ca_urls? apr_array_copy(pool, add->ca_urls) |
| 274 | : (base->ca_urls? apr_array_copy(pool, base->ca_urls) : NULL); |
| 275 | nsc->ca_contact = add->ca_contact? add->ca_contact : base->ca_contact; |
| 276 | nsc->ca_proto = add->ca_proto? add->ca_proto : base->ca_proto; |
| 277 | nsc->ca_agreement = add->ca_agreement? add->ca_agreement : base->ca_agreement; |
| 278 | nsc->ca_challenges = (add->ca_challenges? apr_array_copy(pool, add->ca_challenges) |
| 279 | : (base->ca_challenges? apr_array_copy(pool, base->ca_challenges) : NULL)); |
| 280 | nsc->ca_eab_kid = add->ca_eab_kid? add->ca_eab_kid : base->ca_eab_kid; |
| 281 | nsc->ca_eab_hmac = add->ca_eab_hmac? add->ca_eab_hmac : base->ca_eab_hmac; |
| 282 | nsc->profile = add->profile? add->profile : base->profile; |
| 283 | nsc->profile_mandatory = (add->profile_mandatory != DEF_VAL)? add->profile_mandatory : base->profile_mandatory; |
| 284 | nsc->stapling = (add->stapling != DEF_VAL)? add->stapling : base->stapling; |
| 285 | nsc->staple_others = (add->staple_others != DEF_VAL)? add->staple_others : base->staple_others; |
| 286 | nsc->ari_renewals = (add->ari_renewals != DEF_VAL)? add->ari_renewals : base->ari_renewals; |
| 287 | nsc->dns01_cmd = (add->dns01_cmd)? add->dns01_cmd : base->dns01_cmd; |
| 288 | nsc->current = NULL; |
| 289 | |
| 290 | return nsc; |
| 291 | } |
| 292 | |
| 293 | void *md_config_merge_svr(apr_pool_t *pool, void *basev, void *addv) |
| 294 | { |
no test coverage detected