break;
struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
el_add_tagged(&el, Context, CUR_EMAIL, tag);
- crypt_extract_keys_from_messages(&el);
+ crypt_extract_keys_from_messages(Context->mailbox, &el);
emaillist_clear(&el);
menu->redraw = REDRAW_FULL;
break;
/**
* crypt_extract_keys_from_messages - Extract keys from a message
+ * @param m Mailbox
* @param el List of Emails to process
*
* The extracted keys will be added to the user's keyring.
*/
-void crypt_extract_keys_from_messages(struct EmailList *el)
+void crypt_extract_keys_from_messages(struct Mailbox *m, struct EmailList *el)
{
if (!WithCrypto)
return;
{
struct Email *e = en->email;
- mutt_parse_mime_message(Context->mailbox, e);
+ mutt_parse_mime_message(m, e);
if (e->security & SEC_ENCRYPT && !crypt_valid_passphrase(e->security))
{
mutt_file_fclose(&fp_out);
if (((WithCrypto & APPLICATION_PGP) != 0) && (e->security & APPLICATION_PGP))
{
- mutt_copy_message(fp_out, Context->mailbox, e,
- MUTT_CM_DECODE | MUTT_CM_CHARCONV, CH_NO_FLAGS);
+ mutt_copy_message(fp_out, m, e, MUTT_CM_DECODE | MUTT_CM_CHARCONV, CH_NO_FLAGS);
fflush(fp_out);
mutt_endwin();
{
if (e->security & SEC_ENCRYPT)
{
- mutt_copy_message(fp_out, Context->mailbox, e,
- MUTT_CM_NOHEADER | MUTT_CM_DECODE_CRYPT | MUTT_CM_DECODE_SMIME,
+ mutt_copy_message(fp_out, m, e, MUTT_CM_NOHEADER | MUTT_CM_DECODE_CRYPT | MUTT_CM_DECODE_SMIME,
CH_NO_FLAGS);
}
else
- mutt_copy_message(fp_out, Context->mailbox, e, MUTT_CM_NO_FLAGS, CH_NO_FLAGS);
+ mutt_copy_message(fp_out, m, e, MUTT_CM_NO_FLAGS, CH_NO_FLAGS);
fflush(fp_out);
char *mbox = NULL;
struct Envelope;
struct Email;
struct EmailList;
+struct Mailbox;
struct State;
/* These Config Variables are only used in ncrypt/crypt.c */
#define KEYFLAG_ABILITIES (KEYFLAG_CANSIGN | KEYFLAG_CANENCRYPT | KEYFLAG_PREFER_ENCRYPTION | KEYFLAG_PREFER_SIGNING)
/* crypt.c */
-void crypt_extract_keys_from_messages(struct EmailList *el);
+void crypt_extract_keys_from_messages(struct Mailbox *m, struct EmailList *el);
void crypt_forget_passphrase(void);
int crypt_get_keys(struct Email *e, char **keylist, bool oppenc_mode);
void crypt_opportunistic_encrypt(struct Email *e);
CHECK_MODE(IsEmail(extra));
struct EmailList el = STAILQ_HEAD_INITIALIZER(el);
el_add_email(&el, extra->email);
- crypt_extract_keys_from_messages(&el);
+ crypt_extract_keys_from_messages(Context->mailbox, &el);
emaillist_clear(&el);
pager_menu->redraw = REDRAW_FULL;
break;