1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-14 07:43:06 +00:00
freebsd-ports/mail/mutt-devel/files/extra-patch-pgp-outlook
Jim Mock aa5556a4bd Add the missing extra-patch-sgmlformat patch and fix a few things:
* Adding the missing patch fixes the breakage if not built without
      defining WITHOUT_MUTT_SGMLFORMAT.

    * Fix for if both WITH_MUTT_NNTP and WITH_MUTT_PGP_OUTLOOK_PATCH are
      defined.

    * Fix pkg-plist if WITH_MUTT_PGP_OUTLOOK_PATCH and WITH_MUTT_HTML
      are both defined.

Submitted by:	maintainer
2002-02-26 23:19:05 +00:00

77 lines
2.4 KiB
Plaintext

--- init.h.orig Mon Feb 12 08:54:57 2001
+++ init.h Sat Feb 24 18:03:32 2001
@@ -1227,6 +1227,13 @@
** \fBdeprecated\fP.
*/
+ { "pgp_outlook_compat", DT_QUAD, R_NONE, OPT_PGPOUTLOOK, M_NO },
+ /*
+ ** .pp
+ ** If pgp_create_traditional is defined above, this option causes mutt
+ ** to generate messages readable by users of MS Outlook using PGP.
+ */
+
/* XXX Default values! */
{ "pgp_decode_command", DT_STR, R_NONE, UL &PgpDecodeCommand, 0},
--- mutt.h.orig Tue Feb 26 22:40:16 2002
+++ mutt.h Tue Feb 26 22:44:05 2002
@@ -263,2 +263,3 @@
OPT_PGPTRADITIONAL, /* create old-style PGP messages */
+ OPT_PGPOUTLOOK, /* Create even older broken outlook compatible messages */
#endif
--- pgp.c.orig Mon Feb 12 08:55:21 2001
+++ pgp.c Sat Feb 24 18:11:40 2001
@@ -1501,12 +1501,20 @@
b->encoding = ENC7BIT;
- b->type = TYPEAPPLICATION;
- b->subtype = safe_strdup ("pgp");
-
- mutt_set_parameter ("format", "text", &b->parameter);
- mutt_set_parameter ("x-action", flags & PGPENCRYPT ? "encrypt" : "sign",
- &b->parameter);
+ /* Outlook seems to work by scanning the message itself for PGP information, */
+ /* not the headers. If the headers are anything but text/plain, it will */
+ /* not recognize the message. */
+ if (flags & PGPOUTLOOK) {
+ b->type = TYPETEXT;
+ b->subtype = safe_strdup ("plain");
+ } else {
+ b->type = TYPEAPPLICATION;
+ b->subtype = safe_strdup ("pgp");
+
+ mutt_set_parameter ("format", "text", &b->parameter);
+ mutt_set_parameter ("x-action", flags & PGPENCRYPT ? "encrypt" : "sign",
+ &b->parameter);
+ }
b->filename = safe_strdup (pgpoutfile);
@@ -1559,8 +1567,13 @@
{
if ((i = query_quadoption (OPT_PGPTRADITIONAL, _("Create an application/pgp message?"))) == -1)
return -1;
- else if (i == M_YES)
+ else if (i == M_YES) {
traditional = 1;
+ if ((i = query_quadoption (OPT_PGPOUTLOOK, _("Create an Outlook compatible message?"))) == -1)
+ return -1;
+ else if (i == M_YES)
+ flags |= PGPOUTLOOK;
+ }
}
mutt_message _("Invoking PGP...");
--- pgplib.h.orig Mon Feb 12 08:56:00 2001
+++ pgplib.h Sat Feb 24 18:12:25 2001
@@ -23,6 +23,7 @@
#define PGPSIGN (1 << 1)
#define PGPKEY (1 << 2)
#define PGPGOODSIGN (1 << 3)
+#define PGPOUTLOOK (1 << 4)
#define KEYFLAG_CANSIGN (1 << 0)
#define KEYFLAG_CANENCRYPT (1 << 1)