[imp] Encrypted/Signed Smime not displayed

Philipp Faeustlin philipp.faeustlin at uni-hohenheim.de
Fri Nov 24 16:08:01 UTC 2017


Hi there,

I have encrypted and signed smime mails out of a Groupwise Client that 
are not displayed correctly. The signed message is only displayed as 
attachment "smime.p7m" File.

These mails have an encrypted outer section:
---
Content-Type: application/x-pkcs7-mime; name=smime.p7m
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
---
Within the encrypted part, there is a signed part with the message as:
---
Content-Type: application/pkcs7-mime
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7m";
---

I think the ASN1 decoding of the decrypted "smime.p7m" file probably 
doesn't work correct.

Because if the signed part is declared as
"Content-Type: application/x-pkcs7-mime; name=smime.p7m; 
smime-type=signed-data", with the smime-type field signed-data, the 
message is displayed.

I researched the code and found a one line hack/work-around to display 
the messages correctly.

I added to the [webdir]/imp/lib/Mime/Viewer/Smime.php the following on 
line 234:
$new_part->setContentTypeParameter('smime-type', 'signed-data');

With this line added my problem is solved, but I'm not sure if this is 
the right solution to this problem. Or the other way round, I can't say 
what problem this line can cause.
Any ideas of a better solution?

Best regards
-- 
Philipp Fäustlin



More information about the imp mailing list