diff options
author | David Shaw <dshaw@jabberwocky.com> | 2003-01-30 23:54:30 +0000 |
---|---|---|
committer | David Shaw <dshaw@jabberwocky.com> | 2003-01-30 23:54:30 +0000 |
commit | 868db8d3610c2edfeb4cc02bf2aad804d957c00e (patch) | |
tree | 4d534b22b328d3720b3c03cc463154c24bb08fd9 /crypt.c | |
parent | 1fee396d5082c590a27a3d5df3566dba7208acf5 (diff) |
Introduce $pgp_auto_traditional.
Diffstat (limited to 'crypt.c')
-rw-r--r-- | crypt.c | 21 |
1 files changed, 16 insertions, 5 deletions
@@ -158,7 +158,7 @@ int crypt_valid_passphrase(int flags) -int mutt_protect (HEADER *msg, char *keylist) +int mutt_protect (HEADER *msg, HEADER *cur, char *keylist) { BODY *pbody = NULL, *tmp_pbody = NULL; BODY *tmp_smime_pbody = NULL; @@ -178,10 +178,21 @@ int mutt_protect (HEADER *msg, char *keylist) if ((msg->content->type == TYPETEXT) && !ascii_strcasecmp (msg->content->subtype, "plain")) { - if ((i = query_quadoption (OPT_PGPTRADITIONAL, _("Create an inline PGP message?"))) == -1) - return -1; - else if (i == M_YES) - traditional = 1; + 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) { |