summary refs log tree commit diff
path: root/src/DeviceVerificationFlow.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-12-17 03:16:06 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2020-12-17 03:16:06 +0100
commit9d2177afe24401821aae6df925b8ca09fa0765d8 (patch)
treed1239cec72b5fb8219b7777b446a43fcc765cc43 /src/DeviceVerificationFlow.cpp
parentUpload cross-signing signatures after verification (diff)
downloadnheko-9d2177afe24401821aae6df925b8ca09fa0765d8.tar.xz
Request secrets after verification
Diffstat (limited to 'src/DeviceVerificationFlow.cpp')
-rw-r--r--src/DeviceVerificationFlow.cpp8
1 files changed, 8 insertions, 0 deletions
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();
+                }
         }
 }