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

Function si_val_ca_urls

modules/md/mod_md_status.c:384–411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

382}
383
384static void si_val_ca_urls(status_ctx *ctx, md_json_t *mdj, const status_info *info)
385{
386 md_json_t *jcert;
387 const char *proto, *url;
388 apr_array_header_t *urls;
389 int i;
390
391 jcert = md_json_getj(mdj, info->key, NULL);
392 if (!jcert) {
393 return;
394 }
395
396 proto = md_json_gets(jcert, MD_KEY_PROTO, NULL);
397 url = md_json_gets(jcert, MD_KEY_URL, NULL);
398 if (url) {
399 /* print the effective CA url used, if set */
400 val_url_print(ctx, info, url, proto, 0);
401 }
402 else {
403 /* print the available CA urls configured */
404 urls = apr_array_make(ctx->p, 3, sizeof(const char*));
405 md_json_getsa(urls, jcert, MD_KEY_URLS, NULL);
406 for (i = 0; i < urls->nelts; ++i) {
407 url = APR_ARRAY_IDX(urls, i, const char*);
408 val_url_print(ctx, info, url, proto, i);
409 }
410 }
411}
412
413static int count_certs(void *baton, const char *key, md_json_t *json)
414{

Callers

nothing calls this directly

Calls 4

md_json_getjFunction · 0.85
md_json_getsFunction · 0.85
val_url_printFunction · 0.85
md_json_getsaFunction · 0.85

Tested by

no test coverage detected