From: Roberto Hidalgo Date: Tue, 5 Aug 2025 02:29:00 +0000 (-0600) Subject: openssl: output unescaped utf8 x509 issuer/subject DNs X-Git-Tag: curl-8_16_0~250 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4442e06b1f2558410dd95d2c895043c633d1fd10;p=thirdparty%2Fcurl.git openssl: output unescaped utf8 x509 issuer/subject DNs Closes #18171 --- diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index 3cc0d8630b..a2ab831f20 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -1856,8 +1856,10 @@ static CURLcode x509_name_oneline(X509_NAME *a, struct dynbuf *d) CURLcode result = CURLE_OUT_OF_MEMORY; if(bio_out) { + unsigned long flags = XN_FLAG_SEP_SPLUS_SPC | + (XN_FLAG_ONELINE & ~ASN1_STRFLGS_ESC_MSB & ~XN_FLAG_SPC_EQ); curlx_dyn_reset(d); - rc = X509_NAME_print_ex(bio_out, a, 0, XN_FLAG_SEP_SPLUS_SPC); + rc = X509_NAME_print_ex(bio_out, a, 0, flags); if(rc != -1) { BIO_get_mem_ptr(bio_out, &biomem); result = curlx_dyn_addn(d, biomem->data, biomem->length);