summaryrefslogtreecommitdiffstats
path: root/pgp.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2020-02-02 15:10:34 -0800
committerKevin McCarthy <kevin@8t8.us>2020-02-29 19:15:09 -0800
commitd3d0f3a23dfac4c326f68cdc99430858e2572198 (patch)
treefaa1006c1849b63f3cd4ac47d32a7cadecc0d3ec /pgp.c
parent093cc268e9e812ca647f6edfcf8028dff9b62650 (diff)
Change send_menus to set sctx instead of globals.
Add a "cleared" bit for smime_crypt_alg. Otherwise clearing the value in smime.c's menu would cause the compose menu and mutt_protect() to fall back to using SmimeCryptAlg.
Diffstat (limited to 'pgp.c')
-rw-r--r--pgp.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/pgp.c b/pgp.c
index 2c784fbd..92cf6101 100644
--- a/pgp.c
+++ b/pgp.c
@@ -1797,16 +1797,19 @@ cleanup:
return b;
}
-int pgp_send_menu (HEADER *msg)
+void pgp_send_menu (SEND_CONTEXT *sctx)
{
+ HEADER *msg;
pgp_key_t p;
char input_signas[SHORT_STRING];
char *prompt, *letters, *choices;
char promptbuf[LONG_STRING];
int choice;
+ msg = sctx->msg;
+
if (!(WithCrypto & APPLICATION_PGP))
- return msg->security;
+ return;
/* If autoinline and no crypto options set, then set inline. */
if (option (OPTPGPAUTOINLINE) &&
@@ -1918,7 +1921,7 @@ int pgp_send_menu (HEADER *msg)
{
snprintf (input_signas, sizeof (input_signas), "0x%s",
pgp_fpr_or_lkeyid (p));
- mutt_str_replace (&PgpSignAs, input_signas);
+ mutt_str_replace (&sctx->pgp_sign_as, input_signas);
pgp_free_key (&p);
msg->security |= SIGN;
@@ -1955,8 +1958,6 @@ int pgp_send_menu (HEADER *msg)
break;
}
}
-
- return (msg->security);
}