Re: svn commit: r1677149 - in /httpd/httpd/trunk/modules/ssl: ssl_util_ssl.c ssl_util_ssl.h

2015-05-02 Thread Kaspar Brand
On 01.05.2015 16:29, s...@apache.org wrote:
> 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.

Thanks for pushing ahead with the namespace cleanup, Stefan. I'm fine
with making the function static, but would suggest to rename it to
"asn1_string_to_utf8" instead - first, because it's really limited to
ASN.1 strings (doesn't deal with arbitrary ASN.1 data), and second,
because the "_to_" already implies a conversion (plus it matches the
naming of the other comparable functions in ssl_util_ssl.c).

Kaspar


Re: svn commit: r1677149 - in /httpd/httpd/trunk/modules/ssl: ssl_util_ssl.c ssl_util_ssl.h

2015-05-02 Thread Stefan Sperling
On Sat, May 02, 2015 at 11:10:50AM +0200, Kaspar Brand wrote:
> On 01.05.2015 16:29, s...@apache.org wrote:
> > 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.
> 
> Thanks for pushing ahead with the namespace cleanup, Stefan. I'm fine
> with making the function static, but would suggest to rename it to
> "asn1_string_to_utf8" instead - first, because it's really limited to
> ASN.1 strings (doesn't deal with arbitrary ASN.1 data), and second,
> because the "_to_" already implies a conversion (plus it matches the
> naming of the other comparable functions in ssl_util_ssl.c).
> 
> Kaspar

Done: http://svn.apache.org/r1677339

I had minor reservations about using the asn1_ prefix since it is used
inside of OpenSSL (though not in public APIs) and it is used in public APIs
by GNU Libtasn1, used by GnuTLS. But it seems unnecessary to avoid a
clash with asn1_ because mod_ssl's is a static function and mod_ssl
won't compile with GnuTLS anyway.