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

Function add_must_staple

modules/md/md_crypt.c:1830–1849  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1828}
1829
1830static apr_status_t add_must_staple(STACK_OF(X509_EXTENSION) *exts, const char *name, apr_pool_t *p)
1831{
1832 X509_EXTENSION *x;
1833 int nid;
1834
1835 nid = MD_GET_NID(MUST_STAPLE);
1836 if (NID_undef == nid) {
1837 md_log_perror(MD_LOG_MARK, MD_LOG_ERR, 0, p,
1838 "%s: unable to get NID for v3 must-staple TLS feature", name);
1839 return APR_ENOTIMPL;
1840 }
1841 x = X509V3_EXT_conf_nid(NULL, NULL, nid, (char*)"DER:30:03:02:01:05");
1842 if (NULL == x) {
1843 md_log_perror(MD_LOG_MARK, MD_LOG_ERR, 0, p,
1844 "%s: unable to create x509 extension for must-staple", name);
1845 return APR_EGENERAL;
1846 }
1847 sk_X509_EXTENSION_push(exts, x);
1848 return APR_SUCCESS;
1849}
1850
1851apr_status_t md_cert_req_create(const char **pcsr_der_64, const char *name,
1852 apr_array_header_t *domains, int must_staple,

Callers 1

md_cert_req_createFunction · 0.85

Calls 1

md_log_perrorFunction · 0.85

Tested by

no test coverage detected