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

Function add_ocsp_row

modules/md/mod_md_status.c:840–862  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

838};
839
840static 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
864int md_ocsp_status_hook(request_rec *r, int flags)
865{

Callers

nothing calls this directly

Calls 1

add_status_cellFunction · 0.85

Tested by

no test coverage detected