+ char *p;
+
+ 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 (c)lear? "),
+ _("eswabfc"))) {
+ case 1: /* (e)ncrypt */
+ msg->security |= ENCRYPT;
+ msg->security &= ~SIGN;
+ break;
+
+ case 3: /* encrypt (w)ith */
+ msg->security |= ENCRYPT;
+ switch (mutt_multi_choice (_("1: DES, 2: Triple-DES, 3: RC2-40,"
+ " 4: RC2-64, 5: RC2-128, 6: AES128,"
+ " 7: AES192, 8: AES256, or (f)orget it? "),
+ _("12345678f"))) {
+ case 1:
+ str_replace (&SmimeCryptAlg, "des");
+ break;
+ case 2:
+ str_replace (&SmimeCryptAlg, "des3");
+ break;
+ case 3:
+ str_replace (&SmimeCryptAlg, "rc2-40");
+ break;
+ case 4:
+ str_replace (&SmimeCryptAlg, "rc2-64");
+ break;
+ case 5:
+ str_replace (&SmimeCryptAlg, "rc2-128");
+ break;
+ case 6:
+ str_replace (&SmimeCryptAlg, "aes128");
+ break;
+ case 7:
+ str_replace (&SmimeCryptAlg, "aes192");
+ break;
+ case 8:
+ str_replace (&SmimeCryptAlg, "aes256");
+ break;
+ case 9: /* forget it */
+ break;
+ }
+ break;
+
+ case 2: /* (s)ign */
+
+ if (!SmimeDefaultKey)
+ mutt_message (_("Can't sign: No key specified. Use Sign As."));
+
+ else {
+ msg->security |= SIGN;
+ msg->security &= ~ENCRYPT;
+ }
+ break;
+
+ case 4: /* sign (a)s */
+
+ if ((p = smime_ask_for_key (_("Sign as: "), NULL, 0))) {
+ str_replace (&SmimeDefaultKey, p);
+
+ msg->security |= SIGN;