1 | --- mutt-1.5.20/crypt.c Sat Feb 23 03:12:43 2013 +0000 |
---|
2 | +++ mutt-1.5.20/crypt.c Mon Mar 04 16:43:09 2013 -0800 |
---|
3 | @@ -766,6 +766,29 @@ |
---|
4 | |
---|
5 | |
---|
6 | /* |
---|
7 | + * This routine addresses inconsistencies in the protocol of |
---|
8 | + * "multipart/signed" messages and the Content-Type of their |
---|
9 | + * parts. |
---|
10 | + */ |
---|
11 | + |
---|
12 | +int mutt_xless_strcasecmp(const char *a, const char *b) |
---|
13 | +{ |
---|
14 | + const char* aPrime; |
---|
15 | + const char* bPrime; |
---|
16 | + if (strcasestr(NONULL(a), "x-") == a) |
---|
17 | + aPrime = a + 2; |
---|
18 | + else |
---|
19 | + aPrime = a; |
---|
20 | + if (strcasestr(NONULL(b), "x-") == b) |
---|
21 | + bPrime = b + 2; |
---|
22 | + else |
---|
23 | + bPrime = b; |
---|
24 | + |
---|
25 | + return strcasecmp(NONULL(aPrime), NONULL(bPrime)); |
---|
26 | +} |
---|
27 | + |
---|
28 | + |
---|
29 | +/* |
---|
30 | * This routine verifies a "multipart/signed" body. |
---|
31 | */ |
---|
32 | |
---|
33 | @@ -808,7 +831,7 @@ |
---|
34 | /* consistency check */ |
---|
35 | |
---|
36 | if (!(a && a->next && a->next->type == protocol_major && |
---|
37 | - !mutt_strcasecmp (a->next->subtype, protocol_minor))) |
---|
38 | + !mutt_xless_strcasecmp (a->next->subtype, protocol_minor))) |
---|
39 | { |
---|
40 | state_attach_puts (_("[-- Error: " |
---|
41 | "Inconsistent multipart/signed structure! --]\n\n"), |
---|