diff options
author | Neal H. Walfield <neal@pep.foundation> | 2018-11-20 14:54:18 +0100 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2018-11-20 14:59:30 +0100 |
commit | 411de0d1647bf205c18b096e3fbda7fd0be7e93c (patch) | |
tree | 690f08d17d49bb771cf7c18bb7210f3896ac9c8c /openpgp/src/keyid.rs | |
parent | a1eba557ff62f09bef2c7e379a238c643ac240d7 (diff) |
openpgp: Add basic support for old-style sigs to the Verifier.
- Although the PacketParser doesn't support old-style
signatures (see issue #128), the Verifier should not choke on
them.
- This change prevents the Verifier from choking by processing all
old-style signatures in the usual manner. However, because the
old-style signatures will have a computed hash of 000..., they
will appear to be bad.
Diffstat (limited to 'openpgp/src/keyid.rs')
-rw-r--r-- | openpgp/src/keyid.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/openpgp/src/keyid.rs b/openpgp/src/keyid.rs index c4fae110..f55fe336 100644 --- a/openpgp/src/keyid.rs +++ b/openpgp/src/keyid.rs @@ -97,6 +97,11 @@ impl KeyID { } } + /// Returns the wildcard KeyID. + pub fn wildcard() -> Self { + Self::from_bytes(&[0u8; 8][..]) + } + /// Returns true if this is a wild card ID. pub fn is_wildcard(&self) -> bool { self.as_slice().iter().all(|b| *b == 0) |