aboutsummaryrefslogtreecommitdiff
path: root/lib/keyverificationsession.h
diff options
context:
space:
mode:
authorAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-09-12 18:56:54 +0200
committerAlexey Rusakov <Kitsune-Ral@users.sf.net>2022-09-12 18:56:54 +0200
commitf4009215b500dbae4a10d1a86bb059272e47d0cb (patch)
tree3b0b2e9559133082f1658efd0ded5b6d54562c51 /lib/keyverificationsession.h
parente003251fa57589fcdaa28b99157a845415a25370 (diff)
downloadlibquotient-f4009215b500dbae4a10d1a86bb059272e47d0cb.tar.gz
libquotient-f4009215b500dbae4a10d1a86bb059272e47d0cb.zip
Only trust verification keys if the user verified the SAS
Diffstat (limited to 'lib/keyverificationsession.h')
-rw-r--r--lib/keyverificationsession.h3
1 files changed, 3 insertions, 0 deletions
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);