Bug 354098 - Does not ask for password and only works with empty password keys
Summary: Does not ask for password and only works with empty password keys
Status: RESOLVED FIXED
Alias: None
Product: kleopatra
Classification: Applications
Component: general (show other bugs)
Version: git master
Platform: Gentoo Packages Linux
: NOR grave
Target Milestone: ---
Assignee: Andre Heinecke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-19 17:21 UTC by Frank
Modified: 2017-11-18 16:47 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 Frank 2015-10-19 17:21:18 UTC
This bug is on yesterdays git-master stage. I have as little as possble kde4 stuff installed, this is basically a gentoo-KF5 only install.

Reproducible: Always

Steps to Reproduce:
1. Create gpg key with password
2. Try to use it in kleopatra or via kmail
3. Create gpg key without password and try the same

Actual Results:  
It should ask for a password to open the key, but it just does not. On the Kleopatra interface it simply does nothing, when used via kmail no prompt, but an immediate wrong password error appears.

Expected Results:  
It should ask for the password to decrypt. It works currently only for non encrypted keys
Comment 1 Andre Heinecke 2015-10-19 17:25:58 UTC
This sounds a bit like a problem in your setup or pinentry. This behavior would occur if pinentry can't be launched from the environment kleopatra runs in.

In the same environment where you run Kleopatra (e.g. same LD_LIBARARY_PATH, same PATH variables) can you run:
 echo foo | gpg -s 

And are asked for your passphrase?

Second question:
Which pinentry are you using? Did you cahange pinentry in your gpg-agent.conf (using pinentry-program option)

What does:
pinentry  --version

output?
Comment 2 Frank 2015-10-19 17:43:10 UTC
Pinentry --version on konsole prompt:

pinentry-curses (pinentry) 0.9.5
Copyright (C) 2015 g10 Code GmbH
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

echo foo | gpg -s:
gpg: enabled debug flags: memstat

Sie benötigen eine Passphrase, um den geheimen Schlüssel zu entsperren.
Benutzer: "xxxxx"
2048-Bit DSA Schlüssel, ID xxxx

gpg-agent[575]: enabled debug flags: assuan
gpg: Problem mit dem Agenten: Unpassender IOCTL (I/O-Control) für das Gerät
gpg: no default secret key: Verarbeitung wurde abgebrochen
gpg: signing failed: Verarbeitung wurde abgebrochen
random usage: poolsize=600 mixed=0 polls=0/0 added=0/0
              outmix=0 getlvl1=0/0 getlvl2=0/0
secmem usage: 0/65536 bytes in 0 blocks

If I repeat it without a password set on the key, then it does not give an error but gibberish appears in the screen

echo foo | gpg -s 
gpg: enabled debug flags: memstat
������!ȸ5�k��ӗ����▒�T�����suır0��2�D▒�8`��;▒�

eix pinentry:
I] app-crypt/pinentry
     Available versions:  0.9.0 ~0.9.0-r3 0.9.5 ~0.9.6-r4 ~0.9.6-r5 **9999[1] {caps clipboard emacs gnome-keyring gtk ncurses qt4 qt5 static}
     Installed versions:  0.9.5(02:02:18 16.10.2015)(gtk ncurses -caps -clipboard -emacs -gnome-keyring -qt4 -static)
     Homepage:            http://gnupg.org/aegypten2/index.html
     Description:         Collection of simple PIN or passphrase entry dialogs which utilize the Assuan protocol
----

I see that 0.9.5 stable does not support qt5 use flag - could that be the problem? I will increase it to testing or git-master and retry.
Comment 3 Frank 2015-10-19 17:49:05 UTC
Bumped to testing, same bug:
gpg: Problem mit dem Agenten: Unpassender IOCTL (I/O-Control) für das Gerät

 app-crypt/pinentry
     Available versions:  0.9.0 (~)0.9.0-r3 0.9.5 (~)0.9.6-r4 (~)0.9.6-r5 **9999[1] {caps clipboard emacs gnome-keyring gtk ncurses qt4 qt5 static}
     Installed versions:  0.9.6-r5(19:47:06 19.10.2015)(gtk ncurses qt5 -caps -emacs -gnome-keyring -qt4 -static)
Comment 4 Frank 2017-11-18 16:47:43 UTC
Also here, after retrying after 8 months the bug seems to be gone now. Must have been fixed together with other general bugfixes.