From 4442e06b1f2558410dd95d2c895043c633d1fd10 Mon Sep 17 00:00:00 2001 From: Roberto Hidalgo Date: Mon, 4 Aug 2025 20:29:00 -0600 Subject: [PATCH] openssl: output unescaped utf8 x509 issuer/subject DNs Closes #18171 --- lib/vtls/openssl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.47.3