code |= SEND_POSTPONED_FCC;
}
else if (((WithCrypto & APPLICATION_PGP) != 0) &&
- ((mutt_str_strncmp("Pgp:", np->data, 4) == 0) /* this is generated
- * by old neomutt versions
- */
- || (mutt_str_strncmp("X-Mutt-PGP:", np->data, 11) == 0)))
+ /* this is generated by old neomutt versions */
+ (mutt_str_startswith(np->data, "Pgp:", CASE_MATCH) ||
+ /* this is the new way */
+ mutt_str_startswith(np->data, "X-Mutt-PGP:", CASE_MATCH)))
{
hdr->security = mutt_parse_crypt_hdr(strchr(np->data, ':') + 1, 1, APPLICATION_PGP);
hdr->security |= APPLICATION_PGP;
}
else if (((WithCrypto & APPLICATION_SMIME) != 0) &&
- (mutt_str_strncmp("X-Mutt-SMIME:", np->data, 13) == 0))
+ mutt_str_startswith(np->data, "X-Mutt-SMIME:", CASE_MATCH))
{
hdr->security = mutt_parse_crypt_hdr(strchr(np->data, ':') + 1, 1, APPLICATION_SMIME);
hdr->security |= APPLICATION_SMIME;
}
#ifdef MIXMASTER
- else if (mutt_str_strncmp("X-Mutt-Mix:", np->data, 11) == 0)
+ else if (mutt_str_startswith(np->data, "X-Mutt-Mix:", CASE_MATCH))
{
mutt_list_free(&hdr->chain);