[CSE] Adjust the CN accordingly to the server

This commit is contained in:
Tomaz Canabrava 2017-11-06 20:57:50 +01:00
parent 131fd4e483
commit 7290cf2813

View file

@ -311,12 +311,15 @@ void ClientSideEncryption::generateKeyPair()
QString ClientSideEncryption::generateCSR(EVP_PKEY *keyPair)
{
// OpenSSL expects const char.
auto cnArray = _account->davUser().toLocal8Bit();
qCInfo(lcCse()) << "Getting the following array for the account Id" << cnArray;
auto certParams = std::map<const char *, const char*>{
{"C", "DE"},
{"ST", "Baden-Wuerttemberg"},
{"L", "Stuttgart"},
{"O","Nextcloud"},
{"CN", "www.nextcloud.com"}
{"CN", cnArray.constData()}
};
int ret = 0;