Skip to content

Instantly share code, notes, and snippets.

@tim-smart
Created October 16, 2013 22:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tim-smart/7015962 to your computer and use it in GitHub Desktop.
Save tim-smart/7015962 to your computer and use it in GitHub Desktop.
diff -rupN mutt-1.5.21/globals.h mutt-1.5.21.new/globals.h
--- mutt-1.5.21/globals.h 2009-08-26 07:08:52.000000000 +1200
+++ mutt-1.5.21.new/globals.h 2013-10-17 11:10:00.752568935 +1300
@@ -226,6 +226,8 @@ WHERE LIST *UserHeader INITVAL (0);
WHERE REGEXP PgpGoodSign;
WHERE char *PgpSignAs;
WHERE short PgpTimeout;
+WHERE char *PgpMimeSignatureFilename;
+WHERE char *PgpMimeSignatureDescription;
WHERE char *PgpEntryFormat;
WHERE char *PgpClearSignCommand;
WHERE char *PgpDecodeCommand;
diff -rupN mutt-1.5.21/init.h mutt-1.5.21.new/init.h
--- mutt-1.5.21/init.h 2010-09-16 03:39:31.000000000 +1200
+++ mutt-1.5.21.new/init.h 2013-10-17 11:14:27.393886404 +1300
@@ -1895,6 +1895,18 @@ struct option_t MuttVars[] = {
** removed, while the inner \fCmultipart/signed\fP part is retained.
** (PGP only)
*/
+ { "pgp_mime_signature_filename", DT_STR, R_NONE, UL &PgpMimeSignatureFilename, UL "signature.asc"},
+ /*
+ ** .pp
+ ** This option sets the filename used for signature parts in PGP/MIME
+ ** signed messages.
+ */
+ { "pgp_mime_signature_description", DT_STR, R_NONE, UL &PgpMimeSignatureDescription, UL "Digital signature"},
+ /*
+ ** .pp
+ ** This option sets the Content-Description used for signature parts in
+ ** PGP/MIME signed messages.
+ */
{ "pgp_show_unusable", DT_BOOL, R_NONE, OPTPGPSHOWUNUSABLE, 1 },
/*
** .pp
diff -rupN mutt-1.5.21/pgp.c mutt-1.5.21.new/pgp.c
--- mutt-1.5.21/pgp.c 2010-09-14 05:19:55.000000000 +1200
+++ mutt-1.5.21.new/pgp.c 2013-10-17 11:15:32.285917913 +1300
@@ -1125,9 +1125,11 @@ BODY *pgp_sign_message (BODY *a)
t->type = TYPEAPPLICATION;
t->subtype = safe_strdup ("pgp-signature");
t->filename = safe_strdup (sigfile);
- t->use_disp = 0;
- t->disposition = DISPNONE;
+ t->use_disp = 1;
+ t->disposition = DISPINLINE;
t->encoding = ENC7BIT;
+ t->d_filename = safe_strdup (PgpMimeSignatureFilename);
+ t->description = safe_strdup (PgpMimeSignatureDescription);
t->unlink = 1; /* ok to remove this file after sending. */
return (a);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment