From 7b6fab33731e369a860ab217709190e9457d6d76 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Wed, 7 Oct 2020 23:03:14 +0200 Subject: Calculate verification status from cross-signing sigs and update dynamically --- src/CacheCryptoStructs.h | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'src/CacheCryptoStructs.h') 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 verified_devices; +}; + +//! In memory cache of verification status +struct VerificationStorage +{ + //! mapping of user to verification status + std::map 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 device_verified; - //! list of verified device_ids with cross-signing, calculated from master key - std::vector cross_verified; //! list of devices the user blocks std::vector device_blocked; - //! The verified master key. - std::string verified_master_key; }; void -- cgit 1.5.1