return key;
}
-static struct SmimeKey *smime_get_candidates(char *search, short public)
+static struct SmimeKey *smime_get_candidates(char *search, bool public)
{
char index_file[PATH_MAX];
char buf[LONG_STRING];
* Returns the first matching key record, without prompting or checking of
* abilities or trust.
*/
-static struct SmimeKey *smime_get_key_by_hash(char *hash, short public)
+static struct SmimeKey *smime_get_key_by_hash(char *hash, bool public)
{
struct SmimeKey *match = NULL;
struct SmimeKey *results = smime_get_candidates(hash, public);
}
static struct SmimeKey *smime_get_key_by_addr(char *mailbox, short abilities,
- short public, short may_ask)
+ bool public, bool may_ask)
{
struct SmimeKey *results = NULL, *result = NULL;
struct SmimeKey *matches = NULL;
return return_key;
}
-static struct SmimeKey *smime_get_key_by_str(char *str, short abilities, short public)
+static struct SmimeKey *smime_get_key_by_str(char *str, short abilities, bool public)
{
struct SmimeKey *results = NULL, *result = NULL;
struct SmimeKey *matches = NULL;
return return_key;
}
-static struct SmimeKey *smime_ask_for_key(char *prompt, short abilities, short public)
+static struct SmimeKey *smime_ask_for_key(char *prompt, short abilities, bool public)
{
struct SmimeKey *key = NULL;
char resp[SHORT_STRING];
{
char *k = NULL;
- struct SmimeKey *key = smime_get_key_by_addr(mailbox, KEYFLAG_CANENCRYPT, 0, 1);
+ struct SmimeKey *key = smime_get_key_by_addr(mailbox, KEYFLAG_CANENCRYPT, false, true);
if (!key)
{
char buf[STRING];
snprintf(buf, sizeof(buf), _("Enter keyID for %s: "), mailbox);
- key = smime_ask_for_key(buf, KEYFLAG_CANENCRYPT, 0);
+ key = smime_ask_for_key(buf, KEYFLAG_CANENCRYPT, false);
}
if (key)
{
q = p;
- key = smime_get_key_by_addr(q->mailbox, KEYFLAG_CANENCRYPT, 1, !oppenc_mode);
+ key = smime_get_key_by_addr(q->mailbox, KEYFLAG_CANENCRYPT, true, !oppenc_mode);
if (!key && !oppenc_mode)
{
char buf[LONG_STRING];
snprintf(buf, sizeof(buf), _("Enter keyID for %s: "), q->mailbox);
- key = smime_ask_for_key(buf, KEYFLAG_CANENCRYPT, 1);
+ key = smime_ask_for_key(buf, KEYFLAG_CANENCRYPT, true);
}
if (!key)
{
switch (choices[choice - 1])
{
case 'a': /* sign (a)s */
- key = smime_ask_for_key(_("Sign as: "), KEYFLAG_CANSIGN, 0);
+ key = smime_ask_for_key(_("Sign as: "), KEYFLAG_CANSIGN, false);
if (key)
{
mutt_str_replace(&SmimeSignAs, key->hash);