summary refs log tree commit diff
path: root/src/CacheCryptoStructs.h
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-10-07 23:03:14 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2020-10-08 00:20:12 +0200
commit7b6fab33731e369a860ab217709190e9457d6d76 (patch)
tree75d0cfb1e4b35e1f2dc7b293dfb8f5732f1c11a8 /src/CacheCryptoStructs.h
parentFix in room verification (diff)
downloadnheko-7b6fab33731e369a860ab217709190e9457d6d76.tar.xz
Calculate verification status from cross-signing sigs and update dynamically
Diffstat (limited to 'src/CacheCryptoStructs.h')
-rw-r--r--src/CacheCryptoStructs.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/CacheCryptoStructs.h b/src/CacheCryptoStructs.h

index 10636ac6..935d6493 100644 --- a/src/CacheCryptoStructs.h +++ b/src/CacheCryptoStructs.h
@@ -66,6 +66,23 @@ struct OlmSessionStorage std::mutex group_inbound_mtx; }; +//! Verification status of a single user +struct VerificationStatus +{ + //! True, if the users master key is verified + bool user_verified = false; + //! List of all devices marked as verified + std::vector<std::string> verified_devices; +}; + +//! In memory cache of verification status +struct VerificationStorage +{ + //! mapping of user to verification status + std::map<std::string, VerificationStatus> status; + std::mutex verification_storage_mtx; +}; + // this will store the keys of the user with whom a encrypted room is shared with struct UserKeyCache { @@ -90,12 +107,8 @@ struct VerificationCache { //! list of verified device_ids with device-verification std::vector<std::string> device_verified; - //! list of verified device_ids with cross-signing, calculated from master key - std::vector<std::string> cross_verified; //! list of devices the user blocks std::vector<std::string> device_blocked; - //! The verified master key. - std::string verified_master_key; }; void