diff options
113 files changed, 17641 insertions, 0 deletions
diff --git a/openpgp/src/lib.rs b/openpgp/src/lib.rs index da44fb4c..fee1c694 100644 --- a/openpgp/src/lib.rs +++ b/openpgp/src/lib.rs @@ -161,6 +161,7 @@ mod keyhandle; pub use keyhandle::KeyHandle; pub mod regex; pub mod policy; +pub mod wot; pub(crate) mod seal; pub(crate) mod utils; diff --git a/openpgp/src/tests.rs b/openpgp/src/tests.rs index 6c241555..70b03be6 100644 --- a/openpgp/src/tests.rs +++ b/openpgp/src/tests.rs @@ -88,6 +88,11 @@ pub fn message(name: &str) -> &'static [u8] { file(&format!("messages/{}", name)) } +/// Returns the content of the given file below `openpgp/tests/data/wot`. +pub fn wot(name: &str) -> &'static [u8] { + file(&format!("wot/{}", name)) +} + /// Returns the cypherpunks manifesto. pub fn manifesto() -> &'static [u8] { message("a-cypherpunks-manifesto.txt") diff --git a/openpgp/src/wot.rs b/openpgp/src/wot.rs new file mode 100644 index 00000000..9c0ea0da --- /dev/null +++ b/openpgp/src/wot.rs @@ -0,0 +1,1553 @@ +//! Web of trust support. + +use std::collections::HashMap; +use std::fmt; + +use crate::cert::prelude::*; +use crate::packet::prelude::*; +use crate::Fingerprint; +use crate::regex::RegexSet; + +mod network; +pub use network::Network; +mod forward_propagation; +mod backward_propagation; +use backward_propagation::SuppressCertificationFilter; +mod path; +pub use path::{Path, Paths}; +mod priority_queue; +use priority_queue::PriorityQueue; + +const TRACE: bool = true; + +/// A single certification. +/// +/// Encapsulates a certification over a binding, e.g., 0xA's +/// certification binding the User ID B and the certificate 0xB, which +/// we denote: <0xA, B:0xB>. +#[derive(Clone)] +pub struct C |