Encrypted messages are not shown

Bug #293146 reported by hoarak
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Kopete
Fix Released
Medium
kdenetwork (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: kopete-cryptography

kopete with the cryptography plugin does not decrypt incoming messages which are encryptet with my key. I've selected the correct key in the configuration. in fact it does not react to the messages at all. all keys are valid and trusted. this occurs with messages coming from the same version of kopete/cryptography-plugin as well as with messages coming from the 'old' kde3 version with the build in cryptography-plugin.
encryption and signing of outgoing messages works.

Distribution: Kubuntu 8.10 (Intrepid)
kopete-cryptography: 1.3.0-kde4.1.2-0ubuntu1
kopete: 4:4.1.2-0ubuntu4
gnupg: 1.4.9-3ubuntu1

Revision history for this message
Jens (jensl) wrote :

Same for me.

Own messages that are crypted before sending do not show on the sender side, too.

Revision history for this message
Charles Connell (charles-connells) wrote :

Hi, I'm one of the authors of the cryptography plugin.

I think I know what your problem is. I have been able to get a fresh install of Kubuntu 8.10 working with these steps:

1 - ensure that the package gnupg-agent is installed
2 - in a terminal, run the command 'gpg'. Since this is probably the first time you have run it, it will create the configuration files you need. Exit gpg with Ctrl+C.
3 - Log out of KDE and log back in again.
4 - Run Kopete and try to send a signed message (or try to recieve an encrypted message). It should prompt you for your password and then work correctly.

Please tell me if this works.
Thank you.

Revision history for this message
Jens (jensl) wrote :

Hi, thanks for your response.

I have just checked the steps you mentioned. For me, it is a gpg-agent related problem. Although everything (gpg + gpg-agent) is installed fine, the gpg-agent has not been started for my session. That is why kopete could not find the agent and fails silently.

Everything works like expected if I manually startup the agent, set the environment correctly and then start kopete.

So, beside the silent failure, it looks like a problem with gpg-agent here, that is not started within KDE after the user logs in. How should the agent been started in KDE normally? Has a new user to setup gpg-agent manually like stated at https://help.ubuntu.com/community/KMailGPGAgent#Configuring%20KDE%20to%20start%20gpg-agent%20on%20login?

Revision history for this message
Charles Connell (charles-connells) wrote :

Ubuntu's gnupg-agent package comes with a script located at /etc/X11/Xsession.d/90gpg-agent
This script runs whenever an X session starts and it tries to start gpg-agent. In a clean Kubuntu system, this appears to work correctly if the ~/.gnupg directory is populated with the correct configuration files (which is *not* the default situation). These config files are generated when gpg is run for the first time, not until then.

The link you provided appears that it will get gpg-agent going when you start your session, but in a very hackish way. It would be far easier to just run gpg and then restart your X session.

Revision history for this message
Jens (jensl) wrote :

In my case the gpg-agent specific config files have not been created with a fresh install of Kubuntu, as I copied my .gnupg directory to my home and then ran gpg the first time. Thanks a lot for the explanation how it should work normally, so I do not need the hack with the "autostart"-environment.

I think we can close this bug, as kopete-crypto works like expected when the gpg-agent is not misconfigured. Thanks again for your help.

Revision history for this message
Charles Connell (charles-connells) wrote :

I do think there is a bugsomewhere, since gpg-agent should just plain work after it is installed. I'll try to get that fixed.

Revision history for this message
hoarak (f-weik) wrote :

This does not solve the issue for me. There are gpg-config-files and gpg-agent is running, still i can't recieve encrypted messages.

Revision history for this message
Jens (jensl) wrote :

Is the gpg-agent environment set correctly in your shells?

Check "env | grep -i gpg" in one of your (KDE-)shells.

Revision history for this message
hoarak (f-weik) wrote :

$ env | grep -i gpg
GPG_AGENT_INFO=/tmp/gpg-zwNK62/S.gpg-agent:5800:1

seems correct (?)

Revision history for this message
Jens (jensl) wrote :

Looks correct. Just a guess: Do you have a pin-entry program installed?

Revision history for this message
hoarak (f-weik) wrote :

yes, i've got pinentry-qt4 installed, because gnupg-agent depends on a pinentry-package.
(http://packages.ubuntu.com/intrepid/gnupg-agent)

Revision history for this message
Kai Denker (kai-denker) wrote :

I can confirm this bug with

kopete 4:4.1.3-0ubuntu1~intrepid2 (i tried downgrading to 4:4.1.2-0ubuntu4 too)
kopete-cryptography 1.3.0-kde4.1.2-0ubuntu1
gnupg 1.4.9-3ubuntu1
gnupg-agent 2.0.9-3.1

Same problem: I can send encrypted messages, but I don't see any messages I got.

pinentry-qt4 is installed, "env | grep -i gpg" and ~/.gnupg/gpg-agent-info-HOSTNAME refer to the same socket. Therefore I think, gnupg-agent is configured correctly, but I'm not sure, of course. ;)

Any ideas what to try next?

Revision history for this message
Charles Connell (charles-connells) wrote :

Kai: your problem is likely that gpg-agent is not running. Check if it is running with "ps -e | grep gpg" and see if gpg-agent is listed in the results. Please tell me the results so I can make sure I know the full extent of this bug.

Thanks.

Revision history for this message
Kai Denker (kai-denker) wrote :

$ ps -e | grep gpg
 6496 ? 00:00:00 gpg-agent
 6638 ? 00:00:00 kgpg

It IS running. :-/

Regards,
Kai

Revision history for this message
Charles Connell (charles-connells) wrote :

Perhaps pinentry is not launching correctly? Try

echo "test" | gpg -s

to see if it gpg-agent uses pinentry to prompt your for your password.

Revision history for this message
Kai Denker (kai-denker) wrote :

Good (or bad?) news: It works. Pinentry starts and does its job.

I can also use gpg with kontact/kmail and I'm prompted for the pass if needed.

Any other ideas?

Regards,
Kai

Revision history for this message
Jens (jensl) wrote :

We are mixing two bugs here:

1.) Nothing works. You cannot send any encrypted (and/or signed) messages.
2.) You can send encrypted (and/or) signed messages, but you "receive" a encrypted (and/or signed) messages, nothing happens. You do not even notice, you got a message.

Solutions:

1) Mostly this is a gpg-agent related misconfiguration. You have to be sure, everything works correctly (see other comments here)

2) The second one is a nasty upstream bug. It is currently investigated (and hopefully solved soon) over at fedora: https://bugzilla.redhat.com/show_bug.cgi?id=473412

To summarize this: kopete-cryptography has never work correctly since KDE 4.0. The corresponding upstream bugs are:

http://bugs.kde.org/show_bug.cgi?id=166673
http://bugs.kde.org/show_bug.cgi?id=177302

At the moment it looks like kopete-cryptography _and_ kopete have to be patched so solve that issue.

HTH and I made no mistakes in that short summary here. Please see the bugzilla entry for details.

Revision history for this message
Rich Johnson (nixternal) wrote :

Confirming due to comment and upstream reports. Added link to upstream report.

Changed in kopete-cryptography:
status: New → Confirmed
Changed in kopete:
status: Unknown → New
Changed in kopete:
status: New → Fix Released
Revision history for this message
Jonathan Thomas (echidnaman) wrote :

Fix released to the development version of Kubuntu 9.10 (and also to the KDE 4.2.3 PPA packages)

affects: kopete-cryptography (Ubuntu) → kdenetwork (Ubuntu)
Changed in kdenetwork (Ubuntu):
status: Confirmed → Fix Released
Changed in kopete:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.