Bug 368113 - invalid signature when using vcard
Summary: invalid signature when using vcard
Status: RESOLVED WORKSFORME
Alias: None
Product: kmail2
Classification: Applications
Component: crypto (show other bugs)
Version: 5.1.3
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-01 18:15 UTC by Johannes Maier
Modified: 2022-11-29 05:18 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Maier 2016-09-01 18:15:42 UTC
I'm using S/MIME Encryption in Kmail. That works.
But when using S/MIME Signature with a vcard Attachment, this does not work anymore. Seems that vcard is added to the already signed mail. Therefore the signature is wrong then?

Reproducible: Always
Comment 1 tprotopopescu 2017-01-06 11:13:05 UTC
I have something similar, so may be related, however, I am using openPGP instead.

Setting the option of adding 'own vcard' to an identity makes a signature for an email come up with 'not enough information to check signature validity'.

To reproduce:

1. Create an identity, with a signing key etc.
2. In the 'advanced' tab for configuring the identity select 'add own vcard' and fill in the card if needed.
3. Send a signed email with that identity, which will have the vcard automatically attached.
4. In the sent mail folder, or in inbox, the email displays 'not enough information to check signature validity', even though it is signed with my own key.

Without automatically attaching a vcard per step 2, but adding one manually through 'new message -> attach -> attach -> attach vcards... -> select vcard from addressbooks', the signature is recognised as valid. Attaching a file also works fine.

Reproducilbe: always.

Kmail 5.4.0
Framework 5.29.0
Plasma 5.8.4
Qt 5.7.1
gpg (GnuPG) 2.1.16
libgcrypt 1.7.3
Comment 2 jansen 2017-02-03 12:34:20 UTC
I have the same problem Johannes Maier reported.

I sent a signed mail to a different mail account of mine which I have also configured in the same KMail installation.

For the mail stored in my "Sent items" folder the signature is reported valid.

For the mail in the inbox of the receiving account the signature is reported invalid.

Indeed, the problem seems to be related to the vcard attachment, since I see a valid signature for both the sent and received mails if I disable the attachment of the vard.

But as far as I can tell the problem is not the addition of the vcard per se: the vcard is also included in the mail in my "sent mail" folder and - as stated above - there the signature is reported to be valid.

I have exported (saved) both mails to disk and diff´ed them.
There are some differences in the header, but those are to be expected and the headers are not signed anyway.

However, I also see a difference for the vcard text which is part of the signed payload:
The vcard in the mail retained in my "Sent items" folder has line endings consisting of "\r\n" ("carriage return" and "line feed": \x0D\x0A), while the mail in the inbox of the receiving account only has "\n" (\x0A) line endings in the vcard part.

Since two colleagues using Thunderbird and Emacs Mail respectively both get a report about an invalid signature either the mail server interferes and removes the "\r" characters or KMail itself removes them when sending the mail.
Comment 3 Justin Zobel 2022-10-30 00:37:31 UTC
Thank you for reporting this bug in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 4 Bug Janitor Service 2022-11-14 05:15:02 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Bug Janitor Service 2022-11-29 05:18:24 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!