You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by st...@apache.org on 2015/05/05 16:20:20 UTC
svn commit: r1677832 - in /httpd/httpd/trunk/modules/ssl: ssl_engine_init.c
ssl_util_ssl.c ssl_util_ssl.h
Author: stsp
Date: Tue May 5 14:20:19 2015
New Revision: 1677832
URL: http://svn.apache.org/r1677832
Log:
mod_ssl namespacing: Move modssl_X509_INFO_load_file() into ssl_engine_init.c
and make it a static function called load_x509_info().
Modified:
httpd/httpd/trunk/modules/ssl/ssl_engine_init.c
httpd/httpd/trunk/modules/ssl/ssl_util_ssl.c
httpd/httpd/trunk/modules/ssl/ssl_util_ssl.h
Modified: httpd/httpd/trunk/modules/ssl/ssl_engine_init.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_engine_init.c?rev=1677832&r1=1677831&r2=1677832&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_engine_init.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_engine_init.c Tue May 5 14:20:19 2015
@@ -1221,6 +1221,30 @@ static apr_status_t ssl_init_ticket_key(
}
#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
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
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);
Modified: httpd/httpd/trunk/modules/ssl/ssl_util_ssl.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_util_ssl.c?rev=1677832&r1=1677831&r2=1677832&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_util_ssl.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_util_ssl.c Tue May 5 14:20:19 2015
@@ -413,36 +413,6 @@ BOOL modssl_X509_match_name(apr_pool_t *
/* _________________________________________________________________
**
-** Low-Level CA Certificate Loading
-** _________________________________________________________________
-*/
-
-BOOL modssl_X509_INFO_load_file(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;
-}
-
-/* _________________________________________________________________
-**
** Custom (EC)DH parameter support
** _________________________________________________________________
*/
Modified: httpd/httpd/trunk/modules/ssl/ssl_util_ssl.h
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_util_ssl.h?rev=1677832&r1=1677831&r2=1677832&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_util_ssl.h (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_util_ssl.h Tue May 5 14:20:19 2015
@@ -67,7 +67,6 @@ char *modssl_X509_NAME_ENTRY_to_st
char *modssl_X509_NAME_to_string(apr_pool_t *, X509_NAME *, int);
BOOL modssl_X509_getSAN(apr_pool_t *, X509 *, int, int, apr_array_header_t **);
BOOL modssl_X509_match_name(apr_pool_t *, X509 *, const char *, BOOL, server_rec *);
-BOOL modssl_X509_INFO_load_file(apr_pool_t *, STACK_OF(X509_INFO) *, const char *);
int SSL_CTX_use_certificate_chain(SSL_CTX *, char *, int, pem_password_cb *);
char *SSL_SESSION_id2sz(unsigned char *, int, char *, int);