[dev] getBodyPart for S/MIME decryption
jnaegele at grierforensics.com
jnaegele at grierforensics.com
Thu Mar 23 20:51:47 UTC 2017
Quoting Michael J Rubinsky <mrubinsk at horde.org>:
> Quoting jnaegele at grierforensics.com:
>
>> Hi folks,
>>
>> I'm unable to decrypt S/MIME encrypted messages using a new hosted
>> IMAP server with Horde 5.2.14 and IMP 6.2.18. I've narrowed down the
>> issue to my IMAP server not responding at all to the
>> Horde_Imap_Client_Fetch_Query requesting the headers and body in
>> imp/lib/Contents.php, getBodyPart(). The Mime ID is just '1' so it's
>> not using rfc822. I don't get a response when
>> "$query->mimeHeader($id, ...)" is set. Because I don't get any
>> response, the full message text sent to openssl_pkcs7_decrypt is an
>> empty string, hence the inability to decrypt.
>>
>> This is possibly an issue with my IMAP server, however neither
>> Outlook nor Thunderbird have any issue decrypting these messages,
>> and my IMAP provider is widely used. Is this something I can
>> potentially fix on the IMP side?
>
> Please enable IMAP server debugging in imp/config/backends[.local].php
> and reproduce the issue.
>
>> Thanks,
>>
>> Joe Naegele
>> Grier Forensics
>>
>> --
>> dev mailing list
>> Frequently Asked Questions: http://wiki.horde.org/FAQ
>> To unsubscribe, mail: dev-unsubscribe at lists.horde.org
>
>
>
> --
> mike
> The Horde Project
> http://www.horde.org
> https://www.facebook.com/hordeproject
> https://www.twitter.com/hordeproject
Perfect, that narrowed it down:
C: 4 UID FETCH 22 (BODY[HEADER])
S: * 8 FETCH (FLAGS (\Seen) UID 22 BODY[HEADER] {914}
S: [LITERAL DATA: 914 bytes]
S: )
S: 4 OK Success
>> Command 4 took 0.0551 seconds.
C: 5 UID FETCH 22 (BODY.PEEK[1])
S: * 8 FETCH (UID 22 BODY[1] {9156}
S: [LITERAL DATA: 9156 bytes]
S: )
S: 5 OK Success
>> Command 5 took 0.0522 seconds.
C: 6 UID FETCH 22 (BODY.PEEK[1] BODY.PEEK[1.MIME])
S: 6 OK Success
>> Command 6 took 0.0507 seconds.
My IMAP server responds with OK but doesn't return any data in
response to the MIME fetch.
Is this a compatibility issue? I'm not well-versed in IMAP.
--
Joe Naegele
Grier Forensics
More information about the dev
mailing list