summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2020-04-03 11:22:40 +0200
committerNeal H. Walfield <neal@pep.foundation>2020-04-03 11:34:03 +0200
commit01b0ea100da215bfdd67a857467b8ea3169a79a3 (patch)
tree52e5f6afd57a2caa3e60ad3c856733068ed1c594
parent72bb51dc3ba1d368cad1d833a734d39a32ba3149 (diff)
openpgp: Move key_amalgamation.rs to amalgamation/key.rs.
-rw-r--r--openpgp-ffi/src/key_amalgamation.rs4
-rw-r--r--openpgp/src/cert/amalgamation.rs12
-rw-r--r--openpgp/src/cert/amalgamation/key.rs (renamed from openpgp/src/cert/key_amalgamation.rs)0
-rw-r--r--openpgp/src/cert/mod.rs1
-rw-r--r--openpgp/src/cert/prelude.rs18
5 files changed, 23 insertions, 12 deletions
diff --git a/openpgp-ffi/src/key_amalgamation.rs b/openpgp-ffi/src/key_amalgamation.rs
index c7a8870d..374770c2 100644
--- a/openpgp-ffi/src/key_amalgamation.rs
+++ b/openpgp-ffi/src/key_amalgamation.rs
@@ -30,7 +30,7 @@ use crate::maybe_time;
/// A local alias to appease the proc macro transformation.
type ErasedKeyAmalgamation<'a> =
- openpgp::cert::key_amalgamation::ErasedKeyAmalgamation<'a, key::UnspecifiedParts>;
+ openpgp::cert::amalgamation::ErasedKeyAmalgamation<'a, key::UnspecifiedParts>;
/// A `KeyAmalgamation` holds a `Key` and associated data.
///
@@ -43,7 +43,7 @@ pub struct KeyAmalgamation<'a>(ErasedKeyAmalgamation<'a>);
/// A local alias to appease the proc macro transformation.
type ValidErasedKeyAmalgamation<'a> =
- openpgp::cert::key_amalgamation::ValidErasedKeyAmalgamation<'a, key::UnspecifiedParts>;
+ openpgp::cert::amalgamation::ValidErasedKeyAmalgamation<'a, key::UnspecifiedParts>;
/// Returns a reference to the `Key`.
#[::sequoia_ffi_macros::extern_fn] #[no_mangle]
diff --git a/openpgp/src/cert/amalgamation.rs b/openpgp/src/cert/amalgamation.rs
index 06a7bd56..2e2248a7 100644
--- a/openpgp/src/cert/amalgamation.rs
+++ b/openpgp/src/cert/amalgamation.rs
@@ -40,6 +40,18 @@ pub use iter::{
KeyAmalgamationIter,
ValidKeyAmalgamationIter,
};
+mod key;
+pub use key::{
+ ErasedKeyAmalgamation,
+ KeyAmalgamation,
+ Primary,
+ PrimaryKeyAmalgamation,
+ SubordinateKeyAmalgamation,
+ ValidErasedKeyAmalgamation,
+ ValidKeyAmalgamation,
+ ValidPrimaryKeyAmalgamation,
+ ValidSubordinateKeyAmalgamation,
+};
/// Applies a policy to an amalgamation.
///
diff --git a/openpgp/src/cert/key_amalgamation.rs b/openpgp/src/cert/amalgamation/key.rs
index 7a43bf42..7a43bf42 100644
--- a/openpgp/src/cert/key_amalgamation.rs
+++ b/openpgp/src/cert/amalgamation/key.rs
diff --git a/openpgp/src/cert/mod.rs b/openpgp/src/cert/mod.rs
index f2bff65d..e3d8cc54 100644
--- a/openpgp/src/cert/mod.rs
+++ b/openpgp/src/cert/mod.rs
@@ -46,7 +46,6 @@ pub mod amalgamation;
mod builder;
mod bindings;
pub mod bundle;
-pub mod key_amalgamation;
mod parser;
mod revoke;
diff --git a/openpgp/src/cert/prelude.rs b/openpgp/src/cert/prelude.rs
index 3c825bf6..d2f3498b 100644
--- a/openpgp/src/cert/prelude.rs
+++ b/openpgp/src/cert/prelude.rs
@@ -29,10 +29,19 @@ pub use crate::cert::{
UserIDRevocationBuilder,
ValidCert,
amalgamation::ComponentAmalgamation,
+ amalgamation::ErasedKeyAmalgamation,
+ amalgamation::KeyAmalgamation,
amalgamation::KeyAmalgamationIter,
+ amalgamation::Primary as _,
+ amalgamation::PrimaryKeyAmalgamation,
+ amalgamation::SubordinateKeyAmalgamation,
amalgamation::ValidAmalgamation as _,
amalgamation::ValidComponentAmalgamation,
+ amalgamation::ValidErasedKeyAmalgamation,
+ amalgamation::ValidKeyAmalgamation,
amalgamation::ValidKeyAmalgamationIter,
+ amalgamation::ValidPrimaryKeyAmalgamation,
+ amalgamation::ValidSubordinateKeyAmalgamation,
amalgamation::ValidateAmalgamation as _,
bundle::ComponentBundle,
bundle::ComponentBundleIter,
@@ -43,13 +52,4 @@ pub use crate::cert::{
bundle::UserAttributeBundle,
bundle::UserIDBundle,
bundle::ValidComponentBundleIter,
- key_amalgamation::ErasedKeyAmalgamation,
- key_amalgamation::KeyAmalgamation,
- key_amalgamation::Primary as _,
- key_amalgamation::PrimaryKeyAmalgamation,
- key_amalgamation::SubordinateKeyAmalgamation,
- key_amalgamation::ValidErasedKeyAmalgamation,
- key_amalgamation::ValidKeyAmalgamation,
- key_amalgamation::ValidPrimaryKeyAmalgamation,
- key_amalgamation::ValidSubordinateKeyAmalgamation,
};