diff options
Diffstat (limited to 'openpgp/examples/sign.rs')
-rw-r--r-- | openpgp/examples/sign.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/openpgp/examples/sign.rs b/openpgp/examples/sign.rs index b6bedeb4..85565b2e 100644 --- a/openpgp/examples/sign.rs +++ b/openpgp/examples/sign.rs @@ -7,8 +7,10 @@ extern crate sequoia_openpgp as openpgp; use crate::openpgp::armor; use crate::openpgp::parse::Parse; use crate::openpgp::serialize::stream::{Message, LiteralWriter, Signer}; +use crate::openpgp::policy::StandardPolicy as P; fn main() { + let p = &P::new(); let args: Vec<String> = env::args().collect(); if args.len() < 2 { panic!("A simple signing filter.\n\n\ @@ -24,7 +26,7 @@ fn main() { let mut n = 0; for key in tsk.keys() - .policy(None).alive().revoked(false).for_signing().secret() + .set_policy(p, None).alive().revoked(false).for_signing().secret() .map(|ka| ka.key()) { keys.push({ |