--- mutt-1.3.26/PATCHES Fri Jan 11 08:33:08 2002 +++ mutt-1.3.26/PATCHES Sun Jan 20 09:04:23 2002 @@ -0,0 +1 @@ +patch-1.3.26.dw.pgp-traditional.1 --- mutt-1.3.26/init.h Fri Jan 11 08:33:07 2002 +++ mutt-1.3.26/init.h Sun Jan 20 09:03:10 2002 @@ -1300,8 +1300,8 @@ ** a character set different from us-ascii, or which consist of more than ** a single MIME part. ** .pp - ** Also note that using the old-style PGP message format is \fBstrongly\fP - ** \fBdeprecated\fP. + ** Please note that this format now uses text/plain instead of application/pgp + ** as the content type. */ /* XXX Default values! */ --- mutt-1.3.26/muttlib.c Fri Jan 11 08:33:06 2002 +++ mutt-1.3.26/muttlib.c Sun Jan 20 09:03:11 2002 @@ -104,8 +104,6 @@ char tmp[_POSIX_PATH_MAX]; BODY *b; - PARAMETER *par, **ppar; - short use_disp; if (src->filename) @@ -151,13 +149,7 @@ if (b->hdr) b->hdr = NULL; - /* copy parameters */ - for (par = b->parameter, ppar = &b->parameter; par; ppar = &(*ppar)->next, par = par->next) - { - *ppar = mutt_new_parameter (); - (*ppar)->attribute = safe_strdup (par->attribute); - (*ppar)->value = safe_strdup (par->value); - } + mutt_copy_parameter (&b->parameter, b->parameter); mutt_stamp_attachment (b); @@ -201,6 +193,18 @@ *p = 0; } + + +void mutt_copy_parameter (PARAMETER **tgt, PARAMETER *src) +{ + for (; src; tgt = &(*tgt)->next, src = src->next) + { + *tgt = mutt_new_parameter (); + (*tgt)->attribute = safe_strdup (src->attribute); + (*tgt)->value = safe_strdup (src->value); + } +} + void mutt_free_parameter (PARAMETER **p) { --- mutt-1.3.26/pgp.c Fri Jan 18 08:32:14 2002 +++ mutt-1.3.26/pgp.c Sun Jan 20 09:03:11 2002 @@ -1646,25 +1646,22 @@ b = mutt_new_body (); - 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); + /* + * preserve parameters and encoding for new body + */ + mutt_copy_parameter (&b->parameter, a->parameter); + b->encoding = a->encoding; - b->filename = safe_strdup (pgpoutfile); - - /* The following is intended to give a clue to some completely brain-dead - * "mail environments" which are typically used by large corporations. + /* + * application/pgp was withdrawn...so we encode using text/plain now */ + b->type = TYPETEXT; + b->subtype = safe_strdup ("plain"); - b->d_filename = safe_strdup ("msg.pgp"); + b->filename = safe_strdup (pgpoutfile); + b->use_disp = 0; b->disposition = DISPINLINE; b->unlink = 1; - b->use_disp = 1; return b; } @@ -1701,8 +1698,7 @@ return (-1); if ((msg->content->type == TYPETEXT) && - !ascii_strcasecmp (msg->content->subtype, "plain") && - ((flags & PGPENCRYPT) || (msg->content->content && msg->content->content->hibin == 0))) + !ascii_strcasecmp (msg->content->subtype, "plain")) { if ((i = query_quadoption (OPT_PGPTRADITIONAL, _("Create an application/pgp message?"))) == -1) return -1; --- mutt-1.3.26/protos.h Fri Jan 18 08:32:15 2002 +++ mutt-1.3.26/protos.h Sun Jan 20 09:03:11 2002 @@ -257,6 +257,7 @@ int mutt_complete (char *, size_t); int mutt_compose_attachment (BODY *a); int mutt_copy_body (FILE *, BODY **, BODY *); +void mutt_copy_parameter (PARAMETER **, PARAMETER *); int mutt_decode_save_attachment (FILE *, BODY *, char *, int, int); int mutt_display_message (HEADER *h); int mutt_edit_attachment(BODY *); --- mutt-1.3.26/send.c Fri Jan 11 08:33:06 2002 +++ mutt-1.3.26/send.c Sun Jan 20 09:03:11 2002 @@ -1439,7 +1439,7 @@ * - multipart/signed. In this case, clear_content is a child. * - multipart/encrypted. In this case, clear_content exists * independently - * - application/pgp. In this case, clear_content exists independently. + * - text/plain (and enc/sig with pgp trad.). clear_context exists ind. * - something else. In this case, it's the same as clear_content. */ @@ -1558,7 +1558,7 @@ { #ifdef HAVE_PGP if ((msg->pgp & PGPENCRYPT) || - ((msg->pgp & PGPSIGN) && msg->content->type == TYPEAPPLICATION)) + ((msg->pgp & PGPSIGN) && msg->content->type == TYPETEXT)) { mutt_free_body (&msg->content); /* destroy PGP data */ msg->content = clear_content; /* restore clear text. */ --- mutt-1.3.26/doc/muttrc.man Fri Jan 18 12:29:26 2002 +++ mutt-1.3.26/doc/muttrc.man Sun Jan 20 09:03:14 2002 @@ -2404,8 +2404,8 @@ a character set different from us-ascii, or which consist of more than a single MIME part. .IP -Also note that using the old-style PGP message format is \fBstrongly\fP -\fBdeprecated\fP. +Please note that this format now uses text/plain instead of application/pgp +as the content type. .TP