summaryrefslogtreecommitdiffstats
path: root/openpgp/src/parse
diff options
context:
space:
mode:
Diffstat (limited to 'openpgp/src/parse')
-rw-r--r--openpgp/src/parse/stream.rs18
1 files changed, 13 insertions, 5 deletions
diff --git a/openpgp/src/parse/stream.rs b/openpgp/src/parse/stream.rs
index c4b16049..fe0d7dd5 100644
--- a/openpgp/src/parse/stream.rs
+++ b/openpgp/src/parse/stream.rs
@@ -698,8 +698,12 @@ impl<'a, H: VerificationHelper> Verifier<'a, H> {
for issuer in sig.get_issuers() {
if let Some((i, j)) = self.keys.get(&issuer) {
let cert = &self.certs[*i];
- let (binding, revoked, key)
- = cert.keys_all().nth(*j).unwrap();
+
+ let ka = cert.keys_all().nth(*j).unwrap();
+ let binding = ka.binding_signature(self.time);
+ let revoked = ka.revoked(self.time);
+ let key = ka.key();
+
results.push_verification_result(
if sig.verify(key).unwrap_or(false) {
if sig.signature_alive(
@@ -1591,8 +1595,12 @@ impl<'a, H: VerificationHelper + DecryptionHelper> Decryptor<'a, H> {
for issuer in sig.get_issuers() {
if let Some((i, j)) = self.keys.get(&issuer) {
let cert = &self.certs[*i];
- let (binding, revoked, key)
- = cert.keys_all().nth(*j).unwrap();
+
+ let ka = cert.keys_all().nth(*j).unwrap();
+ let binding = ka.binding_signature(self.time);
+ let revoked = ka.revoked(self.time);
+ let key = ka.key();
+
results.push_verification_result(
if sig.verify(key).unwrap_or(false) &&
sig.signature_alive(
@@ -2055,7 +2063,7 @@ mod test {
// sign 30MiB message
let mut buf = vec![];
{
- let key = cert.keys_all().for_signing().nth(0).unwrap().2;
+ let key = cert.keys_all().for_signing().nth(0).unwrap().key();
let keypair =
key.clone().mark_parts_secret().unwrap()
.into_keypair().unwrap();