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

Function modssl_cert_get_pem

modules/ssl/ssl_util_ssl.c:593–614  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

591}
592
593apr_status_t modssl_cert_get_pem(apr_pool_t *p,
594 X509 *cert1, X509 *cert2,
595 const char **ppem)
596{
597 apr_status_t rv = APR_ENOMEM;
598 BIO *bio;
599
600 if ((bio = BIO_new(BIO_s_mem())) == NULL) goto cleanup;
601 if (PEM_write_bio_X509(bio, cert1) != 1) goto cleanup;
602 if (cert2 && PEM_write_bio_X509(bio, cert2) != 1) goto cleanup;
603 rv = APR_SUCCESS;
604
605cleanup:
606 if (rv != APR_SUCCESS) {
607 *ppem = NULL;
608 if (bio) BIO_free(bio);
609 }
610 else {
611 *ppem = modssl_bio_free_read(p, bio);
612 }
613 return rv;
614}
615
616void modssl_set_reneg_state(SSLConnRec *sslconn, modssl_reneg_state state)
617{

Callers 1

ssl_stapling_init_certFunction · 0.85

Calls 1

modssl_bio_free_readFunction · 0.85

Tested by

no test coverage detected