Line 0
Link Here
|
|
|
1 |
diff -u -r3.13 recvattach.c |
2 |
--- recvattach.c 12 Apr 2004 20:33:33 -0000 3.13 |
3 |
+++ recvattach.c 30 Aug 2004 20:26:30 -0000 |
4 |
@@ -913,18 +913,33 @@ |
5 |
mx_close_message (&msg); |
6 |
return; |
7 |
} |
8 |
- if ((WithCrypto & APPLICATION_SMIME) && hdr->security & APPLICATION_SMIME) |
9 |
+ if ((WithCrypto & APPLICATION_SMIME) && (hdr->security & APPLICATION_SMIME)) |
10 |
{ |
11 |
if (hdr->env) |
12 |
crypt_smime_getkeys (hdr->env); |
13 |
|
14 |
if (mutt_is_application_smime(hdr->content)) |
15 |
+ { |
16 |
secured = ! crypt_smime_decrypt_mime (msg->fp, &fp, |
17 |
hdr->content, &cur); |
18 |
+ |
19 |
+ /* S/MIME nesting */ |
20 |
+ if ((mutt_is_application_smime (cur) & SMIMEOPAQUE)) |
21 |
+ { |
22 |
+ BODY *_cur = cur; |
23 |
+ FILE *_fp = fp; |
24 |
+ |
25 |
+ fp = NULL; cur = NULL; |
26 |
+ secured = !crypt_smime_decrypt_mime (_fp, &fp, _cur, &cur); |
27 |
+ |
28 |
+ mutt_free_body (&_cur); |
29 |
+ safe_fclose (&_fp); |
30 |
+ } |
31 |
+ } |
32 |
else |
33 |
need_secured = 0; |
34 |
} |
35 |
- if ((WithCrypto & APPLICATION_PGP) && hdr->security & APPLICATION_PGP) |
36 |
+ if ((WithCrypto & APPLICATION_PGP) && (hdr->security & APPLICATION_PGP)) |
37 |
{ |
38 |
if (mutt_is_multipart_encrypted(hdr->content)) |
39 |
secured = !crypt_pgp_decrypt_mime (msg->fp, &fp, hdr->content, &cur); |