1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-05 16:55:50 +03:00

mod_ssl namespacing: Move modssl_X509_INFO_load_file() into ssl_engine_init.c

and make it a static function called load_x509_info().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1677832 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Stefan Sperling
2015-05-05 14:20:19 +00:00
parent 2548969450
commit aa6037fa61
3 changed files with 26 additions and 33 deletions

View File

@@ -1221,6 +1221,30 @@ static apr_status_t ssl_init_ticket_key(server_rec *s,
}
#endif
static BOOL load_x509_info(apr_pool_t *ptemp,
STACK_OF(X509_INFO) *sk,
const char *filename)
{
BIO *in;
if (!(in = BIO_new(BIO_s_file()))) {
return FALSE;
}
if (BIO_read_filename(in, filename) <= 0) {
BIO_free(in);
return FALSE;
}
ERR_clear_error();
PEM_X509_INFO_read_bio(in, sk, NULL, NULL);
BIO_free(in);
return TRUE;
}
static apr_status_t ssl_init_proxy_certs(server_rec *s,
apr_pool_t *p,
apr_pool_t *ptemp,
@@ -1243,7 +1267,7 @@ static apr_status_t ssl_init_proxy_certs(server_rec *s,
sk = sk_X509_INFO_new_null();
if (pkp->cert_file) {
modssl_X509_INFO_load_file(ptemp, sk, pkp->cert_file);
load_x509_info(ptemp, sk, pkp->cert_file);
}
if (pkp->cert_path) {
@@ -1262,7 +1286,7 @@ static apr_status_t ssl_init_proxy_certs(server_rec *s,
fullname = apr_pstrcat(ptemp,
pkp->cert_path, "/", dirent.name,
NULL);
modssl_X509_INFO_load_file(ptemp, sk, fullname);
load_x509_info(ptemp, sk, fullname);
}
apr_dir_close(dir);