Revision 333 src/rfc2015.c
| rfc2015.c (revision 333) | ||
|---|---|---|
| 396 | 396 |
/* We could have a signature nested within multipart/mixed so |
| 397 | 397 |
* recurse to find it. |
| 398 | 398 |
*/ |
| 399 |
if (!g_strcasecmp (mimeinfo->content_type, "multipart/mixed")) {
|
|
| 399 |
if (!g_ascii_strcasecmp (mimeinfo->content_type, "multipart/mixed")) {
|
|
| 400 | 400 |
for (partinfo = mimeinfo->children; partinfo != NULL; |
| 401 | 401 |
partinfo = partinfo->next) {
|
| 402 | 402 |
signedinfo = rfc2015_find_signature (partinfo); |
| ... | ... | |
| 406 | 406 |
} |
| 407 | 407 |
return NULL; |
| 408 | 408 |
} |
| 409 |
if (g_strcasecmp (mimeinfo->content_type, "multipart/signed")) |
|
| 409 |
if (g_ascii_strcasecmp (mimeinfo->content_type, "multipart/signed"))
|
|
| 410 | 410 |
return NULL; |
| 411 | 411 |
|
| 412 | 412 |
debug_print ("** multipart/signed encountered\n");
|
| ... | ... | |
| 414 | 414 |
/* check that we have at least 2 parts of the correct type */ |
| 415 | 415 |
for (partinfo = mimeinfo->children; |
| 416 | 416 |
partinfo != NULL; partinfo = partinfo->next) {
|
| 417 |
if (++n > 1 && !g_strcasecmp (partinfo->content_type, |
|
| 418 |
"application/pgp-signature"))
|
|
| 417 |
if (++n > 1 && !g_ascii_strcasecmp (partinfo->content_type,
|
|
| 418 |
"application/pgp-signature"))
|
|
| 419 | 419 |
break; |
| 420 | 420 |
} |
| 421 | 421 |
|
| ... | ... | |
| 457 | 457 |
{
|
| 458 | 458 |
if (!mimeinfo || mimeinfo->mime_type != MIME_MULTIPART) |
| 459 | 459 |
return 0; |
| 460 |
if (g_strcasecmp (mimeinfo->content_type, "multipart/encrypted")) |
|
| 460 |
if (g_ascii_strcasecmp (mimeinfo->content_type, "multipart/encrypted"))
|
|
| 461 | 461 |
return 0; |
| 462 | 462 |
/* fixme: we should check the protocol parameter */ |
| 463 | 463 |
return 1; |
| ... | ... | |
| 566 | 566 |
if (!partinfo || !partinfo->next) {
|
| 567 | 567 |
DECRYPTION_ABORT(); |
| 568 | 568 |
} |
| 569 |
if (!g_strcasecmp (partinfo->content_type, "application/pgp-encrypted")) {
|
|
| 569 |
if (!g_ascii_strcasecmp (partinfo->content_type, |
|
| 570 |
"application/pgp-encrypted")) {
|
|
| 570 | 571 |
/* Fixme: check that the version is 1 */ |
| 571 | 572 |
ver_ok = 1; |
| 572 | 573 |
} |
| 573 | 574 |
partinfo = partinfo->next; |
| 574 | 575 |
if (ver_ok && |
| 575 |
!g_strcasecmp (partinfo->content_type, "application/octet-stream")) {
|
|
| 576 |
!g_ascii_strcasecmp (partinfo->content_type, |
|
| 577 |
"application/octet-stream")) {
|
|
| 576 | 578 |
if (partinfo->next) |
| 577 | 579 |
g_warning ("oops: pgp_encrypted with more than 2 parts");
|
| 578 | 580 |
} |
Also available in: Unified diff