summaryrefslogtreecommitdiffstats
path: root/crypt.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 /crypt.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 'crypt.c')
-rw-r--r--crypt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypt.c b/crypt.c
index b7304c46..92ba6c31 100644
--- a/crypt.c
+++ b/crypt.c
@@ -176,7 +176,7 @@ int mutt_protect (SEND_CONTEXT *sctx, char *keylist, int postpone)
orig_smime_sign_as = safe_strdup (SmimeSignAs);
mutt_str_replace (&SmimeSignAs, sctx->smime_sign_as);
}
- if (sctx->smime_crypt_alg)
+ if (sctx->smime_crypt_alg || sctx->smime_crypt_alg_cleared)
{
orig_smime_crypt_alg = safe_strdup (SmimeCryptAlg);
mutt_str_replace (&SmimeCryptAlg, sctx->smime_crypt_alg);
@@ -383,7 +383,7 @@ cleanup:
mutt_str_replace (&PgpSignAs, orig_pgp_sign_as);
if (sctx->smime_sign_as)
mutt_str_replace (&SmimeSignAs, orig_smime_sign_as);
- if (sctx->smime_crypt_alg)
+ if (sctx->smime_crypt_alg || sctx->smime_crypt_alg_cleared)
mutt_str_replace (&SmimeCryptAlg, orig_smime_crypt_alg);
return rc;