diff options
author | Justus Winter <justus@pep-project.org> | 2017-12-12 15:52:57 +0100 |
---|---|---|
committer | Justus Winter <justus@pep-project.org> | 2017-12-13 13:48:25 +0100 |
commit | e9aba8ffe0ac9f8737f4b0235c0c2e45b2944c1d (patch) | |
tree | 98aba903500e9000a1540330e3da9d3e0b633f11 /src | |
parent | 4eda6b58e751bb1b6054bb7d9b261d51bbbd7485 (diff) |
Rename and move keys module to openpgp::tpk.
Diffstat (limited to 'src')
-rw-r--r-- | src/ffi.rs | 2 | ||||
-rw-r--r-- | src/lib.rs | 1 | ||||
-rw-r--r-- | src/net/mod.rs | 8 | ||||
-rw-r--r-- | src/openpgp/mod.rs | 1 | ||||
-rw-r--r-- | src/openpgp/tpk.rs (renamed from src/keys.rs) | 6 |
5 files changed, 9 insertions, 9 deletions
@@ -6,8 +6,8 @@ use std::ptr; use std::slice; use std::str; -use keys::TPK; use net::KeyServer; +use openpgp::tpk::TPK; use openpgp::types::KeyId; use self::libc::{uint8_t, uint64_t, c_char, size_t}; use self::native_tls::Certificate; @@ -14,7 +14,6 @@ extern crate bzip2; extern crate percent_encoding; pub mod openpgp; -pub mod keys; pub mod store; pub mod net; pub mod ffi; diff --git a/src/net/mod.rs b/src/net/mod.rs index 672b4422..698210eb 100644 --- a/src/net/mod.rs +++ b/src/net/mod.rs @@ -41,7 +41,7 @@ use std::io::{Cursor, Read}; use std::io; use super::Context; -use super::keys::{self, TPK}; +use super::openpgp::tpk::{self, TPK}; use super::openpgp::types::KeyId; use super::openpgp::{self, armor}; @@ -236,7 +236,7 @@ pub enum Error { /// A communication partner violated the protocol. ProtocolViolation, /// There was an error parsing the key. - KeysError(keys::Error), + KeysError(tpk::Error), /// Encountered an unexpected low-level http status. HttpStatus(hyper::StatusCode), /// An `io::Error` occured. @@ -249,8 +249,8 @@ pub enum Error { TlsError(native_tls::Error), } -impl From<keys::Error> for Error { - fn from(e: keys::Error) -> Self { +impl From<tpk::Error> for Error { + fn from(e: tpk::Error) -> Self { Error::KeysError(e) } } diff --git a/src/openpgp/mod.rs b/src/openpgp/mod.rs index 46081fbe..0b27e330 100644 --- a/src/openpgp/mod.rs +++ b/src/openpgp/mod.rs @@ -5,6 +5,7 @@ pub mod armor; pub mod parse; +pub mod tpk; pub mod types; include!("openpgp.rs"); diff --git a/src/keys.rs b/src/openpgp/tpk.rs index ec31ac9a..d95109ab 100644 --- a/src/keys.rs +++ b/src/openpgp/tpk.rs @@ -1,7 +1,7 @@ use io; -use super::openpgp; -use super::openpgp::Packet; +use openpgp; +use super::Packet; /// A transferable public key (TPK). /// @@ -221,7 +221,7 @@ mod test { use super::{Error, TPK, openpgp}; macro_rules! bytes { - ( $x:expr ) => { include_bytes!(concat!("../tests/data/keys/", $x)) }; + ( $x:expr ) => { include_bytes!(concat!("../../tests/data/keys/", $x)) }; } #[test] |