mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-27 23:17:13 +03:00
[CSE] Correctly Set's the client as connected
If we manage to encrypt and upload the private key to the server, the client is in it's connected state.
This commit is contained in:
parent
cfb6e3be8c
commit
0b50afe915
1 changed files with 8 additions and 2 deletions
|
@ -485,8 +485,14 @@ void ClientSideEncryption::encryptPrivateKey(EVP_PKEY *keyPair)
|
||||||
auto job = new StorePrivateKeyApiJob(_account, baseUrl + "private-key", this);
|
auto job = new StorePrivateKeyApiJob(_account, baseUrl + "private-key", this);
|
||||||
job->setPrivateKey(QByteArray((const char*) cryptedText, 128));
|
job->setPrivateKey(QByteArray((const char*) cryptedText, 128));
|
||||||
connect(job, &StorePrivateKeyApiJob::jsonReceived, [this](const QJsonDocument& doc, int retCode) {
|
connect(job, &StorePrivateKeyApiJob::jsonReceived, [this](const QJsonDocument& doc, int retCode) {
|
||||||
qCInfo(lcCse()) << doc;
|
switch(retCode) {
|
||||||
qCInfo(lcCse()) << "Store Private Key returned with" << retCode;
|
case 200:
|
||||||
|
qCInfo(lcCse()) << "Store private key working as expected.";
|
||||||
|
emit initializationFinished();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
qCInfo(lcCse()) << "Store private key failed, return code:" << retCode;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
job->start();
|
job->start();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue