X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=copy.c;h=97b73c02e249e8c0e57237a5991ed06835a604d2;hp=504a1e2f555fde0c5b2aa466456cf470a9acb19f;hb=65734c98c7ff56a0258bc9052667a0cb9c2f1d0b;hpb=cac1491258e026b8c8459b2ad408a6bf2e8a03bc diff --git a/copy.c b/copy.c index 504a1e2..97b73c0 100644 --- a/copy.c +++ b/copy.c @@ -23,7 +23,7 @@ #include "handler.h" #include "mx.h" #include "copy.h" -#include "mutt_crypt.h" +#include #include "mutt_idna.h" #include "lib/debug.h" @@ -621,26 +621,23 @@ _mutt_copy_message (FILE * fpout, FILE * fpin, HEADER * hdr, BODY * body, if (flags & M_CM_REPLYING) s.flags |= M_REPLYING; - if (WithCrypto && flags & M_CM_VERIFY) + if (flags & M_CM_VERIFY) s.flags |= M_VERIFY; rc = mutt_body_handler (body, &s); } - else if (WithCrypto - && (flags & M_CM_DECODE_CRYPT) && (hdr->security & ENCRYPT)) { + else if ((flags & M_CM_DECODE_CRYPT) && (hdr->security & ENCRYPT)) { BODY *cur; FILE *fp; - if ((WithCrypto & APPLICATION_PGP) - && (flags & M_CM_DECODE_PGP) && (hdr->security & APPLICATION_PGP) && + if ((flags & M_CM_DECODE_PGP) && (hdr->security & APPLICATION_PGP) && hdr->content->type == TYPEMULTIPART) { if (crypt_pgp_decrypt_mime (fpin, &fp, hdr->content, &cur)) return (-1); fputs ("MIME-Version: 1.0\n", fpout); } - if ((WithCrypto & APPLICATION_SMIME) - && (flags & M_CM_DECODE_SMIME) && (hdr->security & APPLICATION_SMIME) + if ((flags & M_CM_DECODE_SMIME) && (hdr->security & APPLICATION_SMIME) && hdr->content->type == TYPEAPPLICATION) { if (crypt_smime_decrypt_mime (fpin, &fp, hdr->content, &cur)) return (-1);