X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=copy.c;h=2c653e174982b55ee622dd7fc6fac633ec5eee89;hp=504a1e2f555fde0c5b2aa466456cf470a9acb19f;hb=d40d2e47d8033cbf917d09c3865179870897e773;hpb=cac1491258e026b8c8459b2ad408a6bf2e8a03bc diff --git a/copy.c b/copy.c index 504a1e2..2c653e1 100644 --- a/copy.c +++ b/copy.c @@ -11,11 +11,17 @@ # include "config.h" #endif +#include +#include +#include +#include + #include #include #include #include #include +#include #include @@ -23,16 +29,9 @@ #include "handler.h" #include "mx.h" #include "copy.h" -#include "mutt_crypt.h" +#include #include "mutt_idna.h" -#include "lib/debug.h" - -#include -#include -#include -#include /* needed for SEEK_SET under SunOS 4.1.4 */ - static int address_header_decode (char **str); static int copy_delete_attach (BODY * b, FILE * fpin, FILE * fpout, char *date); @@ -621,26 +620,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);