<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>S/MIME: Rarely signature failure if adding attachment</title> 
  <pubDate>Fri, 10 Apr 2026 09:35:37 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/12430</link> 
  <atom:link rel="self" type="application/rss+xml" title="S/MIME: Rarely signature failure if adding attachment" href="https://bugs.horde.org/ticket/12430/rss" /> 
  <description>S/MIME: Rarely signature failure if adding attachment</description> 
 
   
   
  <item> 
   <title>Hello!

Atm we search for the reason why... but we can see</title> 
   <description>Hello!

Atm we search for the reason why... but we can see this failure:

If one of our users is adding an attachment to a s/mime signed mail the signature got broken (this is only the case if he adds an attachment!).

If you look at the source of the mail you see the problem:

Right near the end of the signed base64 part there is a newline. For example it looks like this:

&lt;&lt;snip&gt;&gt;
[...]
JayliE7ts/PZyJ+457ZjNrOEavIdp5g+bmJc+kSbhSTLH2aNmrXCV7OYlh7Xwy+3s9uZX6zQ1CwQ
eJgT4auOKTQZ13fPXNf18hig10ldbveKfdDo7lhlXCSUYl0hPuLnaunlz7/K/i0sUShebd3jn9Jk

Q7hJ05ghz2EeSYT4Om+5p2PXQDhZsHWWxR55J7hWsA2pkEDlPGzYQoDusyC6Bt5qBsIBeIlXCJjZ
guUoAAq5mwh2mfBaTJzmFmhr0M1SuMcDMCO68uL5fj9iZiKRBEvrHmc77DSsIZR7wxR1Y23YYm10
[...]
&lt;&lt;snapp&gt;&gt;

So if I delete the newline the mail is ok, signature valid.

(strange, isn&#039;t it? maybe a invalid character somehow in the users identity profile... we are searching...)</description> 
   <pubDate>Fri, 05 Jul 2013 08:50:32 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/12430#t79142</link> 
  </item> 
   
  <item> 
   <title>This sounds like something added by another system in the ma</title> 
   <description>This sounds like something added by another system in the mailing chain.  This isn&#039;t something IMP would do.  And if so - this would be an error in PHP, since we don&#039;t generate the S/MIME data ourselves (it is done via the openssl_pkcs7_sign method).</description> 
   <pubDate>Mon, 15 Jul 2013 18:05:00 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/12430#t79308</link> 
  </item> 
   
  <item> 
   <title>Hi Michael ,

&gt; This sounds like something added by anothe</title> 
   <description>Hi Michael ,

&gt; This sounds like something added by another system in the mailing 
&gt; chain.  This isn&#039;t something IMP would do.  And if so - this would be 
&gt; an error in PHP, since we don&#039;t generate the S/MIME data ourselves 
&gt; (it is done via the openssl_pkcs7_sign method).

Ok, I see. Meanwhile I got the feedback that the user deleted his IMP identity and created a new one from scratch. After that the problem got solved.

I would say we could close this ticket as invalid/solved. If I ever know what exactely caused the problem I would leafe a note here. Maybe (just maybe) we could do something in IMP/Horde to not get such a strange openssl_pkcs7_sign behaviour.

Thanks!</description> 
   <pubDate>Tue, 16 Jul 2013 11:56:54 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/12430#t79345</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
