httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1677149 - in /httpd/httpd/trunk/modules/ssl: ssl_util_ssl.c ssl_util_ssl.h
Date Fri, 01 May 2015 14:29:00 GMT
Author: stsp
Date: Fri May  1 14:28:59 2015
New Revision: 1677149

URL: http://svn.apache.org/r1677149
Log:
mod_ssl namespacing: Make SSL_ASN1_STRING_to_utf8 a static function inside
ssl_util_ssl.c (no callers outside this file). The new static function name
chosen is convert_asn1_to_utf8, based on the assumption that neither SSL_
nor ASN1_ are safe prefixes to use without potential future overlap.

Modified:
    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_util_ssl.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_util_ssl.c?rev=1677149&r1=1677148&r2=1677149&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_util_ssl.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_util_ssl.c Fri May  1 14:28:59 2015
@@ -191,7 +191,7 @@ BOOL modssl_X509_getBC(X509 *cert, int *
 }
 
 /* convert an ASN.1 string to a UTF-8 string (escaping control characters) */
-char *SSL_ASN1_STRING_to_utf8(apr_pool_t *p, ASN1_STRING *asn1str)
+static char *convert_asn1_to_utf8(apr_pool_t *p, ASN1_STRING *asn1str)
 {
     char *result = NULL;
     BIO *bio;
@@ -215,7 +215,7 @@ char *SSL_ASN1_STRING_to_utf8(apr_pool_t
 /* convert a NAME_ENTRY to UTF8 string */
 char *SSL_X509_NAME_ENTRY_to_string(apr_pool_t *p, X509_NAME_ENTRY *xsne)
 {
-    char *result = SSL_ASN1_STRING_to_utf8(p, X509_NAME_ENTRY_get_data(xsne));
+    char *result = convert_asn1_to_utf8(p, X509_NAME_ENTRY_get_data(xsne));
     ap_xlate_proto_from_ascii(result, len);
     return result;
 }
@@ -282,7 +282,7 @@ BOOL SSL_X509_getSAN(apr_pool_t *p, X509
                     switch (type) {
                     case GEN_EMAIL:
                     case GEN_DNS:
-                        utf8str = SSL_ASN1_STRING_to_utf8(p, name->d.ia5);
+                        utf8str = convert_asn1_to_utf8(p, name->d.ia5);
                         if (utf8str) {
                             APR_ARRAY_PUSH(*entries, const char *) = utf8str;
                         }

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=1677149&r1=1677148&r2=1677149&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_util_ssl.h (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_util_ssl.h Fri May  1 14:28:59 2015
@@ -63,7 +63,6 @@ void        modssl_set_app_data2(SSL *,
 EVP_PKEY   *modssl_read_privatekey(const char *, EVP_PKEY **, pem_password_cb *, void *);
 int         modssl_smart_shutdown(SSL *ssl);
 BOOL        modssl_X509_getBC(X509 *, int *, int *);
-char       *SSL_ASN1_STRING_to_utf8(apr_pool_t *, ASN1_STRING *);
 char       *SSL_X509_NAME_ENTRY_to_string(apr_pool_t *p, X509_NAME_ENTRY *xsne);
 char       *SSL_X509_NAME_to_string(apr_pool_t *, X509_NAME *, int);
 BOOL        SSL_X509_getSAN(apr_pool_t *, X509 *, int, int, apr_array_header_t **);



Mime
View raw message