diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2020-01-03 13:41:56 +0100 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2020-01-03 13:41:56 +0100 |
commit | 7140cffef397007746ab3d93ef15b7f3c98576b5 (patch) | |
tree | 45dd9e99f00145920e41a0b0b9436c0580ff3fa5 /sqv/src | |
parent | a608d9a1c57560a42cfc3b9642586166f8ab8e52 (diff) |
openpgp: Simplify crypto::hash_file.
- The context knows the algorithm now.
Diffstat (limited to 'sqv/src')
-rw-r--r-- | sqv/src/sqv.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sqv/src/sqv.rs b/sqv/src/sqv.rs index ac78c8c5..a7ddf0e7 100644 --- a/sqv/src/sqv.rs +++ b/sqv/src/sqv.rs @@ -150,7 +150,7 @@ fn real_main() -> Result<(), failure::Error> { = sigs.iter().map(|&(ref sig, _)| sig.hash_algo()).collect(); let hashes: HashMap<_, _> = openpgp::crypto::hash_file(File::open(file)?, &hash_algos[..])? - .into_iter().collect(); + .into_iter().map(|ctx| (ctx.algo(), ctx)).collect(); fn cert_has_key(cert: &Cert, keyid: &KeyID) -> bool { // Even if a key is revoked or expired, we can still use it to |