Upgrade sequoia-cert-store and sequoia-wot.
- Upgrade `sequoia-cert-store` and `sequoia-wot` and adapt to their API changes.
This commit is contained in:
parent
20f6512085
commit
314e19c1af
13
Cargo.lock
generated
13
Cargo.lock
generated
@ -2024,6 +2024,7 @@ version = "0.27.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"pkg-config",
|
||||
"vcpkg",
|
||||
]
|
||||
@ -3128,9 +3129,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sequoia-cert-store"
|
||||
version = "0.4.2"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e0d58235b88e5518ca84a74462e07c4391cb9b3067dccfb9b4ed8a8fdad77299"
|
||||
checksum = "e65486e541400d9d08559bfa6a57d9bb33e4678a378b9240cd7c370e2d9b4ae6"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"crossbeam",
|
||||
@ -3251,9 +3252,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sequoia-openpgp"
|
||||
version = "1.18.0"
|
||||
version = "1.19.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "26e9c71323d9848404e343a6b5c3a73de10bc496ca3481b66586ba9064de027e"
|
||||
checksum = "ebf154ce4af3d7983de8fded403f98ff9eb3ee38dffccea0472ac38aa4276df4"
|
||||
dependencies = [
|
||||
"aes",
|
||||
"aes-gcm",
|
||||
@ -3369,9 +3370,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "sequoia-wot"
|
||||
version = "0.9.0"
|
||||
version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "383672b024f126625127ec2b709b1e2f8d4814ab1bf4f800abb1a9fdc8dedcd3"
|
||||
checksum = "7f383e37d18e0b9ae9e39ead83c581d5fc4f73e20bc1f4f7b76185d7136698b5"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"chrono",
|
||||
|
@ -43,9 +43,9 @@ humantime = "2"
|
||||
indicatif = "0.17"
|
||||
itertools = ">=0.10, <0.13"
|
||||
once_cell = "1.17"
|
||||
sequoia-cert-store = "0.4.2"
|
||||
sequoia-cert-store = "0.5.0"
|
||||
sequoia-keystore = { version = "0.2" }
|
||||
sequoia-wot = "0.9"
|
||||
sequoia-wot = "0.10"
|
||||
tempfile = "3.1"
|
||||
tokio = { version = "1.13.1" }
|
||||
rpassword = "7.0"
|
||||
|
@ -46,7 +46,7 @@ pub fn dispatch<'store>(mut config: Config<'store>, cmd: import::Command)
|
||||
Ok(raw_cert) => LazyCert::from(raw_cert),
|
||||
Err(err) => {
|
||||
wprintln!("Error parsing input: {}", err);
|
||||
stats.errors += 1;
|
||||
stats.inc_errors();
|
||||
continue;
|
||||
}
|
||||
};
|
||||
@ -57,7 +57,7 @@ pub fn dispatch<'store>(mut config: Config<'store>, cmd: import::Command)
|
||||
if let Err(err) = cert_store.update_by(Arc::new(cert), &mut stats) {
|
||||
wprintln!("Error importing {}, {:?}: {}",
|
||||
fingerprint, userid, err);
|
||||
stats.errors += 1;
|
||||
stats.inc_errors();
|
||||
continue;
|
||||
} else {
|
||||
wprintln!("Imported {}, {}", fingerprint, Safe(&userid));
|
||||
@ -72,7 +72,8 @@ pub fn dispatch<'store>(mut config: Config<'store>, cmd: import::Command)
|
||||
|
||||
wprintln!("Imported {} new certificates, updated {} certificates, \
|
||||
{} certificates unchanged, {} errors.",
|
||||
stats.new, stats.updated, stats.unchanged, stats.errors);
|
||||
stats.new_certs(), stats.updated_certs(),
|
||||
stats.unchanged_certs(), stats.errors());
|
||||
|
||||
Ok(result?)
|
||||
}
|
||||
|
@ -129,10 +129,10 @@ pub fn import_certs(config: &mut Config, certs: Vec<Cert>) -> Result<()> {
|
||||
}
|
||||
|
||||
wprintln!("\nImported {}, updated {}, {} unchanged, {}.",
|
||||
stats.new.of("new certificate"),
|
||||
stats.updated.of("certificate"),
|
||||
stats.unchanged.of("certificate"),
|
||||
stats.errors.of("error"));
|
||||
stats.new_certs().of("new certificate"),
|
||||
stats.updated_certs().of("certificate"),
|
||||
stats.unchanged_certs().of("certificate"),
|
||||
stats.errors().of("error"));
|
||||
|
||||
wprintln!("\nAfter checking that a certificate really belongs to the \
|
||||
stated owner, you can mark the certificate as authenticated \
|
||||
|
@ -767,7 +767,7 @@ pub fn retract(mut config: Config, c: link::RetractCommand)
|
||||
pub fn list(config: Config, c: link::ListCommand)
|
||||
-> Result<()>
|
||||
{
|
||||
let mut cert_store = config.cert_store_or_else()?;
|
||||
let cert_store = config.cert_store_or_else()?;
|
||||
cert_store.prefetch_all();
|
||||
|
||||
let trust_root = config.local_trust_root()?;
|
||||
|
@ -431,7 +431,7 @@ impl<'store> Config<'store> {
|
||||
cert_store::CertStore::empty()
|
||||
};
|
||||
|
||||
let mut keyring = cert_store::store::Certs::empty();
|
||||
let keyring = cert_store::store::Certs::empty();
|
||||
let mut error = None;
|
||||
for filename in self.keyrings.iter() {
|
||||
let f = std::fs::File::open(filename)
|
||||
|
Loading…
Reference in New Issue
Block a user