Bug 407111 - EWS compose Emails with S/MIME signature certificates with wrong Content-Transfer-Encoding: 7Bit instead of base64
Summary: EWS compose Emails with S/MIME signature certificates with wrong Content-Tra...
Status: REPORTED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: EWS Resource (other bugs)
Version First Reported In: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-30 20:24 UTC by themroc
Modified: 2019-04-30 20:24 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
diff between local and server version of sent Email (392.94 KB, image/png)
2019-04-30 20:24 UTC, themroc
Details

Note You need to log in before you can comment on or make changes to this bug.
Description themroc 2019-04-30 20:24:32 UTC
Created attachment 119756 [details]
diff between local and server version of sent Email

EWS compose/send Mails with S/MIME signature certificates with wrong Content-Transfer-Encoding: 7Bit instead of base64


When I send a signed e-mail with S / MIME signing certificates, the certificate will not be recognized by any other mail client, including Kmail on other machines.
An invalid signature is always displayed.
Outlook indicates, that the message content was changed after creating the signed mail and therefore the signature can not be verified.

In addition, only on the computer from where I have sent the mail in Kmail with the EWS resource in the sent folder the signature is displayed as valid.

On another computer with the same EWS resource, the sent mail in the sent folder will be displayed as invalid.

This means, however, that Outlook is right and the message content was changed later when it was sent.

And indeed, the message source text on both machines in the sent folder is not identical.

On the computer from where I sent, will keep the original written e-mail. On the other computer, the sent e-mail is downloaded from the server.

Comparing the two different e-mail source texts, there is only one relevant difference:

< Content-Transfer-Encoding: 7Bit
---
> Content-Transfer-Encoding: base64


The really sent version has this line:
> Content-Transfer-Encoding: base64


I then came up with the idea to force kmail to switch to the "Content-Transfer-Encoding: base64" when writing the mail.
By adding special characters in the message text I reached it.
Then the version sent in Kmail will no longer be different from the version sent to the server. Both have "Content-Transfer-Encoding: base64".

And then the signature is displayed as valid in all other mail programs and in kmail on other computers!

I have test this on Kubuntu 18.10 and Kubuntu 19.04

E.g for Kubuntu 19.04:

Operating System: Kubuntu 19.04
KDE Plasma Version: 5.15.4
KDE Frameworks Version: 5.56.0
Qt Version: 5.12.2
Kernel Version: 5.0.0-13-generic
OS Type: 64-bit