summaryrefslogtreecommitdiffstats
path: root/openpgp/src/parse
diff options
context:
space:
mode:
authorWiktor Kwapisiewicz <wiktor@metacode.biz>2023-05-30 10:56:01 +0200
committerWiktor Kwapisiewicz <wiktor@metacode.biz>2023-06-14 09:13:29 +0200
commita060be6cbf29a00d085dc83b6c9f2730d98489f5 (patch)
treead26b01a7f1a3d24b4036e40b2e0bc9128c523c6 /openpgp/src/parse
parent98952a4024e036e005e33d317d2ae1327ffc34fd (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')
-rw-r--r--openpgp/src/parse/stream.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/openpgp/src/parse/stream.rs b/openpgp/src/parse/stream.rs
index 7a188bc4..23466f20 100644
--- a/openpgp/src/parse/stream.rs
+++ b/openpgp/src/parse/stream.rs
@@ -2478,6 +2478,7 @@ impl<'a, H: VerificationHelper + DecryptionHelper> Decryptor<'a, H> {
return Ok(v);
},
+ #[allow(deprecated)]
Packet::MDC(ref mdc) => if ! mdc.valid() {
return Err(Error::ManipulatedMessage.into());
},
@@ -2672,6 +2673,7 @@ impl<'a, H: VerificationHelper + DecryptionHelper> Decryptor<'a, H> {
&& self.structure.expect_mdc_at(recursion_depth)
{
match &p {
+ #[allow(deprecated)]
Packet::MDC(mdc) if mdc.valid() =>
(), // Good.
_ => // Bad.