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

Function single_resp_summary

modules/md/md_ocsp.c:567–589  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

565}
566
567static const char *single_resp_summary(OCSP_SINGLERESP* resp, apr_pool_t *p)
568{
569 const OCSP_CERTID *certid;
570 int status, reason = 0;
571 ASN1_GENERALIZEDTIME *bup = NULL, *bnextup = NULL;
572 md_timeperiod_t valid;
573
574#if OPENSSL_VERSION_NUMBER < 0x10100000L \
575 || (defined(LIBRESSL_VERSION_NUMBER) \
576 && LIBRESSL_VERSION_NUMBER < 0x2070000f)
577 certid = resp->certId;
578#else
579 certid = OCSP_SINGLERESP_get0_id(resp);
580#endif
581 status = OCSP_single_get0_status(resp, &reason, NULL, &bup, &bnextup);
582 valid.start = bup? md_asn1_generalized_time_get(bup) : apr_time_now();
583 valid.end = md_asn1_generalized_time_get(bnextup);
584
585 return apr_psprintf(p, "ocsp-single-resp[%s, status=%s, reason=%d, valid=%s]",
586 certid_summary(certid, p),
587 certstatus_string(status), reason,
588 md_timeperiod_print(p, &valid));
589}
590
591typedef struct {
592 apr_pool_t *p;

Callers 1

ostat_on_respFunction · 0.85

Calls 4

certid_summaryFunction · 0.85
certstatus_stringFunction · 0.85
md_timeperiod_printFunction · 0.85

Tested by

no test coverage detected