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

Function extract_responder_uri

modules/ssl/ssl_engine_ocsp.c:24–49  ·  view source on GitHub ↗

Return the responder URI specified in the given certificate, or * NULL if none specified. */

Source from the content-addressed store, hash-verified

22/* Return the responder URI specified in the given certificate, or
23 * NULL if none specified. */
24static const char *extract_responder_uri(X509 *cert, apr_pool_t *pool)
25{
26 STACK_OF(ACCESS_DESCRIPTION) *values;
27 char *result = NULL;
28 int j;
29
30 values = X509_get_ext_d2i(cert, NID_info_access, NULL, NULL);
31 if (!values) {
32 return NULL;
33 }
34
35 for (j = 0; j < sk_ACCESS_DESCRIPTION_num(values) && !result; j++) {
36 ACCESS_DESCRIPTION *value = sk_ACCESS_DESCRIPTION_value(values, j);
37
38 /* Name found in extension, and is a URI: */
39 if (OBJ_obj2nid(value->method) == NID_ad_OCSP
40 && value->location->type == GEN_URI) {
41 const ASN1_STRING *uri = value->location->d.uniformResourceIdentifier;
42 result = modssl_ASN1_STRING_convert(pool, uri, 0);
43 }
44 }
45
46 AUTHORITY_INFO_ACCESS_free(values);
47
48 return result;
49}
50
51/* Return the responder URI object which should be used in the given
52 * configuration for the given certificate, or NULL if none can be

Callers 1

determine_responder_uriFunction · 0.85

Calls 1

Tested by

no test coverage detected