return rv;
}
-int mutt_autocrypt_process_gossip_header(struct Email *hdr, struct Envelope *env)
+int mutt_autocrypt_process_gossip_header(struct Email *hdr, struct Envelope *prot_headers)
{
+ struct Envelope *env;
struct AutocryptHeader *ac_hdr;
struct timeval now;
struct AutocryptPeer *peer = NULL;
if (mutt_autocrypt_init(0))
return -1;
- if (!hdr || !hdr->content || !env)
+ if (!hdr || !hdr->env || !prot_headers)
return 0;
+ env = hdr->env;
+
struct Address *from = TAILQ_FIRST(&env->from);
if (!from)
return 0;
mutt_addrlist_copy(&recips, &env->reply_to, false);
mutt_autocrypt_db_normalize_addrlist(&recips);
- for (ac_hdr = env->autocrypt_gossip; ac_hdr; ac_hdr = ac_hdr->next)
+ for (ac_hdr = prot_headers->autocrypt_gossip; ac_hdr; ac_hdr = ac_hdr->next)
{
if (ac_hdr->invalid)
continue;
int mutt_autocrypt_init (int);
void mutt_autocrypt_cleanup (void);
int mutt_autocrypt_process_autocrypt_header (struct Email *hdr, struct Envelope *env);
-int mutt_autocrypt_process_gossip_header (struct Email *hdr, struct Envelope *env);
+int mutt_autocrypt_process_gossip_header (struct Email *hdr, struct Envelope *prot_headers);
enum AutocryptRec mutt_autocrypt_ui_recommendation (struct Email *hdr, char **keylist);
int mutt_autocrypt_set_sign_as_default_key (struct Email *hdr);
int mutt_autocrypt_write_autocrypt_header (struct Envelope *env, FILE *fp);
#ifdef USE_AUTOCRYPT
if (C_Autocrypt && (e->security & SEC_ENCRYPT) && prot_headers && prot_headers->autocrypt_gossip)
{
- mutt_autocrypt_process_gossip_header(e, e->env);
+ mutt_autocrypt_process_gossip_header(e, prot_headers);
}
#endif
}