diff options
author | Neal H. Walfield <neal@pep.foundation> | 2018-01-14 22:34:38 +0100 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2018-01-14 22:36:44 +0100 |
commit | 944b8500526e70d3631b8f36650752c48cbdcb2f (patch) | |
tree | ad03101a8b25a3450082816167b4bdf83d2d8d05 /net | |
parent | 5d69d7b36830c2a43a05b4527998f860afd2aa4d (diff) |
openpgp: Remove the openpgp/types module
- It only contains a KeyId type which is redundant relative to KeyID
and it is buggy (e.g., when it converts a Key ID to hex, it drops
any leading zeros).
- Update users to use KeyID instead.
Diffstat (limited to 'net')
-rw-r--r-- | net/src/lib.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/src/lib.rs b/net/src/lib.rs index 651ace16..63ac9c2b 100644 --- a/net/src/lib.rs +++ b/net/src/lib.rs @@ -58,8 +58,7 @@ use std::io; use sequoia_core::{Context, NetworkPolicy}; use openpgp::tpk::{self, TPK}; -use openpgp::types::KeyId; -use openpgp::{Message, armor}; +use openpgp::{Message, KeyID, armor}; pub mod ipc; @@ -156,9 +155,9 @@ impl KeyServer { } /// Retrieves the key with the given `keyid`. - pub fn get(&mut self, keyid: &KeyId) -> Result<TPK> { + pub fn get(&mut self, keyid: &KeyID) -> Result<TPK> { let uri = format!("{}/pks/lookup?op=get&options=mr&search=0x{}", - self.uri, keyid.as_hex()).parse()?; + self.uri, keyid.to_hex()).parse()?; let result = self.core.run( self.client.do_get(uri).and_then(|res| { let status = res.status(); |