]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_ssl namespacing: Make SSL_ASN1_STRING_to_utf8 a static function inside
authorStefan Sperling <stsp@apache.org>
Fri, 1 May 2015 14:28:59 +0000 (14:28 +0000)
committerStefan Sperling <stsp@apache.org>
Fri, 1 May 2015 14:28:59 +0000 (14:28 +0000)
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.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1677149 13f79535-47bb-0310-9956-ffa450edef68

modules/ssl/ssl_util_ssl.c
modules/ssl/ssl_util_ssl.h

index 1256288e6489c3e6d1df2f9b587e7e128396721b..4a335920db0aa6d1beeaf10d3ebe80342b157035 100644 (file)
@@ -191,7 +191,7 @@ BOOL modssl_X509_getBC(X509 *cert, int *ca, int *pathlen)
 }
 
 /* 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 *p, ASN1_STRING *asn1str)
 /* 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 *x509, int type, int idx,
                     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;
                         }
index 67f6642e42cd5031fc2e41c04c1afc4b6f91ef8b..a30dfb5e4d001e77a515822d20d7f9e5638ee469 100644 (file)
@@ -63,7 +63,6 @@ void        modssl_set_app_data2(SSL *, void *);
 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 **);