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

Function create_request

modules/ssl/ssl_engine_ocsp.c:105–125  ·  view source on GitHub ↗

Create an OCSP request for the given certificate; returning the * certificate ID in *certid and *issuer on success. Returns the * request object on success, or NULL on error. */

Source from the content-addressed store, hash-verified

103 * certificate ID in *certid and *issuer on success. Returns the
104 * request object on success, or NULL on error. */
105static OCSP_REQUEST *create_request(X509_STORE_CTX *ctx, X509 *cert,
106 OCSP_CERTID **certid,
107 server_rec *s, apr_pool_t *p,
108 SSLSrvConfigRec *sc)
109{
110 OCSP_REQUEST *req = OCSP_REQUEST_new();
111
112 *certid = OCSP_cert_to_id(NULL, cert, X509_STORE_CTX_get0_current_issuer(ctx));
113 if (!*certid || !OCSP_request_add0_id(req, *certid)) {
114 ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(01921)
115 "could not retrieve certificate id");
116 ssl_log_ssl_error(SSLLOG_MARK, APLOG_ERR, s);
117 return NULL;
118 }
119
120 if (sc->server->ocsp_use_request_nonce != FALSE) {
121 OCSP_request_add1_nonce(req, 0, -1);
122 }
123
124 return req;
125}
126
127/* Verify the OCSP status of given certificate. Returns
128 * V_OCSP_CERTSTATUS_* result code. */

Callers 1

verify_ocsp_statusFunction · 0.85

Calls 2

ssl_log_ssl_errorFunction · 0.85
ap_log_errorFunction · 0.50

Tested by

no test coverage detected