diff options
author | Neal H. Walfield <neal@pep.foundation> | 2018-11-20 12:38:12 +0100 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2018-11-20 12:38:12 +0100 |
commit | a1eba557ff62f09bef2c7e379a238c643ac240d7 (patch) | |
tree | cca69f136c70f08947071fd6bc0c6c4462aa27d8 /store | |
parent | 12150ceb5e90c6b7419943f9c80c21917cd0b7a4 (diff) |
store: Insert all subkeys into the key_by_keyid table.
- A PKESK may contain the keyid of the encryption key that the
session key was encrypted for. When doing a reply to all, it is
useful to use this information to do key discovery. Currently,
the Store only includes signing and certification capable subkeys
in the key_to_keyid table. This change includes all keys, which
enables this use case.
Diffstat (limited to 'store')
-rw-r--r-- | store/src/backend/mod.rs | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/store/src/backend/mod.rs b/store/src/backend/mod.rs index b98a6ede..25a4f3f0 100644 --- a/store/src/backend/mod.rs +++ b/store/src/backend/mod.rs @@ -793,15 +793,7 @@ impl KeyServer { /// Keeps the mapping of (sub)KeyIDs to keys up-to-date. fn reindex_subkeys(c: &Connection, key_id: ID, tpk: &TPK) -> Result<()> { - for (sig, key) in tpk.keys() { - // Only index signing- or certification-capable subkeys. - if ! sig.map(|s| s.key_flags().can_sign() - || s.key_flags().can_certify()) - .unwrap_or(true) - { - continue; - } - + for (_, key) in tpk.keys() { let keyid = key.fingerprint().to_keyid().as_u64() .expect("computed keyid is valid"); |