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>
This commit is contained in:
Robert Adam 2021-03-17 20:46:30 +01:00
parent a188c078eb
commit dd50b01ff3

View File

@ -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;