From c80e253a2432d39c5548052fabeeb7408eda1f23 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Tue, 31 Aug 2021 04:06:51 +0200 Subject: Stop encrypting all sessions with secret --- src/Olm.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/Olm.cpp') diff --git a/src/Olm.cpp b/src/Olm.cpp index 25f4bfc0..72dc582f 100644 --- a/src/Olm.cpp +++ b/src/Olm.cpp @@ -27,7 +27,6 @@ auto client_ = std::make_unique(); std::map request_id_to_secret_name; -const std::string STORAGE_SECRET_KEY("secret"); constexpr auto MEGOLM_ALGO = "m.megolm.v1.aes-sha2"; } @@ -483,7 +482,7 @@ handle_pre_key_olm_message(const std::string &sender, // We also remove the one time key used to establish that // session so we'll have to update our copy of the account object. - cache::saveOlmAccount(olm::client()->save("secret")); + cache::saveOlmAccount(olm::client()->save(cache::client()->pickleSecret())); } catch (const mtx::crypto::olm_exception &e) { nhlog::crypto()->critical( "failed to create inbound session with {}: {}", sender, e.what()); @@ -938,7 +937,7 @@ void mark_keys_as_published() { olm::client()->mark_keys_as_published(); - cache::saveOlmAccount(olm::client()->save(STORAGE_SECRET_KEY)); + cache::saveOlmAccount(olm::client()->save(cache::client()->pickleSecret())); } void -- cgit 1.5.1