From a1eba557ff62f09bef2c7e379a238c643ac240d7 Mon Sep 17 00:00:00 2001 From: "Neal H. Walfield" Date: Tue, 20 Nov 2018 12:38:12 +0100 Subject: 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. --- store/src/backend/mod.rs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'store/src/backend/mod.rs') 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"); -- cgit v1.2.3