pgp_key_t p;
char input_signas[SHORT_STRING];
+ char prompt[LONG_STRING];
+
if (!(WithCrypto & APPLICATION_PGP))
return msg->security;
-
- switch (mutt_multi_choice (_("PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "),
- _("esabif")))
+
+ snprintf (prompt, sizeof (prompt),
+ _("PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, %s, or (c)lear? "),
+ (msg->security & INLINE) ? _("PGP/M(i)ME") : _("(i)nline"));
+
+ switch (mutt_multi_choice (prompt, _("esabifc")))
{
case 1: /* (e)ncrypt */
- msg->security ^= ENCRYPT;
+ msg->security |= ENCRYPT;
+ msg->security &= ~SIGN;
break;
case 2: /* (s)ign */
- msg->security ^= SIGN;
+ msg->security |= SIGN;
+ msg->security &= ~ENCRYPT;
break;
case 3: /* sign (a)s */
crypt_pgp_void_passphrase (); /* probably need a different passphrase */
}
+#if 0
else
{
msg->security &= ~SIGN;
}
+#endif
*redraw = REDRAW_FULL;
break;
case 4: /* (b)oth */
- if ((msg->security & (ENCRYPT | SIGN)) == (ENCRYPT | SIGN))
- msg->security = 0;
- else
- msg->security |= (ENCRYPT | SIGN);
+ msg->security |= (ENCRYPT | SIGN);
break;
case 5: /* (i)nline */
break;
case 6: /* (f)orget it */
+ case 7: /* (c)lear */
msg->security = 0;
break;
}
if (!(WithCrypto & APPLICATION_SMIME))
return msg->security;
- switch (mutt_multi_choice (_("S/MIME (e)ncrypt, (s)ign, encrypt (w)ith, sign (a)s, (b)oth, or (f)orget it? "),
- _("eswabf")))
+ switch (mutt_multi_choice (_("S/MIME (e)ncrypt, (s)ign, encrypt (w)ith, sign (a)s, (b)oth, or (c)lear? "),
+ _("eswabfc")))
{
case 1: /* (e)ncrypt */
- msg->security ^= ENCRYPT;
+ msg->security |= ENCRYPT;
+ msg->security &= ~SIGN;
break;
case 3: /* encrypt (w)ith */
case 2: /* (s)ign */
if(!SmimeDefaultKey)
- mutt_message("Can\'t sign: No key specified. use sign(as).");
+ mutt_message _("Can't sign: No key specified. Use Sign As.");
else
- msg->security ^= SIGN;
+ {
+ msg->security |= SIGN;
+ msg->security &= ~ENCRYPT;
+ }
break;
case 4: /* sign (a)s */
- if ((p = smime_ask_for_key (_("Sign as: "), NULL, 0))) {
+ if ((p = smime_ask_for_key (_("Sign as: "), NULL, 0)))
+ {
p[mutt_strlen (p)-1] = '\0';
mutt_str_replace (&SmimeDefaultKey, p);
/* probably need a different passphrase */
crypt_smime_void_passphrase ();
}
+#if 0
else
msg->security &= ~SIGN;
+#endif
*redraw = REDRAW_FULL;
break;
break;
case 6: /* (f)orget it */
+ case 7: /* (c)lear */
msg->security = 0;
break;
}