diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-09-11 15:01:53 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-09-11 15:01:53 +0200 |
commit | 16616b00f499022402f693aace99d12bfef5659a (patch) | |
tree | d550a2d11490b576606fc9416e01a98bed04d1e5 | |
parent | e9e9f7b229894fd603d6ca5c0ec371b0053cc570 (diff) |
openpgp: Move packet::Features to constants.
-rw-r--r-- | openpgp/src/constants/features.rs (renamed from openpgp/src/packet/features.rs) | 0 | ||||
-rw-r--r-- | openpgp/src/constants/mod.rs | 3 | ||||
-rw-r--r-- | openpgp/src/packet/mod.rs | 2 | ||||
-rw-r--r-- | openpgp/src/packet/signature/subpacket.rs | 2 | ||||
-rw-r--r-- | openpgp/src/tpk/builder.rs | 3 | ||||
-rw-r--r-- | openpgp/src/tpk/mod.rs | 2 |
6 files changed, 7 insertions, 5 deletions
diff --git a/openpgp/src/packet/features.rs b/openpgp/src/constants/features.rs index ce07b2b4..ce07b2b4 100644 --- a/openpgp/src/packet/features.rs +++ b/openpgp/src/constants/features.rs diff --git a/openpgp/src/constants/mod.rs b/openpgp/src/constants/mod.rs index 1fea53d9..efa7b962 100644 --- a/openpgp/src/constants/mod.rs +++ b/openpgp/src/constants/mod.rs @@ -12,6 +12,9 @@ use quickcheck::{Arbitrary, Gen}; use crate::Error; use crate::Result; +mod features; +pub use self::features::Features; + /// The OpenPGP public key algorithms as defined in [Section 9.1 of /// RFC 4880], and [Section 5 of RFC 6637]. /// diff --git a/openpgp/src/packet/mod.rs b/openpgp/src/packet/mod.rs index 8ad2317a..58bc7ff4 100644 --- a/openpgp/src/packet/mod.rs +++ b/openpgp/src/packet/mod.rs @@ -45,8 +45,6 @@ pub mod pkesk; mod mdc; pub use self::mdc::MDC; pub mod aed; -mod features; -pub use self::features::Features; mod key_flags; pub use self::key_flags::KeyFlags; mod server_preferences; diff --git a/openpgp/src/packet/signature/subpacket.rs b/openpgp/src/packet/signature/subpacket.rs index 8d584050..9f5bf579 100644 --- a/openpgp/src/packet/signature/subpacket.rs +++ b/openpgp/src/packet/signature/subpacket.rs @@ -72,7 +72,6 @@ use crate::{ Result, packet::Signature, packet::signature::{self, Signature4}, - packet::Features, packet::key, packet::Key, packet::KeyFlags, @@ -84,6 +83,7 @@ use crate::{ use crate::constants::{ AEADAlgorithm, CompressionAlgorithm, + Features, HashAlgorithm, PublicKeyAlgorithm, ReasonForRevocation, diff --git a/openpgp/src/tpk/builder.rs b/openpgp/src/tpk/builder.rs index 5e72a00a..3401b109 100644 --- a/openpgp/src/tpk/builder.rs +++ b/openpgp/src/tpk/builder.rs @@ -1,7 +1,7 @@ use time; use crate::packet; -use crate::packet::{Features, KeyFlags}; +use crate::packet::{KeyFlags}; use crate::packet::{ key, Key, @@ -16,6 +16,7 @@ use crate::conversions::Time; use crate::crypto::Password; use crate::autocrypt::Autocrypt; use crate::constants::{ + Features, HashAlgorithm, SignatureType, SymmetricAlgorithm, diff --git a/openpgp/src/tpk/mod.rs b/openpgp/src/tpk/mod.rs index 18d23ce9..3ac9f4f7 100644 --- a/openpgp/src/tpk/mod.rs +++ b/openpgp/src/tpk/mod.rs @@ -2382,7 +2382,7 @@ mod test { #[test] fn revoked_time() { - use crate::packet::Features; + use crate::constants::Features; use crate::packet::key::Key4; use crate::constants::Curve; use rand::{thread_rng, Rng, distributions::Open01}; |