summaryrefslogtreecommitdiffstats
path: root/sqv
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2020-01-31 14:20:53 +0100
committerNeal H. Walfield <neal@pep.foundation>2020-01-31 15:59:16 +0100
commita464ce819ccd1fa07ff8c6d0be74cff5eec5cf34 (patch)
tree31ed9d18b9c7802a93b4e4c8e6e85d1121b201d8 /sqv
parentb9b6533bd5394cd5cdb6b91b5c5ca7a02e3ea199 (diff)
openpgp: Add a policy object.
- Change all functions that need to evaluate the validity of a signature (either directly or indirectly to take a policy object. - Use the policy object to allow the user to place additional constraints on a signature's validity. - This addresses the first half of #274 (it introduces the policy object, but does not yet implement any policy).
Diffstat (limited to 'sqv')
-rw-r--r--sqv/src/sqv.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/sqv/src/sqv.rs b/sqv/src/sqv.rs
index fe97b246..c23f4b38 100644
--- a/sqv/src/sqv.rs
+++ b/sqv/src/sqv.rs
@@ -27,6 +27,7 @@ use crate::openpgp::parse::stream::{
VerificationResult,
};
use crate::openpgp::cert::CertParser;
+use crate::openpgp::policy::StandardPolicy as P;
mod sqv_cli;
@@ -220,6 +221,8 @@ impl<'a> VerificationHelper for VHelper<'a> {
fn real_main() -> Result<()> {
+ let p = &P::new();
+
let matches = sqv_cli::build().get_matches();
let trace = matches.is_present("trace");
@@ -271,7 +274,7 @@ fn real_main() -> Result<()> {
let h = VHelper::new(good_threshold, not_before, not_after, keyrings);
let mut v = DetachedVerifier::from_file(
- sig_file, file, h, None)?;
+ p, sig_file, file, h, None)?;
io::copy(&mut v, &mut io::sink())?;