diff options
author | Neal H. Walfield <neal@pep.foundation> | 2019-09-18 18:49:29 +0200 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2019-09-18 18:49:29 +0200 |
commit | 6cbc940b4f59d9d9ddaef729fb8db7b6ec63e533 (patch) | |
tree | 25a52bb5e84216ca0f5a34b2ace8facfff5bdd4c /openpgp/src/parse | |
parent | 044854773282eed2be23aab511d5dc38ffbe21ca (diff) |
openpgp: Change TPK::primary to return the key and not the binding
- The primary key is not a binding; it is a single component.
Thus, returning a ComponentBinding is misleading.
- Add methods to the TPK structure to return the direct signatures,
certifications, self revocations, and other revocations.
Diffstat (limited to 'openpgp/src/parse')
-rw-r--r-- | openpgp/src/parse/stream.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/openpgp/src/parse/stream.rs b/openpgp/src/parse/stream.rs index 6a1246af..4a97134b 100644 --- a/openpgp/src/parse/stream.rs +++ b/openpgp/src/parse/stream.rs @@ -518,7 +518,7 @@ impl<'a, H: VerificationHelper> Verifier<'a, H> { v.tpks = v.helper.get_public_keys(&issuers)?; for (i, tpk) in v.tpks.iter().enumerate() { - if can_sign(tpk.primary().key(), + if can_sign(tpk.primary(), tpk.primary_key_signature(None), t) { v.keys.insert(tpk.keyid(), (i, 0)); } @@ -1305,7 +1305,7 @@ impl<'a, H: VerificationHelper + DecryptionHelper> Decryptor<'a, H> { } }; - if can_sign(tpk.primary().key().into(), + if can_sign(tpk.primary().into(), tpk.primary_key_signature(None)) { v.keys.insert(tpk.keyid(), (i, 0)); } |