From 9d2177afe24401821aae6df925b8ca09fa0765d8 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Thu, 17 Dec 2020 03:16:06 +0100 Subject: Request secrets after verification --- src/DeviceVerificationFlow.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/DeviceVerificationFlow.cpp') diff --git a/src/DeviceVerificationFlow.cpp b/src/DeviceVerificationFlow.cpp index 1ffb8b3e..f692629e 100644 --- a/src/DeviceVerificationFlow.cpp +++ b/src/DeviceVerificationFlow.cpp @@ -761,6 +761,14 @@ DeviceVerificationFlow::acceptDevice() cache::markDeviceVerified(this->toClient.to_string(), this->deviceId.toStdString()); this->sendVerificationDone(); setState(Success); + + // Request secrets. We should probably check somehow, if a device knowns about the + // secrets. + if (utils::localUser().toStdString() == this->toClient.to_string() && + (!cache::secret(mtx::secret_storage::secrets::cross_signing_self_signing) || + !cache::secret(mtx::secret_storage::secrets::cross_signing_user_signing))) { + olm::request_cross_signing_keys(); + } } } -- cgit 1.5.1