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:
parent
20ee493ea8
commit
3235f1a8a6
2 changed files with 3 additions and 0 deletions
|
@ -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())?;
|
||||
|
|
|
@ -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)?)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue