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

Function md_cert_fload

modules/md/md_crypt.c:1421–1443  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1419}
1420
1421apr_status_t md_cert_fload(md_cert_t **pcert, apr_pool_t *p, const char *fname)
1422{
1423 FILE *f;
1424 apr_status_t rv;
1425 md_cert_t *cert;
1426 X509 *x509;
1427
1428 rv = md_util_fopen(&f, fname, "r");
1429 if (rv == APR_SUCCESS) {
1430
1431 x509 = PEM_read_X509(f, NULL, NULL, NULL);
1432 rv = fclose(f);
1433 if (x509 != NULL) {
1434 cert = md_cert_make(p, x509);
1435 }
1436 else {
1437 rv = APR_EINVAL;
1438 }
1439 }
1440
1441 *pcert = (APR_SUCCESS == rv)? cert : NULL;
1442 return rv;
1443}
1444
1445static apr_status_t cert_to_buffer(md_data_t *buffer, const md_cert_t *cert, apr_pool_t *p)
1446{

Callers 2

mk_pubcertFunction · 0.85
fs_floadFunction · 0.85

Calls 2

md_util_fopenFunction · 0.85
md_cert_makeFunction · 0.85

Tested by

no test coverage detected