diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2023-08-22 10:18:15 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2024-03-13 10:59:08 +0100 |
commit | c647a7fb8575dc11e83abf2647df85425f9e711d (patch) | |
tree | bbc272d92f1d539bda2eb81e9ca3138a7f2e9ee7 | |
parent | f92e298f9ac1785d29e93d86ce0aba51b250433e (diff) |
openpgp: Deprecate the PreferredAEADAlgorithms subpacket.
-rw-r--r-- | openpgp/src/cert.rs | 1 | ||||
-rw-r--r-- | openpgp/src/packet/signature/subpacket.rs | 21 |
2 files changed, 14 insertions, 8 deletions
diff --git a/openpgp/src/cert.rs b/openpgp/src/cert.rs index acb4e7ab..208783f9 100644 --- a/openpgp/src/cert.rs +++ b/openpgp/src/cert.rs @@ -4456,6 +4456,7 @@ macro_rules! impl_pref { // look on the primary User ID and then fall back to the // direct key signature. We need to be careful to handle // the case where there are no User IDs. + #[allow(deprecated)] if let Ok(u) = self.primary_userid() { u.$subpacket() } else if let Ok(sig) = self.direct_key_signature() { diff --git a/openpgp/src/packet/signature/subpacket.rs b/openpgp/src/packet/signature/subpacket.rs index 9be2842c..aee42e8d 100644 --- a/openpgp/src/packet/signature/subpacket.rs +++ b/openpgp/src/packet/signature/subpacket.rs @@ -301,12 +301,13 @@ pub enum SubpacketTag { /// /// [Section 5.2.3.28 of RFC 4880bis]: https://tools.ietf.org/html/draft-ietf-openpgp-rfc4880bis-09.html#section-5.2.3.28 IssuerFingerprint, - /// The AEAD algorithms that the certificate holder prefers (proposed). + + /// The AEAD algorithms that the certificate holder prefers (deprecated). /// - /// See [Section 5.2.3.8 of RFC 4880bis] for details. + /// See [Section 5.2.3.8 of draft-ietf-openpgp-rfc4880bis-09] for details. /// - /// [Section 5.2.3.8 of RFC 4880bis]: https://tools.ietf.org/html/draft-ietf-openpgp-rfc4880bis-09.html#section-5.2.3.8 - #[deprecated] + /// [Section 5.2.3.8 of draft-ietf-openpgp-rfc4880bis-09]: https://tools.ietf.org/html/draft-ietf-openpgp-rfc4880bis-09.html#section-5.2.3.8 + #[deprecated(note = "Use PreferredAEADCiphersuites instead")] PreferredAEADAlgorithms, /// Who the signed message was intended for (proposed). /// @@ -1687,12 +1688,13 @@ pub enum SubpacketValue { /// /// [Section 5.2.3.28 of RFC 4880bis]: https://tools.ietf.org/html/draft-ietf-openpgp-rfc4880bis-09.html#section-5.2.3.28 IssuerFingerprint(Fingerprint), - /// The AEAD algorithms that the certificate holder prefers (proposed). + + /// The AEAD algorithms that the certificate holder prefers (deprecated). /// - /// See [Section 5.2.3.8 of RFC 4880bis] for details. + /// See [Section 5.2.3.8 of draft-ietf-openpgp-rfc4880bis-09] for details. /// - /// [Section 5.2.3.8 of RFC 4880bis]: https://tools.ietf.org/html/draft-ietf-openpgp-rfc4880bis-09.html#section-5.2.3.8 - #[deprecated] + /// [Section 5.2.3.8 of draft-ietf-openpgp-rfc4880bis-09]: https://tools.ietf.org/html/draft-ietf-openpgp-rfc4880bis-09.html#section-5.2.3.8 + #[deprecated(note = "Use PreferredAEADCiphersuites instead")] PreferredAEADAlgorithms(Vec<AEADAlgorithm>), /// Who the signed message was intended for (proposed). /// @@ -1740,6 +1742,7 @@ impl ArbitraryBounded for SubpacketValue { use self::SubpacketValue::*; use crate::arbitrary_helper::gen_arbitrary_from_range; + #[allow(deprecated)] loop { #[allow(deprecated)] break match gen_arbitrary_from_range(0..27, g) { @@ -3358,6 +3361,7 @@ impl SubpacketAreas { } /// Returns the value of the Preferred AEAD Algorithms subpacket. + #[deprecated(note = "Use preferred_aead_ciphersuites instead")] pub fn preferred_aead_algorithms(&self) -> Option<&[AEADAlgorithm]> { // array of one-octet values @@ -7030,6 +7034,7 @@ impl signature::SignatureBuilder { } /// Sets the Preferred AEAD Algorithms subpacket. + #[deprecated(note = "Use set_preferred_aead_ciphersuites instead")] pub fn set_preferred_aead_algorithms(mut self, preferences: Vec<AEADAlgorithm>) -> Result<Self> |