From: Dale Woolridge Date: Mon, 12 Apr 2004 21:19:27 +0000 (+0000) Subject: See: http://does-not-exist.org/mail-archives/mutt-dev/msg00843.html X-Git-Tag: mutt-1-5-15-rel~184 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=35bb9989d698f816a6d9ad51ff6c4182d86d5a03;p=mutt See: http://does-not-exist.org/mail-archives/mutt-dev/msg00843.html --- diff --git a/compose.c b/compose.c index a77667c8..bed25df7 100644 --- a/compose.c +++ b/compose.c @@ -131,6 +131,15 @@ static void redraw_crypt_lines (HEADER *msg) addstr (_("Sign")); else addstr (_("Clear")); + + if ((WithCrypto & APPLICATION_PGP)) + if ((msg->security & (ENCRYPT | SIGN))) + { + if ((msg->security & INLINE)) + addstr (_(" (inline)")); + else + addstr (_(" (PGP/MIME)")); + } clrtoeol (); move (HDR_CRYPTINFO, 0); @@ -162,15 +171,15 @@ static int pgp_send_menu (HEADER *msg, int *redraw) if (!(WithCrypto & APPLICATION_PGP)) return msg->security; - switch (mutt_multi_choice (_("PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "), - _("esabf"))) + switch (mutt_multi_choice (_("PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "), + _("esabif"))) { case 1: /* (e)ncrypt */ - msg->security |= ENCRYPT; + msg->security ^= ENCRYPT; break; case 2: /* (s)ign */ - msg->security |= SIGN; + msg->security ^= SIGN; break; case 3: /* sign (a)s */ @@ -197,18 +206,31 @@ static int pgp_send_menu (HEADER *msg, int *redraw) break; case 4: /* (b)oth */ - msg->security = ENCRYPT | SIGN; + if ((msg->security & (ENCRYPT | SIGN)) == (ENCRYPT | SIGN)) + msg->security = 0; + else + msg->security |= (ENCRYPT | SIGN); break; - case 5: /* (f)orget it */ + case 5: /* (i)nline */ + if ((msg->security & (ENCRYPT | SIGN))) + msg->security ^= INLINE; + else + msg->security &= ~INLINE; + break; + + case 6: /* (f)orget it */ msg->security = 0; break; } - if (msg->security && msg->security != APPLICATION_PGP) - msg->security |= APPLICATION_PGP; - else - msg->security = 0; + if (msg->security) + { + if (! (msg->security & (ENCRYPT | SIGN))) + msg->security = 0; + else + msg->security |= APPLICATION_PGP; + } if(*redraw) redraw_crypt_lines (msg); diff --git a/crypt.c b/crypt.c index 5cc2cd8a..f50842f2 100644 --- a/crypt.c +++ b/crypt.c @@ -159,12 +159,11 @@ int crypt_valid_passphrase(int flags) -int mutt_protect (HEADER *msg, HEADER *cur, char *keylist) +int mutt_protect (HEADER *msg, char *keylist) { BODY *pbody = NULL, *tmp_pbody = NULL; BODY *tmp_smime_pbody = NULL; BODY *tmp_pgp_pbody = NULL; - int traditional = 0; int flags = (WithCrypto & APPLICATION_PGP)? msg->security: 0; int i; @@ -174,36 +173,22 @@ int mutt_protect (HEADER *msg, HEADER *cur, char *keylist) if ((msg->security & SIGN) && !crypt_valid_passphrase (msg->security)) return (-1); - if ((WithCrypto & APPLICATION_PGP) && (msg->security & APPLICATION_PGP)) + if ((WithCrypto & APPLICATION_PGP) && ((msg->security & PGPINLINE) == PGPINLINE)) { - if ((msg->content->type == TYPETEXT) && - !ascii_strcasecmp (msg->content->subtype, "plain")) + /* they really want to send it inline... go for it */ + if (!isendwin ()) mutt_endwin _("Invoking PGP..."); + pbody = crypt_pgp_traditional_encryptsign (msg->content, flags, keylist); + if (pbody) { - if (cur && cur->security && option (OPTPGPAUTOTRAD) - && (option (OPTCRYPTREPLYENCRYPT) - || option (OPTCRYPTREPLYSIGN) - || option (OPTCRYPTREPLYSIGNENCRYPTED))) - { - if(mutt_is_application_pgp(cur->content)) - traditional = 1; - } - else - { - if ((i = query_quadoption (OPT_PGPTRADITIONAL, _("Create a traditional (inline) PGP message?"))) == -1) - return -1; - else if (i == M_YES) - traditional = 1; - } - } - if (traditional) - { - if (!isendwin ()) mutt_endwin _("Invoking PGP..."); - if (!(pbody = crypt_pgp_traditional_encryptsign (msg->content, flags, keylist))) - return -1; - msg->content = pbody; return 0; } + + /* otherwise inline won't work...ask for revert */ + if ((i = query_quadoption (OPT_PGPMIMEASK, _("Message can't be sent inline. Revert to using PGP/MIME?"))) != M_YES) + return -1; + + /* go ahead with PGP/MIME */ } if (!isendwin ()) mutt_endwin (NULL); @@ -391,6 +376,9 @@ int mutt_is_application_pgp (BODY *m) else if (p && !ascii_strncasecmp ("pgp-keys", p, 7)) t |= PGPKEY; } + if (t) + t |= PGPINLINE; + return t; } diff --git a/init.h b/init.h index 3556aea2..e7d4454f 100644 --- a/init.h +++ b/init.h @@ -1378,6 +1378,48 @@ struct option_t MuttVars[] = { ** removed, while the inner multipart/signed part is retained. ** (PGP only) */ + { "pgp_create_traditional", DT_SYN, R_NONE, UL "pgp_autoinline", 0 }, + { "pgp_autoinline", DT_BOOL, R_NONE, OPTPGPAUTOINLINE, 0 }, + /* + ** .pp + ** This option controls whether Mutt generates old-style inline + ** (traditional) PGP encrypted or signed messages under certain + ** circumstances. This can be overridden by use of the \fIpgp-menu\fP, + ** when inline is not required. + ** .pp + ** Note that Mutt might automatically use PGP/MIME for messages + ** which consist of more than a single MIME part. Mutt can be + ** configured to ask before sending PGP/MIME messages when inline + ** (traditional) would not work. + ** See also: ``$$pgp_mime_ask''. + ** .pp + ** Also note that using the old-style PGP message format is \fBstrongly\fP + ** \fBdeprecated\fP. + ** (PGP only) + */ + { "pgp_auto_traditional", DT_SYN, R_NONE, UL "pgp_replyinline", 0 }, + { "pgp_replyinline", DT_BOOL, R_NONE, OPTPGPREPLYINLINE, 0 }, + /* + ** .pp + ** Setting this variable will cause Mutt to always attempt to + ** create an inline (traditional) message when replying to a + ** message which is PGP encrypted/signed inline. This can be + ** overridden by use of the \fIpgp-menu\fP, when inline is not + ** required. This option does not automatically detect if the + ** (replied-to) message is inline; instead it relies on Mutt + ** internals for previously checked/flagged messages. + ** .pp + ** Note that Mutt might automatically use PGP/MIME for messages + ** which consist of more than a single MIME part. Mutt can be + ** configured to ask before sending PGP/MIME messages when inline + ** (traditional) would not work. + ** See also: ``$$pgp_mime_ask''. + ** .pp + ** Also note that using the old-style PGP message format is \fBstrongly\fP + ** \fBdeprecated\fP. + ** (PGP only) + ** + */ { "pgp_show_unusable", DT_BOOL, R_NONE, OPTPGPSHOWUNUSABLE, 1 }, /* ** .pp @@ -1427,37 +1469,17 @@ struct option_t MuttVars[] = { ** `reverse-'. ** (PGP only) */ - { "pgp_create_traditional", DT_QUAD, R_NONE, OPT_PGPTRADITIONAL, M_NO }, + { "pgp_mime_ask", DT_QUAD, R_NONE, OPT_PGPMIMEASK, M_NO }, /* ** .pp - ** This option controls whether Mutt generates old-style inline PGP - ** encrypted or signed messages. - ** .pp - ** Note that PGP/MIME will be used automatically for messages which have - ** a character set different from us-ascii, or which consist of more than - ** a single MIME part. + ** This option controls whether Mutt will prompt you for + ** automatically sending a (signed/encrypted) message using + ** PGP/MIME when inline (traditional) fails (for any reason). ** .pp ** Also note that using the old-style PGP message format is \fBstrongly\fP ** \fBdeprecated\fP. ** (PGP only) */ - { "pgp_auto_traditional", DT_BOOL, R_NONE, OPTPGPAUTOTRAD, 0 }, - /* - ** .pp - ** This option causes Mutt to generate an old-style inline PGP - ** encrypted or signed message when replying to an old-style - ** message, and a PGP/MIME message when replying to a PGP/MIME - ** message. Note that this option is only meaningful when using - ** ``$$crypt_replyencrypt'', ``$$crypt_replysign'', or - ** ``$$crypt_replysignencrypted''. - ** .pp - ** Also note that PGP/MIME will be used automatically for messages - ** which have a character set different from us-ascii, or which - ** consist of more than a single MIME part. - ** .pp - ** This option overrides ``$$pgp_create_traditional'' - ** (PGP only) - */ /* XXX Default values! */ diff --git a/mutt.h b/mutt.h index 05cc0316..c381c803 100644 --- a/mutt.h +++ b/mutt.h @@ -1,3 +1,4 @@ + /* * Copyright (C) 1996-2002 Michael R. Elkins * @@ -277,7 +278,7 @@ enum OPT_MIMEFWD, OPT_MIMEFWDREST, OPT_MOVE, - OPT_PGPTRADITIONAL, /* create old-style PGP messages */ + OPT_PGPMIMEASK, /* ask to revert to PGP/MIME when inline fails */ #ifdef USE_POP OPT_POPDELETE, OPT_POPRECONNECT, @@ -444,7 +445,6 @@ enum OPTPGPIGNORESUB, OPTPGPCHECKEXIT, OPTPGPLONGIDS, - OPTPGPAUTOTRAD, #if 0 OPTPGPENCRYPTSELF, #endif @@ -452,6 +452,8 @@ enum OPTPGPSTRICTENC, OPTFORWDECRYPT, OPTPGPSHOWUNUSABLE, + OPTPGPAUTOINLINE, + OPTPGPREPLYINLINE, /* pseudo options */ @@ -641,7 +643,7 @@ typedef struct body typedef struct header { - unsigned int security : 10; /* bit 0-6: flags, bit 7,8: application. + unsigned int security : 11; /* bit 0-6: flags, bit 7,8: application. see: crypt.h pgplib.h, smime.h */ unsigned int mime : 1; /* has a Mime-Version header? */ diff --git a/mutt_crypt.h b/mutt_crypt.h index 0ddbc28c..f63c8d0d 100644 --- a/mutt_crypt.h +++ b/mutt_crypt.h @@ -36,17 +36,19 @@ #define BADSIGN (1 << 3) #define PARTSIGN (1 << 4) #define SIGNOPAQUE (1 << 5) -/* (1 << 6) is used by PGPKEY below. */ +#define KEYBLOCK (1 << 6) /* KEY too generic? */ +#define INLINE (1 << 7) -#define APPLICATION_PGP (1 << 7) -#define APPLICATION_SMIME (1 << 8) +#define APPLICATION_PGP (1 << 8) +#define APPLICATION_SMIME (1 << 9) -#define PGP_TRADITIONAL_CHECKED (1 << 9) +#define PGP_TRADITIONAL_CHECKED (1 << 10) #define PGPENCRYPT (APPLICATION_PGP | ENCRYPT) #define PGPSIGN (APPLICATION_PGP | SIGN) #define PGPGOODSIGN (APPLICATION_PGP | GOODSIGN) -#define PGPKEY (APPLICATION_PGP | (1 << 6)) +#define PGPKEY (APPLICATION_PGP | KEYBLOCK) +#define PGPINLINE (APPLICATION_PGP | INLINE) #define SMIMEENCRYPT (APPLICATION_SMIME | ENCRYPT) #define SMIMESIGN (APPLICATION_SMIME | SIGN) @@ -105,7 +107,7 @@ typedef struct pgp_keyinfo *pgp_key_t; /* Some prototypes -- old crypt.h. */ -int mutt_protect (HEADER *, HEADER *, char *); +int mutt_protect (HEADER *, char *); int mutt_is_multipart_encrypted (BODY *); diff --git a/po/ca.po b/po/ca.po index cd4f8b3e..bbe7a2fe 100644 --- a/po/ca.po +++ b/po/ca.po @@ -599,14 +599,14 @@ msgid "Encrypt with: " msgstr "Xifra amb: " #: compose.c:165 -msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " -msgstr "PGP: (x)ifra, (s)igna, si(g)na com a, (a)mbdós, o en (c)lar? " +msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " +msgstr "PGP: (x)ifra, (s)igna, si(g)na com a, (a)mbdós, en (l)ínia, o en (c)lar? " # ivb (2003/03/26) -# ivb (x)ifra, (s)igna, si(g)na com a, (a)mbdós, (c)lar +# ivb (x)ifra, (s)igna, si(g)na com a, (a)mbdós, en (l)ínia, o en (c)lar #: compose.c:166 -msgid "esabf" -msgstr "xsgac" +msgid "esabif" +msgstr "xsgalc" #. sign (a)s #: compose.c:179 compose.c:269 diff --git a/po/cs.po b/po/cs.po index 124474b4..2cb74dba 100644 --- a/po/cs.po +++ b/po/cs.po @@ -681,13 +681,13 @@ msgstr "Za # #: compose.c:165 -msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " -msgstr "PGP - (¹)ifrovat, (p)odepsat, podepsat (j)ako, (o)bojí, èi (n)ic?" +msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " +msgstr "PGP - (¹)ifrovat, (p)odepsat, podepsat (j)ako, (o)bojí, pøí(m)ý, èi (n)ic?" # #: compose.c:166 -msgid "esabf" -msgstr "¹pjon" +msgid "esabif" +msgstr "¹pjomn" # #. sign (a)s diff --git a/po/da.po b/po/da.po index 17164416..575d1983 100644 --- a/po/da.po +++ b/po/da.po @@ -576,12 +576,12 @@ msgstr "Krypt #: compose.c:165 #, fuzzy -msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " -msgstr "(k)ryptér, (u)nderskriv, underskriv (s)om, (b)egge, (i)ngen PGP" +msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " +msgstr "(k)ryptér, (u)nderskriv, underskriv (s)om, (b)egge, i(n)tegreret, (i)ngen PGP" #: compose.c:166 -msgid "esabf" -msgstr "kusbi" +msgid "esabif" +msgstr "kusbni" #. sign (a)s #: compose.c:179 compose.c:269 diff --git a/po/de.po b/po/de.po index f28b75c5..fc369123 100644 --- a/po/de.po +++ b/po/de.po @@ -567,12 +567,12 @@ msgid "Encrypt with: " msgstr "Verschlüsseln mit: " #: compose.c:165 -msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " -msgstr "PGP (v)erschl., (s)ign., sign. (a)ls, (b)eides, (k)ein PGP? " +msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " +msgstr "PGP (v)erschl., (s)ign., sign. (a)ls, (b)eides, (i)nline, (k)ein PGP? " #: compose.c:166 -msgid "esabf" -msgstr "vsabk" +msgid "esabif" +msgstr "vsabik" #. sign (a)s #: compose.c:179 compose.c:269 diff --git a/po/el.po b/po/el.po index cae338e9..170b5f93 100644 --- a/po/el.po +++ b/po/el.po @@ -698,14 +698,14 @@ msgstr " # # compose.c:132 #: compose.c:165 -msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " -msgstr "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, Þ (f)orget it? " +msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " +msgstr "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)êåßìåíï, Þ (f)orget it? " # # compose.c:133 #: compose.c:166 -msgid "esabf" -msgstr "esabf" +msgid "esabif" +msgstr "esabif" # #. sign (a)s diff --git a/po/eo.po b/po/eo.po index 92f39e4d..95240633 100644 --- a/po/eo.po +++ b/po/eo.po @@ -569,12 +569,12 @@ msgid "Encrypt with: " msgstr "Æifri per: " #: compose.c:165 -msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " -msgstr "PGP æ(i)fri, (s)ubskribi, subskribi (k)iel, (a)mbaý, aý (f)orgesi? " +msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " +msgstr "PGP æ(i)fri, (s)ubskribi, subskribi (k)iel, (a)mbaý, \"i(n)line\", aý (f)orgesi? " #: compose.c:166 -msgid "esabf" -msgstr "iskaf" +msgid "esabif" +msgstr "iskanf" #. sign (a)s #: compose.c:179 compose.c:269 diff --git a/po/es.po b/po/es.po index fb164c95..aa4b9386 100644 --- a/po/es.po +++ b/po/es.po @@ -574,13 +574,14 @@ msgstr "Cifrar" #: compose.c:165 #, fuzzy -msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " -msgstr "¿co(d)ificar, f(i)rmar (c)omo, amb(o)s o ca(n)celar? " +msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " +msgstr "¿co(d)ificar, f(i)rmar (c)omo, amb(o)s, inc(l)uido, o ca(n)celar? " + #: compose.c:166 #, fuzzy -msgid "esabf" -msgstr "dicon" +msgid "esabif" +msgstr "dicoln" #. sign (a)s #: compose.c:179 compose.c:269 diff --git a/po/et.po b/po/et.po index 41591824..d181f8c1 100644 --- a/po/et.po +++ b/po/et.po @@ -569,12 +569,12 @@ msgid "Encrypt with: " msgstr "Krüpti kasutades: " #: compose.c:165 -msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " -msgstr "PGP (k)rüpti, (a)llkiri, allk. ku(i), (m)õlemad või (u)nusta? " +msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " +msgstr "PGP (k)rüpti, (a)llkiri, allk. ku(i), (m)õlemad, k(e)hasse, või (u)nusta? " #: compose.c:166 -msgid "esabf" -msgstr "kaimu" +msgid "esabif" +msgstr "kaimeu" #. sign (a)s #: compose.c:179 compose.c:269 diff --git a/po/fr.po b/po/fr.po index 171cdc9c..7a694566 100644 --- a/po/fr.po +++ b/po/fr.po @@ -594,12 +594,12 @@ msgid "Encrypt with: " msgstr "Chiffrer avec : " #: compose.c:165 -msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " -msgstr "(c)hiffrer PGP, (s)igner, (e)n tant que, les (d)eux, ou (o)ublier ? " +msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " +msgstr "(c)hiffrer PGP, (s)igner, (e)n tant que, les (d)eux, en (l)igne, ou (o)ublier ? " #: compose.c:166 -msgid "esabf" -msgstr "csedo" +msgid "esabif" +msgstr "csedlo" #. sign (a)s #: compose.c:179 compose.c:269 diff --git a/po/gl.po b/po/gl.po index c5688e00..b0bf9e0b 100644 --- a/po/gl.po +++ b/po/gl.po @@ -578,12 +578,12 @@ msgstr "Encriptar" #: compose.c:165 #, fuzzy -msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " -msgstr "¿(e)ncriptar, (f)irmar, firmar (c)omo, (a)mbas ou (o)lvidar? " +msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " +msgstr "¿(e)ncriptar, (f)irmar, firmar (c)omo, (a)mbas, (i)nterior, ou (o)lvidar? " #: compose.c:166 -msgid "esabf" -msgstr "efcao" +msgid "esabif" +msgstr "efcaio" #. sign (a)s #: compose.c:179 compose.c:269 diff --git a/po/hu.po b/po/hu.po index c9daca4d..d6793db4 100644 --- a/po/hu.po +++ b/po/hu.po @@ -569,12 +569,12 @@ msgid "Encrypt with: " msgstr "Titkosítás: " #: compose.c:165 -msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " -msgstr "PGP (t)itkosít, (a)láír, aláír (m)int, titkosít é(s) aláír, mé(g)se? " +msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " +msgstr "PGP (t)itkosít, (a)láír, aláír (m)int, titkosít é(s) aláír, (b)eágyazott, mé(g)se? " #: compose.c:166 -msgid "esabf" -msgstr "tamsg" +msgid "esabif" +msgstr "tamsbg" #. sign (a)s #: compose.c:179 compose.c:269 diff --git a/po/id.po b/po/id.po index 7ffe28e9..48d52c67 100644 --- a/po/id.po +++ b/po/id.po @@ -570,12 +570,12 @@ msgid "Encrypt with: " msgstr "Enkrip dengan: " #: compose.c:165 -msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " -msgstr "PGP (e)nkrip, (t)andatangan, tandatangan (s)bg, ke(d)uanya, (b)atal? " +msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " +msgstr "PGP (e)nkrip, (t)andatangan, tandatangan (s)bg, ke(d)uanya, (i)nline, (b)atal? " #: compose.c:166 -msgid "esabf" -msgstr "etsdb" +msgid "esabif" +msgstr "etsdib" #. sign (a)s #: compose.c:179 compose.c:269 diff --git a/po/it.po b/po/it.po index a84a42d9..d72135d0 100644 --- a/po/it.po +++ b/po/it.po @@ -580,12 +580,12 @@ msgstr "Crittografa" #: compose.c:165 #, fuzzy -msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " -msgstr "cifra(e), firma(s), firma come(a), entrambi(b), annulla(f) " +msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " +msgstr "cifra(e), firma(s), firma come(a), entrambi(b), in l(i)nea , annulla(f) " #: compose.c:166 -msgid "esabf" -msgstr "esabf" +msgid "esabif" +msgstr "esabif" #. sign (a)s #: compose.c:179 compose.c:269 diff --git a/po/ja.po b/po/ja.po index 0509d7c7..64052678 100644 --- a/po/ja.po +++ b/po/ja.po @@ -567,12 +567,12 @@ msgid "Encrypt with: " msgstr " °Å¹æ²½Êý¼°: " #: compose.c:165 -msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " -msgstr "PGP (e)°Å¹æ²½,(s)½ð̾,(a)..¤È¤·¤Æ½ð̾,(b)ξ¼Ô,(f)²ò½ü?" +msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " +msgstr "PGP (e)°Å¹æ²½,(s)½ð̾,(a)..¤È¤·¤Æ½ð̾,(b)ξ¼Ô,(i)nline,(f)²ò½ü?" #: compose.c:166 -msgid "esabf" -msgstr "esabf" +msgid "esabif" +msgstr "esabif" #. sign (a)s #: compose.c:179 compose.c:269 diff --git a/po/ko.po b/po/ko.po index 9a6fe5fc..4bfece3f 100644 --- a/po/ko.po +++ b/po/ko.po @@ -568,12 +568,12 @@ msgid "Encrypt with: " msgstr "¾Ïȣȭ ¹æ½Ä: " #: compose.c:165 -msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " -msgstr "PGP ¾Ïȣȭ(e), ¼­¸í(s), »ç¿ë ¼­¸í(a), µÑ ´Ù(b), Ãë¼Ò(f)? " +msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " +msgstr "PGP ¾Ïȣȭ(e), ¼­¸í(s), »ç¿ë ¼­¸í(a), µÑ ´Ù(b), (i)nline, Ãë¼Ò(f)? " #: compose.c:166 -msgid "esabf" -msgstr "esabf" +msgid "esabif" +msgstr "esabif" #. sign (a)s #: compose.c:179 compose.c:269 diff --git a/po/lt.po b/po/lt.po index f4dd8f61..94ec63aa 100644 --- a/po/lt.po +++ b/po/lt.po @@ -576,15 +576,15 @@ msgstr "U #: compose.c:165 #, fuzzy -msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " +msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " msgstr "" -"(u)þðifruot, pa(s)iraðyt, pasiraðyt k(a)ip, a(b)u, rinktis (m)ic algoritmà, " +"(u)þðifruot, pa(s)iraðyt, pasiraðyt k(a)ip, a(b)u, (l)aiðke, " "ar (p)amirðti?" #: compose.c:166 #, fuzzy -msgid "esabf" -msgstr "usabmp" +msgid "esabif" +msgstr "usablp" #. sign (a)s #: compose.c:179 compose.c:269 @@ -596,13 +596,12 @@ msgstr "Pasira msgid "" "S/MIME (e)ncrypt, (s)ign, encrypt (w)ith, sign (a)s, (b)oth, or (f)orget it? " msgstr "" -"(u)þðifruot, pa(s)iraðyt, pasiraðyt k(a)ip, a(b)u, rinktis (m)ic algoritmà, " -"ar (p)amirðti?" +"(u)þðifruot, pa(s)iraðyt, uþðifruo(t) su, pasiraðyt k(a)ip, a(b)u, ar (p)amirðti?" #: compose.c:228 #, fuzzy msgid "eswabf" -msgstr "usabmp" +msgstr "ustabp" #: compose.c:236 msgid "" diff --git a/po/nl.po b/po/nl.po index 3188641b..3e09bb08 100644 --- a/po/nl.po +++ b/po/nl.po @@ -566,12 +566,12 @@ msgid "Encrypt with: " msgstr "Versleutelen met: " #: compose.c:165 -msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " -msgstr "PGP (v)ersleutel, (o)ndertekenen, ondert. (a)ls, (b)eiden, (g)een? " +msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " +msgstr "PGP (v)ersleutel, (o)ndertekenen, ondert. (a)ls, (b)eiden, ber(i)cht, (g)een? " #: compose.c:166 -msgid "esabf" -msgstr "voabg" +msgid "esabif" +msgstr "voabig" #. sign (a)s #: compose.c:179 compose.c:269 diff --git a/po/pl.po b/po/pl.po index 44e33dd1..8fe79e0d 100644 --- a/po/pl.po +++ b/po/pl.po @@ -564,12 +564,12 @@ msgid "Encrypt with: " msgstr "Zaszyfruj u¿ywaj±c: " #: compose.c:165 -msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " -msgstr "PGP: (z)aszyfruj, podpi(s)z, podpisz j(a)ko, o(b)a, b(e)z PGP? " +msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " +msgstr "PGP: (z)aszyfruj, podpi(s)z, podpisz j(a)ko, o(b)a, (i)nline, b(e)z PGP? " #: compose.c:166 -msgid "esabf" -msgstr "zsabe" +msgid "esabif" +msgstr "zsabie" #. sign (a)s #: compose.c:179 compose.c:269 diff --git a/po/pt_BR.po b/po/pt_BR.po index 9434d350..ca934c7e 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -579,14 +579,14 @@ msgstr "Encriptar" #: compose.c:165 #, fuzzy -msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " +msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " msgstr "" -"(e)ncripa, a(s)sina, assina (c)omo, (a)mbos, escolhe (m)ic, ou es(q)uece? " +"(e)ncripa, a(s)sina, assina (c)omo, (a)mbos, em l(i)nha, ou es(q)uece? " #: compose.c:166 #, fuzzy -msgid "esabf" -msgstr "escamq" +msgid "esabif" +msgstr "escaiq" #. sign (a)s #: compose.c:179 compose.c:269 @@ -598,12 +598,12 @@ msgstr "Assinar como: " msgid "" "S/MIME (e)ncrypt, (s)ign, encrypt (w)ith, sign (a)s, (b)oth, or (f)orget it? " msgstr "" -"(e)ncripa, a(s)sina, assina (c)omo, (a)mbos, escolhe (m)ic, ou es(q)uece? " +"(e)ncripa, a(s)sina, e(n)cripa com, assina (c)omo, (a)mbos, ou es(q)uece? " #: compose.c:228 #, fuzzy msgid "eswabf" -msgstr "escamq" +msgstr "esncaq" #: compose.c:236 msgid "" diff --git a/po/ru.po b/po/ru.po index 756b67bc..9cde2cf2 100644 --- a/po/ru.po +++ b/po/ru.po @@ -575,12 +575,12 @@ msgid "Encrypt with: " msgstr "úÁÛÉÆÒÏ×ÁÔØ: " #: compose.c:165 -msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " -msgstr "PGP (e)ÛÉÆÒ, (s)ÐÏÄÐÉÓØ, (a)ÐÏÄÐÉÓØ ËÁË, (b)ÏÂÁ, (f)ÏÔËÁÚÁÔØÓÑ? " +msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " +msgstr "PGP (e)ÛÉÆÒ, (s)ÐÏÄÐÉÓØ, (a)ÐÏÄÐÉÓØ ËÁË, (b)ÏÂÁ, (i)nline, (f)ÏÔËÁÚÁÔØÓÑ? " #: compose.c:166 -msgid "esabf" -msgstr "esabf" +msgid "esabif" +msgstr "esabif" #. sign (a)s #: compose.c:179 compose.c:269 diff --git a/po/sk.po b/po/sk.po index 292dd7a6..00555f1a 100644 --- a/po/sk.po +++ b/po/sk.po @@ -584,15 +584,15 @@ msgstr "Za #: compose.c:165 #, fuzzy -msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " +msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " msgstr "" -"(e)-¹ifr, (s)-podp, podp (a)ko, o(b)e, oznaè alg. mi(c), alebo (f)-zabudnú» " +"(e)-¹ifr, (s)-podp, podp (a)ko, o(b)e, (i)nline, alebo (f)-zabudnú» " "na to? " #: compose.c:166 #, fuzzy -msgid "esabf" -msgstr "esabmf" +msgid "esabif" +msgstr "esabif" #. sign (a)s #: compose.c:179 compose.c:269 @@ -604,13 +604,12 @@ msgstr "Podp msgid "" "S/MIME (e)ncrypt, (s)ign, encrypt (w)ith, sign (a)s, (b)oth, or (f)orget it? " msgstr "" -"(e)-¹ifr, (s)-podp, podp (a)ko, o(b)e, oznaè alg. mi(c), alebo (f)-zabudnú» " -"na to? " +"(e)-¹ifr, (s)-podp, (w)-¹ifr s, podp (a)ko, o(b)e, alebo (f)-zabudnú» na to? " #: compose.c:228 #, fuzzy msgid "eswabf" -msgstr "esabmf" +msgstr "eswabf" #: compose.c:236 msgid "" diff --git a/po/sv.po b/po/sv.po index 58103da1..82fae481 100644 --- a/po/sv.po +++ b/po/sv.po @@ -566,12 +566,12 @@ msgid "Encrypt with: " msgstr "Kryptera med: " #: compose.c:165 -msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " -msgstr "PGP: (k)ryptera, (s)ignera, signera s(o)m, (b)åda, eller sk(i)ppa det?" +msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " +msgstr "PGP: (k)ryptera, (s)ignera, signera s(o)m, (b)åda, i(n)fogat, eller sk(i)ppa det?" #: compose.c:166 -msgid "esabf" -msgstr "ksobi" +msgid "esabif" +msgstr "ksobni" #. sign (a)s #: compose.c:179 compose.c:269 diff --git a/po/tr.po b/po/tr.po index 12953762..3b6aa34b 100644 --- a/po/tr.po +++ b/po/tr.po @@ -575,14 +575,14 @@ msgstr " #: compose.c:165 #, fuzzy -msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " +msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " msgstr "" -"þ(i)frele, i(m)zala, (f)arklý imzala, i(k)isi de, mi(c) algoritmini seç " +"þ(i)frele, i(m)zala, (f)arklý imzala, i(k)isi de, (i)nline, " "yoksa i(p)talmý? " #: compose.c:166 -msgid "esabf" -msgstr "imfkcp" +msgid "esabif" +msgstr "imfkip" #. sign (a)s #: compose.c:179 compose.c:269 diff --git a/po/uk.po b/po/uk.po index d60d1852..8db9d5c1 100644 --- a/po/uk.po +++ b/po/uk.po @@ -570,12 +570,12 @@ msgstr " #: compose.c:165 #, fuzzy -msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " -msgstr "ÛÉÆÒ.(e), ЦÄÐ.(s), ЦÄÐ. ÑË(a), ÕÓÅ(b) ÞÉ ×¦ÄͦÎÁ(f)? " +msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " +msgstr "ÛÉÆÒ.(e), ЦÄÐ.(s), ЦÄÐ. ÑË(a), ÕÓÅ(b), (i)nline ÞÉ ×¦ÄͦÎÁ(f)? " #: compose.c:166 -msgid "esabf" -msgstr "" +msgid "esabif" +msgstr "esabif" #. sign (a)s #: compose.c:179 compose.c:269 diff --git a/po/zh_CN.po b/po/zh_CN.po index 6c554ffe..4e6d2577 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -583,14 +583,14 @@ msgstr " #: compose.c:165 #, fuzzy -msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " +msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " msgstr "" -"(e)¼ÓÃÜ, (s)Ç©Ãû, (a)ÓñðµÄÉí·ÝÇ©, (b)Á½Õß½ÔÒª, Ñ¡Ôñ (m)ic ÑÝËã·¨ »ò (f)·Å" +"(e)¼ÓÃÜ, (s)Ç©Ãû, (a)ÓñðµÄÉí·ÝÇ©, (b)Á½Õß½ÔÒª, (i)nline, »ò (f)·Å" "Æú£¿" #: compose.c:166 -msgid "esabf" -msgstr "" +msgid "esabif" +msgstr "esabif" #. sign (a)s #: compose.c:179 compose.c:269 diff --git a/po/zh_TW.po b/po/zh_TW.po index 14bf015b..049df484 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -575,12 +575,12 @@ msgstr "加密" #: compose.c:165 #, fuzzy -msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " +msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " msgstr "(1)加密, (2)簽名, (3)用別的身份簽, (4)兩者皆要, 或 (5)放棄?" #: compose.c:166 -msgid "esabf" -msgstr "12345" +msgid "esabif" +msgstr "1234i5" #. sign (a)s #: compose.c:179 compose.c:269 diff --git a/postpone.c b/postpone.c index ac611079..7532937d 100644 --- a/postpone.c +++ b/postpone.c @@ -484,6 +484,11 @@ int mutt_parse_crypt_hdr (char *p, int set_signas) *q = '\0'; break; + case 'i': + case 'I': + pgp |= INLINE; + break; + default: mutt_error _("Illegal PGP header"); return 0; diff --git a/send.c b/send.c index a7bb2c9c..cc171e76 100644 --- a/send.c +++ b/send.c @@ -1256,7 +1256,14 @@ ci_send_message (int flags, /* send mode */ msg->security |= SIGN; if (option (OPTCRYPTREPLYSIGNENCRYPTED) && cur && (cur->security & ENCRYPT)) msg->security |= SIGN; - } + if (WithCrypto & APPLICATION_PGP && (msg->security & (ENCRYPT | SIGN))) + { + if (option (OPTPGPAUTOINLINE)) + msg->security |= INLINE; + if (option (OPTPGPREPLYINLINE) && cur && (cur->security & INLINE)) + msg->security |= INLINE; + } + } if (WithCrypto && msg->security) { @@ -1494,7 +1501,7 @@ main_loop: clear_content = msg->content; if ((crypt_get_keys (msg, &pgpkeylist) == -1) || - mutt_protect (msg, cur, pgpkeylist) == -1) + mutt_protect (msg, pgpkeylist) == -1) { msg->content = mutt_remove_multipart (msg->content); @@ -1574,7 +1581,7 @@ main_loop: /* this means writing only the main part */ msg->content = clear_content->parts; - if (mutt_protect (msg, cur, pgpkeylist) == -1) + if (mutt_protect (msg, pgpkeylist) == -1) { /* we can't do much about it at this point, so * fallback to saving the whole thing to fcc diff --git a/sendlib.c b/sendlib.c index 90ca2c13..54b9e54e 100644 --- a/sendlib.c +++ b/sendlib.c @@ -2405,6 +2405,8 @@ int mutt_write_fcc (const char *path, HEADER *hdr, const char *msgid, int post, if (PgpSignAs && *PgpSignAs) fprintf (msg->fp, "<%s>", PgpSignAs); } + if (hdr->security & INLINE) + fputc ('I', msg->fp); fputc ('\n', msg->fp); } @@ -2423,6 +2425,8 @@ int mutt_write_fcc (const char *path, HEADER *hdr, const char *msgid, int post, if (SmimeDefaultKey && *SmimeDefaultKey) fprintf (msg->fp, "<%s>", SmimeDefaultKey); } + if (hdr->security & INLINE) + fputc ('I', msg->fp); fputc ('\n', msg->fp); }