From: Stefan Sperling Date: Fri, 1 May 2015 14:28:59 +0000 (+0000) Subject: mod_ssl namespacing: Make SSL_ASN1_STRING_to_utf8 a static function inside X-Git-Tag: 2.5.0-alpha~3198 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=998507fd2c80bddc7435794ec720b72a7a098f1d;p=thirdparty%2Fapache%2Fhttpd.git 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1677149 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/ssl/ssl_util_ssl.c b/modules/ssl/ssl_util_ssl.c index 1256288e648..4a335920db0 100644 --- a/modules/ssl/ssl_util_ssl.c +++ b/modules/ssl/ssl_util_ssl.c @@ -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; } diff --git a/modules/ssl/ssl_util_ssl.h b/modules/ssl/ssl_util_ssl.h index 67f6642e42c..a30dfb5e4d0 100644 --- a/modules/ssl/ssl_util_ssl.h +++ b/modules/ssl/ssl_util_ssl.h @@ -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 **);