Bug 341490

Summary: KMail2 4.14.3 cannot attach public keys when using GnuPG 2.1.0
Product: [Applications] kmail2 Reporter: Samir Nassar <samir>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED UPSTREAM    
Severity: major CC: aheinecke, montel, samir
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Bug Depends on:    
Bug Blocks: 341501    
Attachments: Screenshot of error message

Description Samir Nassar 2014-12-02 14:34:19 UTC
In attempting to attach a public key from the keychain KMail2 4.14.3 fails with an error message.

Reproducible: Always

Steps to Reproduce:
1. Open a email composer window
2. Click the Attach menu item
3. Select "Attach public key"
4. Choose a public key to attach
5. Click "OK"

Actual Results:  
After a while, several minutes, a window opens with the following text: "An error occurred while trying to export the key from the backend: Input/output error"

Expected Results:  
A public key should be attached.
Comment 1 Samir Nassar 2014-12-02 14:35:14 UTC
Created attachment 89807 [details]
Screenshot of error message
Comment 2 Laurent Montel 2014-12-02 20:26:50 UTC
I don't have gpg-2.1.0 on my computer but I will try to install it and look at it
Comment 3 Andre Heinecke 2014-12-03 10:25:28 UTC
I can't reproduce this with current gnupg master. 

Maybe this is a manifestation of:
https://bugs.gnupg.org/gnupg/issue1774

Do you have your public keyring in .kbx format?
Do you have more then one key in your public keyring?

(I'm Still using Kmail 4.13.3 but I doubt that the key access code has changed since then)

I could try to reproduce this with gnupg 2.1.0
Comment 4 Samir Nassar 2014-12-03 11:09:11 UTC
I do. On upgrading to GnuPG 2.1.0 I exported my public keys, private keys and trustdb, deleted .gnupg, and imported cleanly.

$ pacman -Si gnupg
Repository     : core
Name           : gnupg
Version        : 2.1.0-6
Description    : Complete and free implementation of the OpenPGP standard
Architecture   : x86_64
URL            : http://www.gnupg.org/
Licenses       : GPL
Groups         : None
Provides       : dirmngr  gnupg2=2.1.0
Depends On     : npth  libgpg-error  libgcrypt  libksba  libassuan  pinentry  bzip2  readline
Optional Deps  : libldap: gpg2keys_ldap
                 libusb-compat: scdaemon
Conflicts With : dirmngr  gnupg2
Replaces       : dirmngr  gnupg2
Download Size  : 1490.64 KiB
Installed Size : 5916.00 KiB
Packager       : Gaetan Bisson <bisson@archlinux.org>
Build Date     : Fri 28 Nov 2014 08:46:53 PM CET
Validated By   : MD5 Sum  SHA256 Sum  Signature
Comment 5 Samir Nassar 2014-12-21 00:10:37 UTC
This bug is fixed with with GnuPG 2.1.1 and https://bugs.kde.org/show_bug.cgi?id=341501.