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

Function md_config_set_names

modules/md/mod_md_config.c:467–504  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

465}
466
467static const char *md_config_set_names(cmd_parms *cmd, void *dc,
468 int argc, char *const argv[])
469{
470 md_srv_conf_t *sc = md_config_get(cmd->server);
471 apr_array_header_t *domains = apr_array_make(cmd->pool, 5, sizeof(const char *));
472 const char *err;
473 md_t *md;
474 int i, transitive = -1;
475
476 (void)dc;
477 if ((err = md_conf_check_location(cmd, MD_LOC_NOT_MD))) {
478 return err;
479 }
480
481 for (i = 0; i < argc; ++i) {
482 if (NULL != set_transitive(&transitive, argv[i])) {
483 add_domain_name(domains, argv[i], cmd->pool);
484 }
485 }
486
487 if (domains->nelts == 0) {
488 return "needs at least one domain name";
489 }
490 md = md_create(cmd->pool, domains);
491
492 if (transitive >= 0) {
493 md->transitive = transitive;
494 }
495
496 if (cmd->config_file) {
497 md->defn_name = cmd->config_file->name;
498 md->defn_line_number = cmd->config_file->line_number;
499 }
500
501 APR_ARRAY_PUSH(sc->mc->mds, md_t *) = md;
502
503 return NULL;
504}
505
506static const char *md_config_set_ca(cmd_parms *cmd, void *dc,
507 int argc, char *const argv[])

Callers

nothing calls this directly

Calls 5

md_config_getFunction · 0.85
md_conf_check_locationFunction · 0.85
set_transitiveFunction · 0.85
add_domain_nameFunction · 0.85
md_createFunction · 0.85

Tested by

no test coverage detected