| 382 | } |
| 383 | |
| 384 | static 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 | |
| 413 | static int count_certs(void *baton, const char *key, md_json_t *json) |
| 414 | { |
nothing calls this directly
no test coverage detected