]> granicus.if.org Git - neomutt/commitdiff
Simplify nested smime handling in the attachment menu
authorKevin McCarthy <kevin@8t8.us>
Thu, 24 Jan 2019 23:19:36 +0000 (15:19 -0800)
committerRichard Russon <rich@flatcap.org>
Wed, 20 Feb 2019 00:55:01 +0000 (00:55 +0000)
Since changeset 2fd6f99b allows nested encryption handling, there is
no need to deal with the nesting directly.  Instead, just recursive as
with other nested handling.

Co-authored-by: Richard Russon <rich@flatcap.org>
recvattach.c

index 7da73351849fd060443ffbf8ff9fda891c48cf54..c1aa745510bd4ec34279deb482782e3f23184f90 100644 (file)
@@ -1167,21 +1167,6 @@ static void mutt_generate_recvattach_list(struct AttachCtx *actx, struct Email *
         goto decrypt_failed;
       }
 
-      /* S/MIME nesting */
-      if ((mutt_is_application_smime(new_body) & SMIME_OPAQUE) == SMIME_OPAQUE)
-      {
-        struct Body *outer_new_body = new_body;
-        FILE *outer_fp = new_fp;
-
-        new_body = NULL;
-        new_fp = NULL;
-
-        secured = !crypt_smime_decrypt_mime(outer_fp, &new_fp, outer_new_body, &new_body);
-
-        mutt_body_free(&outer_new_body);
-        mutt_file_fclose(&outer_fp);
-      }
-
       if (secured && (type & ENCRYPT))
         e->security |= SMIME_ENCRYPT;
     }