diff options
author | Wiktor Kwapisiewicz <wiktor@metacode.biz> | 2023-05-30 10:56:01 +0200 |
---|---|---|
committer | Wiktor Kwapisiewicz <wiktor@metacode.biz> | 2023-06-14 09:13:29 +0200 |
commit | a060be6cbf29a00d085dc83b6c9f2730d98489f5 (patch) | |
tree | ad26b01a7f1a3d24b4036e40b2e0bc9128c523c6 /openpgp/src/parse.rs | |
parent | 98952a4024e036e005e33d317d2ae1327ffc34fd (diff) |
openpgp: Deprecate `Packet::MDC` variant.
- Crypto refresh changes MDC to not be a standalone packet but an
implementation detail of the SEIPDv1 packet.
- Adjust use-sites to allow for deprecations.
- See https://gitlab.com/sequoia-pgp/sequoia/-/issues/860
Diffstat (limited to 'openpgp/src/parse.rs')
-rw-r--r-- | openpgp/src/parse.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/openpgp/src/parse.rs b/openpgp/src/parse.rs index 7c34f62b..d273eb44 100644 --- a/openpgp/src/parse.rs +++ b/openpgp/src/parse.rs @@ -321,6 +321,7 @@ macro_rules! impl_parse_with_buffered_reader { pp.buffer_unread_content()?; match pp.next()? { + #[allow(deprecated)] (Packet::$typ(o), PacketParserResult::EOF(_)) => Ok(o), (p, PacketParserResult::EOF(_)) => @@ -2894,6 +2895,7 @@ impl MDC { let mut digest: [u8; 20] = Default::default(); digest.copy_from_slice(&php_try!(php.parse_bytes("digest", 20))); + #[allow(deprecated)] php.ok(Packet::MDC(MDC::new(digest, computed_digest))) } } @@ -4813,6 +4815,7 @@ impl <'a> PacketParser<'a> { } }, // Packets that don't recurse. + #[allow(deprecated)] Packet::Unknown(_) | Packet::Signature(_) | Packet::OnePassSig(_) | Packet::PublicKey(_) | Packet::PublicSubkey(_) | Packet::SecretKey(_) | Packet::SecretSubkey(_) @@ -5742,6 +5745,7 @@ mod test { decrypt_test_common(true); } + #[allow(deprecated)] fn decrypt_test_common(stream: bool) { for test in DECRYPT_TESTS.iter() { if !test.algo.is_supported() { |