From 3235f1a8a65a6b7ef0c44488cd608f9c162ead94 Mon Sep 17 00:00:00 2001 From: Heiko Schaefer Date: Fri, 3 Nov 2023 09:24:13 +0100 Subject: [PATCH] Ignore sequoia-openpgp deprecations. sequoia-openpgp's deprecations in 1.17 effectively force users that enable "-D warnings" to either upgrade to 1.17 (which would force our downstreams to also use that version). Alternatives are: - upgrade sequoia-openpgp - disable "-D warnings" - ignore the deprecations with #allow. --- card-functionality/src/util.rs | 2 ++ openpgp-card-sequoia/src/decryptor.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/card-functionality/src/util.rs b/card-functionality/src/util.rs index 9673186..9b4d476 100644 --- a/card-functionality/src/util.rs +++ b/card-functionality/src/util.rs @@ -14,6 +14,7 @@ use sequoia_openpgp::parse::stream::{ }; use sequoia_openpgp::parse::Parse; use sequoia_openpgp::policy::{Policy, StandardPolicy}; +#[allow(deprecated)] use sequoia_openpgp::serialize::stream::{Armorer, Encryptor, LiteralWriter, Message}; use sequoia_openpgp::Cert; @@ -124,6 +125,7 @@ pub fn encrypt_to(cleartext: &str, cert: &Cert) -> Result { let message = Message::new(&mut sink); let message = Armorer::new(message).build()?; + #[allow(deprecated)] let message = Encryptor::for_recipients(message, recipients).build()?; let mut w = LiteralWriter::new(message).build()?; w.write_all(cleartext.as_bytes())?; diff --git a/openpgp-card-sequoia/src/decryptor.rs b/openpgp-card-sequoia/src/decryptor.rs index 65300b5..0fdbed7 100644 --- a/openpgp-card-sequoia/src/decryptor.rs +++ b/openpgp-card-sequoia/src/decryptor.rs @@ -114,6 +114,7 @@ impl<'a, 'app> crypto::Decryptor for CardDecryptor<'a, 'app> { #[allow(non_snake_case)] let S: crypto::mem::Protected = dec.into(); + #[allow(deprecated)] Ok(crypto::ecdh::decrypt_unwrap(&self.public, &S, ciphertext)?) }