diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-07-08 14:53:25 +0100 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-07-08 14:53:25 +0100 |
commit | 5291ec78b5e0187aa873f911b9d907aa0139def5 (patch) | |
tree | 16e95740fd8c4455c109dee07e438431c63c1c53 /src/account.cpp | |
parent | 974e0984bd0d618093669780a75739d4b02fd3b2 (diff) |
Send the public part of the one time key rather than passing an identifier
Diffstat (limited to 'src/account.cpp')
-rw-r--r-- | src/account.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/account.cpp b/src/account.cpp index 54edf6e..297d2f4 100644 --- a/src/account.cpp +++ b/src/account.cpp @@ -18,10 +18,12 @@ olm::OneTimeKey const * olm::Account::lookup_key( - std::uint32_t id + olm::Curve25519PublicKey const & public_key ) { for (olm::OneTimeKey const & key : one_time_keys) { - if (key.id == id) return &key; + if (0 == memcmp(key.key.public_key, public_key.public_key, 32)) { + return &key; + } } return 0; } |