Temporarily disable libgpgme functions because of a bug
`Possible incorrect libgpgme API usage causes a SIGABRT when verifying signatures #176` <https://git.meli.delivery/meli/meli/issues/176>pull/177/head
parent
660bacb926
commit
f9ac9b607a
|
@ -19,6 +19,9 @@
|
|||
* along with meli. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
//FIXME
|
||||
#![allow(unused_imports, unused_variables)]
|
||||
|
||||
use melib::email::{
|
||||
attachment_types::{ContentDisposition, ContentType, MultipartType},
|
||||
pgp as melib_pgp, Attachment, AttachmentBuilder,
|
||||
|
@ -30,18 +33,24 @@ use std::future::Future;
|
|||
use std::pin::Pin;
|
||||
|
||||
pub async fn decrypt(raw: Vec<u8>) -> Result<(melib_pgp::DecryptionMetadata, Vec<u8>)> {
|
||||
Err("libgpgme functions are temporarily disabled due to an unsolved bug <https://git.meli.delivery/meli/meli/issues/176>.".into())
|
||||
/*
|
||||
let mut ctx = Context::new()?;
|
||||
let cipher = ctx.new_data_mem(&raw)?;
|
||||
ctx.decrypt(cipher)?.await
|
||||
*/
|
||||
}
|
||||
|
||||
pub async fn verify(a: Attachment) -> Result<()> {
|
||||
Err("libgpgme functions are temporarily disabled due to an unsolved bug <https://git.meli.delivery/meli/meli/issues/176>.".into())
|
||||
/*
|
||||
let (data, sig) =
|
||||
melib_pgp::verify_signature(&a).chain_err_summary(|| "Could not verify signature.")?;
|
||||
let mut ctx = Context::new()?;
|
||||
let sig = ctx.new_data_mem(sig.body().trim())?;
|
||||
let data = ctx.new_data_mem(&data)?;
|
||||
ctx.verify(sig, data)?.await
|
||||
*/
|
||||
}
|
||||
|
||||
pub fn sign_filter(
|
||||
|
@ -53,6 +62,8 @@ pub fn sign_filter(
|
|||
Ok(
|
||||
move |a: AttachmentBuilder| -> Pin<Box<dyn Future<Output = Result<AttachmentBuilder>>+Send>> {
|
||||
Box::pin(async move {
|
||||
Err("libgpgme functions are temporarily disabled due to an unsolved bug <https://git.meli.delivery/meli/meli/issues/176>.".into())
|
||||
/*
|
||||
let a: Attachment = a.into();
|
||||
let mut ctx = Context::new()?;
|
||||
let data = ctx.new_data_mem(&melib_pgp::convert_attachment_to_rfc_spec(
|
||||
|
@ -77,6 +88,7 @@ pub fn sign_filter(
|
|||
vec![],
|
||||
)
|
||||
.into())
|
||||
*/
|
||||
})
|
||||
},
|
||||
)
|
||||
|
@ -92,6 +104,8 @@ pub fn encrypt_filter(
|
|||
Ok(
|
||||
move |a: AttachmentBuilder| -> Pin<Box<dyn Future<Output = Result<AttachmentBuilder>>+Send>> {
|
||||
Box::pin(async move {
|
||||
Err("libgpgme functions are temporarily disabled due to an unsolved bug <https://git.meli.delivery/meli/meli/issues/176>.".into())
|
||||
/*
|
||||
let a: Attachment = a.into();
|
||||
debug!("main attachment is {:?}", &a);
|
||||
let mut ctx = Context::new()?;
|
||||
|
@ -124,6 +138,7 @@ pub fn encrypt_filter(
|
|||
vec![],
|
||||
)
|
||||
.into())
|
||||
*/
|
||||
})
|
||||
},
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue