6.0.0-alpha14
7/2/25

[#9426] Error in S/Mime Signing of messages
Summary Error in S/Mime Signing of messages
Queue Horde Framework Packages
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester hordetest (at) trash-mail (dot) com
Created 12/04/2010 (5324 days ago)
Due
Updated 12/21/2010 (5307 days ago)
Assigned 12/21/2010 (5307 days ago)
Resolved 12/21/2010 (5307 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
12/21/2010 09:55:35 PM Michael Slusarz Comment #5
State ⇒ Resolved
Reply to this comment
The problem is that openssl_pkcs7_sign() does not create canonical 
mime messages, thus Horde_Mime_Part::parseMessage() fails to detect 
the message header. I'm not sure what's the best way to fix it, 
maybe to make sure that the Horde_Mime_Part passed to 
Horde_Crypt_Smime doesn't use canonical line breaks and then adapt 
the message parsing?
openssl_pkcs7_sign() appears to be inconsistently using EOL strings 
internally.  So our only option is to convert/canonicalize after 
grabbing the data from it.
12/21/2010 09:54:25 PM Git Commit Comment #4 Reply to this comment
Changes have been made in Git for this ticket:

Bug #9426: Fix S/Mime signing
Workaround broken openssl_pkcs7_sign() - it outputs both \r\n and \n in
the same string.

http://git.horde.org/horde-git/-/commit/6e30cda864a9971d1231cf38026dc5bd93713288
12/21/2010 12:02:16 AM Jan Schneider Comment #3
Assigned to Michael Slusarz
State ⇒ Assigned
Version ⇒ Git master
Reply to this comment
The problem is that openssl_pkcs7_sign() does not create canonical 
mime messages, thus Horde_Mime_Part::parseMessage() fails to detect 
the message header. I'm not sure what's the best way to fix it, maybe 
to make sure that the Horde_Mime_Part passed to Horde_Crypt_Smime 
doesn't use canonical line breaks and then adapt the message parsing? 
I tried that by setting 'canonical' to true in signMIMEPart() but it 
didn't make a difference.
12/20/2010 11:46:20 PM Jan Schneider Comment #2
Queue ⇒ Horde Framework Packages
Version ⇒
Reply to this comment
Confirmed
12/04/2010 12:32:44 AM hordetest (at) trash-mail (dot) com Comment #1
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Error in S/Mime Signing of messages
Queue ⇒ IMP
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
Reply to this comment
Fatal error: Call to a member function setDescription() on a 
non-object in /horde/framework/Crypt/lib/Horde/Crypt/Smime.php on line 
252

Saved Queries