summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2021-02-21 23:48:09 +0100
committerNeal H. Walfield <neal@pep.foundation>2021-02-21 23:48:09 +0100
commitb4b9203cb139eb5269209d9cf3f31d31f77d85f4 (patch)
treeac94f15f8f6b51f5ff8758b3ddfa220ea8be6a94
parent88b835631a60fade67907e394fce8d3476b9ae36 (diff)
WIP: Web of Trustneal/wot
-rw-r--r--openpgp/src/lib.rs1
-rw-r--r--openpgp/src/tests.rs5
-rw-r--r--openpgp/src/wot.rs1553
-rw-r--r--openpgp/src/wot/backward_propagation.rs1444
-rw-r--r--openpgp/src/wot/forward_propagation.rs1098
-rw-r--r--openpgp/src/wot/network.rs461
-rw-r--r--openpgp/src/wot/path.rs395
-rw-r--r--openpgp/src/wot/priority_queue.rs504
-rw-r--r--openpgp/tests/data/wot/cliques-local-optima-2.pgp2650
-rw-r--r--openpgp/tests/data/wot/cliques-local-optima.pgp2646
-rw-r--r--openpgp/tests/data/wot/cliques.pgp2637
-rw-r--r--openpgp/tests/data/wot/cliques/README.md59
-rw-r--r--openpgp/tests/data/wot/cliques/a-0-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/a-1-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/a-2-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/a-3-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/a-4-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/a-5-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/a-6-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/a-7-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/a-8-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/a-9-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/b-0-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/b-1-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/b-2-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/b-3-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/b-4-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/b-5-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/b-6-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/b-7-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/b-8-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/b-9-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/c-0-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/c-1-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/c-2-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/c-3-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/c-4-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/c-5-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/c-6-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/c-7-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/c-8-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/c-9-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/d-0-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/d-1-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/d-2-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/d-3-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/d-4-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/d-5-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/d-6-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/d-7-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/d-8-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/d-9-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/e-0-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/f-0-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cliques/gensigs.sh57
-rw-r--r--openpgp/tests/data/wot/cliques/root-priv.pgp34
-rw-r--r--openpgp/tests/data/wot/cliques/target-priv.pgp34
-rw-r--r--openpgp/tests/data/wot/cycle.pgp180
-rw-r--r--openpgp/tests/data/wot/cycle/README.md16
-rw-r--r--openpgp/tests/data/wot/cycle/alice-priv.pgp34
-rw-r--r--openpgp/tests/data/wot/cycle/bob-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cycle/carol-priv.pgp34
-rw-r--r--openpgp/tests/data/wot/cycle/dave-priv.pgp34
-rw-r--r--openpgp/tests/data/wot/cycle/ed-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/cycle/frank-priv.pgp34
-rw-r--r--openpgp/tests/data/wot/cycle/gen.sh33
-rw-r--r--openpgp/tests/data/wot/local-optima.pgp242
-rw-r--r--openpgp/tests/data/wot/local-optima/README.md28
-rw-r--r--openpgp/tests/data/wot/local-optima/alice-priv.pgp34
-rw-r--r--openpgp/tests/data/wot/local-optima/bob-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/local-optima/carol-priv.pgp34
-rw-r--r--openpgp/tests/data/wot/local-optima/dave-priv.pgp34
-rw-r--r--openpgp/tests/data/wot/local-optima/ellen-priv.pgp34
-rw-r--r--openpgp/tests/data/wot/local-optima/francis-priv.pgp34
-rw-r--r--openpgp/tests/data/wot/local-optima/gen.sh55
-rw-r--r--openpgp/tests/data/wot/local-optima/georgina-priv.pgp34
-rw-r--r--openpgp/tests/data/wot/local-optima/henry-priv.pgp34
-rw-r--r--openpgp/tests/data/wot/roundabout.pgp303
-rw-r--r--openpgp/tests/data/wot/roundabout/README.md27
-rw-r--r--openpgp/tests/data/wot/roundabout/alice-priv.pgp34
-rw-r--r--openpgp/tests/data/wot/roundabout/bob-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/roundabout/bob.pgp38
-rw-r--r--openpgp/tests/data/wot/roundabout/carol-priv.pgp34
-rw-r--r--openpgp/tests/data/wot/roundabout/carol.pgp33
-rw-r--r--openpgp/tests/data/wot/roundabout/dave-priv.pgp34
-rw-r--r--openpgp/tests/data/wot/roundabout/dave.pgp33
-rw-r--r--openpgp/tests/data/wot/roundabout/elmar-priv.pgp34
-rw-r--r--openpgp/tests/data/wot/roundabout/elmar.pgp38
-rw-r--r--openpgp/tests/data/wot/roundabout/frank-priv.pgp34
-rw-r--r--openpgp/tests/data/wot/roundabout/frank.pgp33
-rw-r--r--openpgp/tests/data/wot/roundabout/gen.sh59
-rw-r--r--openpgp/tests/data/wot/roundabout/george-priv.pgp34
-rw-r--r--openpgp/tests/data/wot/roundabout/george.pgp42
-rw-r--r--openpgp/tests/data/wot/roundabout/henry-priv.pgp34
-rw-r--r--openpgp/tests/data/wot/roundabout/henry.pgp33
-rw-r--r--openpgp/tests/data/wot/roundabout/isaac-priv.pgp34
-rw-r--r--openpgp/tests/data/wot/roundabout/isaac.pgp33
-rw-r--r--openpgp/tests/data/wot/roundabout/jenny-priv.pgp34
-rw-r--r--openpgp/tests/data/wot/simple.pgp174
-rw-r--r--openpgp/tests/data/wot/simple/README.md18
-rw-r--r--openpgp/tests/data/wot/simple/alice-priv.pgp34
-rw-r--r--openpgp/tests/data/wot/simple/bob-priv.pgp33
-rw-r--r--openpgp/tests/data/wot/simple/carol-priv.pgp34
-rw-r--r--openpgp/tests/data/wot/simple/dave-priv.pgp34
-rw-r--r--openpgp/tests/data/wot/simple/ellen-priv.pgp34
-rw-r--r--openpgp/tests/data/wot/simple/frank-priv.pgp34
-rw-r--r--openpgp/tests/data/wot/simple/gen.sh31
-rwxr-xr-xopenpgp/tests/data/wot/torust.sh33
-rw-r--r--sq/src/commands/mod.rs1
-rw-r--r--sq/src/commands/wot.rs53
-rw-r--r--sq/src/sq-usage.rs65
-rw-r--r--sq/src/sq.rs7
-rw-r--r--sq/src/sq_cli.rs54
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 cr