diff options
author | Neal H. Walfield <neal@pep.foundation> | 2020-08-12 15:48:36 +0200 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2020-08-12 15:55:09 +0200 |
commit | d4fe2832c9bf1d49b87a301bd0a46caa45018477 (patch) | |
tree | 2dbdf9b430456aec4a7878cc6ab53abe92166876 /openpgp/src/packet/signature/mod.rs | |
parent | 2aa8c003a99afef4e8199e92cfa403a5048cdf7c (diff) |
openpgp: Change accessors to return all issuers.
- Unlike the `Signature Creation Time` subpacket, there are
legitimate reasons to have multiple `Issuer` subpackets and
`Issuer Fingerprint` subpackets.
- Rename `SubpacketAreas::issuer` to `SubpacketAreas::issuers` and
return all `Issuer` subpackets.
- Likewise, Rename `SubpacketAreas::issuer_fingerprint` to
`SubpacketAreas::issuer_fingerprints` and return all `Issuer
Fingerprint` subpackets.
- Change `sq` to list all issuers. Deduplicate first, however.
Diffstat (limited to 'openpgp/src/packet/signature/mod.rs')
-rw-r--r-- | openpgp/src/packet/signature/mod.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/openpgp/src/packet/signature/mod.rs b/openpgp/src/packet/signature/mod.rs index 407384a0..25f0a4fd 100644 --- a/openpgp/src/packet/signature/mod.rs +++ b/openpgp/src/packet/signature/mod.rs @@ -1380,7 +1380,9 @@ impl SignatureBuilder { } // Make sure we have an issuer packet. - if self.issuer().is_none() && self.issuer_fingerprint().is_none() { + if self.issuers().next().is_none() + && self.issuer_fingerprints().next().is_none() + { self = self.set_issuer(signer.public().keyid())? .set_issuer_fingerprint(signer.public().fingerprint())?; } |