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.
This commit is contained in:
Heiko Schaefer 2023-11-03 09:24:13 +01:00
parent 20ee493ea8
commit 3235f1a8a6
No known key found for this signature in database
GPG key ID: 4A849A1904CCBD7D
2 changed files with 3 additions and 0 deletions

View file

@ -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<String> {
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())?;

View file

@ -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)?)
}