From dd50b01ff30b6257690458eb30cd99b384e60f58 Mon Sep 17 00:00:00 2001 From: Robert Adam Date: Wed, 17 Mar 2021 20:46:30 +0100 Subject: FIX(client): Use Utf8 for name field in certificat Otherwise names using non-ASCII characters won't be handled properly. Fixes #4871 Co-Authored-By: Davide Beatrici --- src/SelfSignedCertificate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/SelfSignedCertificate.cpp b/src/SelfSignedCertificate.cpp index 85640aa32..a77e5fad9 100644 --- a/src/SelfSignedCertificate.cpp +++ b/src/SelfSignedCertificate.cpp @@ -141,7 +141,7 @@ bool SelfSignedCertificate::generate(CertificateType certificateType, QString cl } } - if (X509_NAME_add_entry_by_txt(name, "CN", MBSTRING_ASC, + if (X509_NAME_add_entry_by_txt(name, "CN", MBSTRING_UTF8, reinterpret_cast< unsigned char * >(commonName.toUtf8().data()), -1, -1, 0) == 0) { ok = false; -- cgit v1.2.3