diff options
-rw-r--r-- | store/src/backend/mod.rs | 8 | ||||
-rw-r--r-- | store/src/lib.rs | 12 | ||||
-rw-r--r-- | store/src/store_protocol.capnp | 2 | ||||
-rw-r--r-- | tool/src/commands/mod.rs | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/store/src/backend/mod.rs b/store/src/backend/mod.rs index 4e9759c7..b05da547 100644 --- a/store/src/backend/mod.rs +++ b/store/src/backend/mod.rs @@ -350,10 +350,10 @@ impl node::store::Server for StoreServer { Promise::ok(()) } - fn lookup_by_keyid(&mut self, - params: node::store::LookupByKeyidParams, - mut results: node::store::LookupByKeyidResults) - -> Promise<(), capnp::Error> { + fn lookup_by_subkeyid(&mut self, + params: node::store::LookupBySubkeyidParams, + mut results: node::store::LookupBySubkeyidResults) + -> Promise<(), capnp::Error> { bind_results!(results); let keyid = pry!(params.get()).get_keyid(); diff --git a/store/src/lib.rs b/store/src/lib.rs index ddb80cf4..ad863787 100644 --- a/store/src/lib.rs +++ b/store/src/lib.rs @@ -396,7 +396,7 @@ impl Store { Ok(Binding::new(self.core.clone(), Some(label), binding)) } - /// Looks up a key by KeyID. + /// Looks up a key by (Sub)KeyID. /// /// The KeyID may also reference a signing- or /// certification-capable subkey. The reason for this restriction @@ -425,19 +425,19 @@ impl Store { /// store.import("Emmelie", &tpk)?; /// /// // Lookup by the primary key's KeyID. - /// let tpk_ = store.lookup_by_keyid(&KeyID::from_hex("069C0C348DD82C19")?)? + /// let tpk_ = store.lookup_by_subkeyid(&KeyID::from_hex("069C0C348DD82C19")?)? /// .tpk()?; /// assert_eq!(tpk, tpk_); /// - /// // Lookup by the encryption subkey's KeyID. - /// let tpk_ = store.lookup_by_keyid(&KeyID::from_hex("22E3FAFE96B56C32")?)? + /// // Lookup by the subkey's KeyID. + /// let tpk_ = store.lookup_by_subkeyid(&KeyID::from_hex("22E3FAFE96B56C32")?)? /// .tpk()?; /// assert_eq!(tpk, tpk_); /// # Ok(()) /// # } /// ``` - pub fn lookup_by_keyid(&self, keyid: &KeyID) -> Result<Binding> { - let mut request = self.store.lookup_by_keyid_request(); + pub fn lookup_by_subkeyid(&self, keyid: &KeyID) -> Result<Binding> { + let mut request = self.store.lookup_by_subkeyid_request(); request.get().set_keyid(keyid.as_u64()?); let binding = make_request!(self.core.borrow_mut(), request)?; let mut binding = Binding::new(self.core.clone(), None, binding); diff --git a/store/src/store_protocol.capnp b/store/src/store_protocol.capnp index fba953ad..7bec0b59 100644 --- a/store/src/store_protocol.capnp +++ b/store/src/store_protocol.capnp @@ -16,7 +16,7 @@ interface Node { delete @2 () -> (result: Result(Unit)); iter @3 () -> (result: Result(BindingIter)); log @4 () -> (result: Result(LogIter)); - lookupByKeyid @5 (keyid: UInt64) -> (result: Result(Binding)); + lookupBySubkeyid @5 (keyid: UInt64) -> (result: Result(Binding)); } interface Binding { diff --git a/tool/src/commands/mod.rs b/tool/src/commands/mod.rs index 147db635..0c6a5295 100644 --- a/tool/src/commands/mod.rs +++ b/tool/src/commands/mod.rs @@ -407,7 +407,7 @@ impl<'a> VerificationHelper for VHelper<'a> { // Try to get missing TPKs from the store. for id in ids.iter().filter(|i| !seen.contains(i)) { let _ = - self.store.lookup_by_keyid(id) + self.store.lookup_by_subkeyid(id) .and_then(|binding| { self.labels.insert(id.clone(), binding.label()?); binding.tpk() |