| 838 | }; |
| 839 | |
| 840 | static int add_ocsp_row(void *baton, apr_size_t index, md_json_t *mdj) |
| 841 | { |
| 842 | status_ctx *ctx = baton; |
| 843 | const char *prefix = ctx->prefix; |
| 844 | int i; |
| 845 | |
| 846 | if (HTML_STATUS(ctx)) { |
| 847 | apr_brigade_printf(ctx->bb, NULL, NULL, "<tr class=\"%s\">", (index % 2)? "odd" : "even"); |
| 848 | for (i = 0; i < (int)(sizeof(ocsp_status_infos)/sizeof(ocsp_status_infos[0])); ++i) { |
| 849 | apr_brigade_puts(ctx->bb, NULL, NULL, "<td>"); |
| 850 | add_status_cell(ctx, mdj, &ocsp_status_infos[i]); |
| 851 | apr_brigade_puts(ctx->bb, NULL, NULL, "</td>"); |
| 852 | } |
| 853 | apr_brigade_puts(ctx->bb, NULL, NULL, "</tr>"); |
| 854 | } else { |
| 855 | for (i = 0; i < (int)(sizeof(ocsp_status_infos)/sizeof(ocsp_status_infos[0])); ++i) { |
| 856 | ctx->prefix = apr_pstrcat(ctx->p, prefix, apr_psprintf(ctx->p, "[%" APR_SIZE_T_FMT "]", index), NULL); |
| 857 | add_status_cell(ctx, mdj, &ocsp_status_infos[i]); |
| 858 | ctx->prefix = prefix; |
| 859 | } |
| 860 | } |
| 861 | return 1; |
| 862 | } |
| 863 | |
| 864 | int md_ocsp_status_hook(request_rec *r, int flags) |
| 865 | { |
nothing calls this directly
no test coverage detected