Commit 135622ee authored by Kevin J. McCarthy's avatar Kevin J. McCarthy

Rewrite S/MIME key searching. Add purpose checking.

Model the smime.c searching off of classic pgp searching.  Create
smime_get_key_by_hash()/addr()/str() functions that use a single
smime_get_candidates() function to search the index.

Use the new smime_keys generated purpose flag in the index to filter by
KEYFLAG_CANENCRYPT and KEYFLAG_CANSIGN.  Old style indices fall back to
all-inclusive behavior.
parent c9d72b85
This diff is collapsed.
......@@ -22,9 +22,18 @@
#include "mutt_crypt.h"
typedef struct smime_key {
char *email;
char *hash;
char *label;
char *issuer;
char trust; /* i=Invalid r=revoked e=expired u=unverified v=verified t=trusted */
int flags;
struct smime_key *next;
} smime_key_t;
void smime_free_key (smime_key_t **);
void smime_void_passphrase (void);
int smime_valid_passphrase (void);
......@@ -48,7 +57,7 @@ char* smime_get_field_from_db (char *, char *, short, short);
void smime_getkeys (ENVELOPE *);
char* smime_ask_for_key (char *, char *, short);
smime_key_t *smime_ask_for_key(char *, short, short);
char *smime_findKeys (ADDRESS *adrlist, int oppenc_mode);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment