diff options
author | Robert Adam <dev@robert-adam.de> | 2021-03-17 22:46:30 +0300 |
---|---|---|
committer | Robert Adam <dev@robert-adam.de> | 2021-03-17 22:46:30 +0300 |
commit | dd50b01ff30b6257690458eb30cd99b384e60f58 (patch) | |
tree | 44cf3ebec2ee1303df2dabfd5335f2f95c7c93a5 | |
parent | a188c078eb948a30accb106a5d8737e89b064b93 (diff) |
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 <git@davidebeatrici.dev>
-rw-r--r-- | src/SelfSignedCertificate.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; |