[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) QString ClientSideEncryption::generateCSR(EVP_PKEY *keyPair)
{ {
// OpenSSL expects const char. // 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*>{ auto certParams = std::map<const char *, const char*>{
{"C", "DE"}, {"C", "DE"},
{"ST", "Baden-Wuerttemberg"}, {"ST", "Baden-Wuerttemberg"},
{"L", "Stuttgart"}, {"L", "Stuttgart"},
{"O","Nextcloud"}, {"O","Nextcloud"},
{"CN", "www.nextcloud.com"} {"CN", cnArray.constData()}
}; };
int ret = 0; int ret = 0;