Use sequoia-policy-config to configure the StandardPolicy.
- This allows users to tweak the StandardPolicy used by Sequoia to evaluate cryptographic artifacts. For example, on Fedora it will adhere to the system-wide cryptographic policy for Sequoia. - Fixes #128.
This commit is contained in:
parent
e9aa4a624e
commit
55eca2c87e
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -2977,6 +2977,7 @@ dependencies = [
|
||||
"sequoia-cert-store",
|
||||
"sequoia-net",
|
||||
"sequoia-openpgp",
|
||||
"sequoia-policy-config",
|
||||
"sequoia-wot",
|
||||
"serde",
|
||||
"serde_json",
|
||||
|
@ -35,6 +35,7 @@ dot-writer = "0.1.3"
|
||||
sequoia-openpgp = { version = "1.13", default-features = false, features = ["compression-deflate"] }
|
||||
sequoia-autocrypt = { version = "0.25", default-features = false, optional = true }
|
||||
sequoia-net = { version = "0.27", default-features = false }
|
||||
sequoia-policy-config = "0.6"
|
||||
anyhow = "1.0.18"
|
||||
chrono = "0.4.10"
|
||||
# For an MSRV of 1.63: 4.0.32.
|
||||
|
@ -1002,7 +1002,9 @@ fn main() -> Result<()> {
|
||||
.into()
|
||||
};
|
||||
|
||||
let policy = &mut P::at(time);
|
||||
let mut policy = sequoia_policy_config::ConfiguredStandardPolicy::new();
|
||||
policy.parse_default_config()?;
|
||||
let mut policy = policy.build();
|
||||
|
||||
let known_notations = c.known_notation
|
||||
.iter()
|
||||
@ -1022,7 +1024,7 @@ fn main() -> Result<()> {
|
||||
force,
|
||||
output_format,
|
||||
output_version,
|
||||
policy: policy.clone(),
|
||||
policy,
|
||||
time,
|
||||
no_rw_cert_store: c.no_cert_store,
|
||||
cert_store_path: c.cert_store.clone(),
|
||||
|
Loading…
x
Reference in New Issue
Block a user