From f4009215b500dbae4a10d1a86bb059272e47d0cb Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Mon, 12 Sep 2022 18:56:54 +0200 Subject: Only trust verification keys if the user verified the SAS --- lib/keyverificationsession.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/keyverificationsession.h') diff --git a/lib/keyverificationsession.h b/lib/keyverificationsession.h index aa0295cb..075ea1e2 100644 --- a/lib/keyverificationsession.h +++ b/lib/keyverificationsession.h @@ -125,6 +125,8 @@ private: bool macReceived = false; bool m_encrypted; QStringList m_remoteSupportedMethods; + bool m_verified = false; + QString m_pendingEdKeyId{}; void handleReady(const KeyVerificationReadyEvent& event); void handleStart(const KeyVerificationStartEvent& event); @@ -138,6 +140,7 @@ private: void setError(Error error); static QString errorToString(Error error); static Error stringToError(const QString& error); + void trustKeys(); QByteArray macInfo(bool verifying, const QString& key = "KEY_IDS"_ls); QString calculateMac(const QString& input, bool verifying, const QString& keyId= "KEY_IDS"_ls); -- cgit v1.2.3