httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kaspar Brand <>
Subject Re: UTF-8 strings through ap_log_cerror()?
Date Wed, 28 Apr 2010 08:10:21 GMT
On 28.04.2010 04:29, Sander Temme wrote:
> According to dr. Stephen, the correct function to call is
> X509_NAME_print_ex(), but that writes to a BIO.  Could a string be
> made of a BIO?  And if one were, would ap_log_cerror() be able to
> print it in all its UTF-8-y glory?

I'm not sure if it's considered the "canonical" way, but you can use a
memory BIO (BIO_s_mem) for this, and then retrieve the string through

AFAICT, ap_log_cerror would again escape those UTF-8 sequences, however
(T_ESCAPE_LOGITEM is set for all characters > 127, see

Moving away from X509_NAME_oneline() seems like a good idea to me,
generally speaking - X509_NAME_print_ex gives you much better control
over the output format (XN_FLAG_RFC2253 would probably be a reasonable
default choice).


View raw message