622_unnamed1 KBDownload
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Feed All Stories
All Stories
All Stories
Jun 3 2015
Jun 3 2015
I was using PuTTY 6.4 on Windows 7 64 bit.
Jun 1 2015
Jun 1 2015
neal updated subscribers of T1976: loopback pinentry mode asks passphrase twice on symmetric encryption.
neal added a comment to T1976: loopback pinentry mode asks passphrase twice on symmetric encryption.
opt.passphrase_repeat defaults to 1 (g10/gpg.c:2152).
I see two solutions:
- If we are in symmetric mode, then we set opt.passphrase_repeat to 0.
- We introduce a new mode in passphrase_to_dek_ext: create new key, but don't
prompt the user to confirm the password.
The former is acceptable if we never need to repeat the passphrase for
operations on symmetric keys, which I think is the case. I've attached a patch
that implements this behavior.
neal added a comment to T1976: loopback pinentry mode asks passphrase twice on symmetric encryption.
neal added a comment to T1976: loopback pinentry mode asks passphrase twice on symmetric encryption.
Some initial findings:
gpg2 calls gpg-agent as follows:
GET_PASSPHRASE --data --repeat=1 -- S5E0584FFBBEA6E79 X X Enter+passphrase%0A"
So the problem is with gpg2.
Here's the backtrace in gpg2:
#0 agent_get_passphrase at ../../../gnupg/g10/call-agent.c:1376
#1 passphrase_get at ../../../gnupg/g10/passphrase.c:312
#2 passphrase_to_dek_ext at ../../../gnupg/g10/passphrase.c:537
#3 passphrase_to_dek at ../../../gnupg/g10/passphrase.c:594
#4 encrypt_simple at ../../../gnupg/g10/encrypt.c:217
#5 encrypt_symmetric at ../../../gnupg/g10/encrypt.c:53
#6 main 0x000000000040cbc5 in
passphrase_to_dek_ext calls passphrase_get and passes it the repeat
mode, which it reads from opt.passphrase_repeat.
neal added projects to T1994: gpg2 --pinentry-mode=loopback without allow-loopback-pinentry: gnupg, Bug Report.
dkg: Thanks for pointing that out. I need to fix my git config on this machine.
I just tried running pinentry-curses under screen on debian in an
xfce4-terminal. (You can run it directly from the command line by running
pinentry-curses and then typing 'getpin'.) I wasn't able to reproduce what I
saw in your screenshot. Also, I saw the proper symbolic characters to paint the
widget's borders (see screenshot).
I've make some changes to pinentry-curses recently. Perhaps you can try that
version (git). If you get the same results, does hitting control-L correctly
repaint the screen?
What program were you running? Perhaps it messed with the terminal settings.
thanks, neal. I see this committed as eab03a469d82018e53380f26390594f47bb4c5c8,
with a committer of "us <us@chu.huenfield.org>" -- since huenfield.org is
registered to you, i assume that's you? I'm used to seeing your commits as
coming from "Neal H. Walfield <neal@gnu.org>"
May 31 2015
May 31 2015
After chatting with Werner, we decided to apply the patch. If Andre has any
objections, he is still welcome to voice them.
I don't know much about Qt / KDE so I have a difficult time evaluating this
patch. However, given that this problem has persisted for a long time (since
2010); that Fedora has been distributing this patch; and that Felix still sees
this problem without the patch, but doesn't see it with the patch, I'm inclined
to apply it.
I've added Andre to the nosy list. He has much more experience with Qt and KDE
than I do. If he also thinks it is reasonable to apply the patch, then I'll
apply it.
P.S. Feel free to add me to any bug that you think I could help on.
on the debian bug report, Felix Geyer notes:
This issue is still present.
Tested on current Debian unstable [0.9.2-1] with KDE4 and Ubuntu 15.04 with
KDE Plasma 5.
The patch from the Fedora package fixes the problem.
I note that this isn't yet applied upstream as of
55ea554b2020b1e7b0996bd9f7bb38c8af2b03f3 -- maybe this can be considered before
the next release?
(neal, i'm adding you to the "nosy list" here and assigning this ticket to you,
because of all your work on pinentry lately. I hope that's not overstepping any
boundaries! please let me know if you'd rather i didn't do that directly)
May 27 2015
May 27 2015
A user id is not designed to be unique. Thus you can't rely on it. It, is
convenient to use a user id but it is only a shortcut.
To see why gpg selects a certain key we need to see more information - in
particular the output of "gpg -k".
BTW, your delete example is missing the quotes around the user id. And 2.0.14
is pretty old.
May 26 2015
May 26 2015
By killing I meant sending SIGTERM (15) through the kill command.
But
"gpgconf --kill dirmngr" also does not kill the dirmngr. Is this problem not
reproducible for you?
kill -9 kills it of course.
How do you kill dirmngr? Using "gpgconf --kill dirmngr" or by sending a signal
- which one?
• werner changed Version from master to 2.1 on T1978: Dirmngr ldap CRL checks prevent dirmngr from terminating.
• aheinecke added a comment to T1838: Dirmngr ldap CRL checks leave zombie dirmngr_ldap processes (2.1.x).
Just to point this problem out again (still exists with current master of
course). The CRL checks during a normal start of kleopatra on my keyring leave
55 dirmngr zombies.
This problem is not really bad for me as I am using the attached Patch. Still
after 3 months I'd appreciate a reaction / review.
Can you let me know when you can take a look at this or was my assignment wrong
here? (If so please change it)
This is a pretty major bug imho that would leave our application servers
(without manual intervention) if we would deploy 2.1 in our company. As such it
is blocking our adoption of 2.1.
I would appreciate some kind of reaction / confirmation on this issue.
May 25 2015
May 25 2015
Here is a possible fix.
I write this for current master branch and tested.
Then, it is ported to 1.4. It builds and it seems working well.
Please test it out.
I was wrong in T1675 (gniibe on May 15 2015, 06:38 AM / Roundup) saying multiple races.
Provided write(2) is atomic, the race is only here for creating trustdb.gpg and
checking if it's there.
• gniibe added a project to T1675: gpg --verify has race conditions when used concurrently: Restricted Project.
May 24 2015
May 24 2015
I removed the stub keys for the last two, that is why they are listed as "ssb#"
instead of "ssb>".
If the expected behavior is newest key is always preferred, than that's fine and
easy to work around with default-key, although it would be nice to exclude
unusable keys.
May 22 2015
May 22 2015
No, I don't think so. You created a newer subkey on a smartcard and thus gpg
assumes that you want to use that key.
It should actually ask you to insert that card - doesn't it do that? There is
an open bug which might prevent that gpg-agent asks for the correct card - is
that the case? The missing "Card serial no. = nnnn kkkkkkkk" may indicate that.
Did you ever used the cards with that version of gpg and did you run a "gpg
--card-status"?
We implemented support for the GTK_IM_MODULE ebvar before 2007 thus I think this
is more likely a regression. In fact I recall that Marcus once showed me a
problem with his SCIM installation while using Pinentry.
• werner renamed T1991: pinentry-w32 needs to adjust button sizes from Password insecure warning dialog has buttons too small for text to pinentry-w32 needs to adjust button sizes.
Oh well, resizing the buttons to a new fixed size would be a job in the source
of 10 minutes or so. However, this makes an very ugly Pinentry for every day's
use (i.e. entering a passphrase for an existing key). So, sorry, I won't take
that patch.
With native Windows code I mean native Windows code for GUIs instead of relying
on MFC or whatever is the latest GUI framework MS uses. This is similar to xlib
programm vs. GTK+ programming
Anyway, thanks for looking into this. I will retitle the bug to keep it open.
Maybe eventually someone starts to hack on it.
• werner added projects to T1991: pinentry-w32 needs to adjust button sizes: Feature Request, pinentry.
• werner removed projects from T1991: pinentry-w32 needs to adjust button sizes: Bug Report, gpg4win.
617_unnamed2 KBDownload
618_pinentry.piz38 KBDownload
Well, here's my fix. Using this neat little program I downloaded called
Resource Hacker, I edited the buttons on the dialog box so that they would
be big enough to display the messages needed. Realizing that pinentry.exe
and pinentry-w32.exe were identical files (checking them in a hex editor
with file comparison function showed them to be exactly the same), I just
copied my edited version of pinentry.exe and renamed the copy as
pinentry-w32.exe. I have put both of them in a zip file called
pinentry.zip, and have attached this zip file to this email. Feel free to
distribute this on the official GPG4Win website. Note that the file name of
the attachment is "piz" not "zip", so before you extract its contents (for
use, or posting on your website) you will need to rename it from "piz" back
to "zip". I had to rename it from "zip" to "piz" because otherwise Gmail's
mail server scans inside the zip file and then for blocks it because it
detects exe files (and exe files are a format that can potentially harbor
malware). Even though this has no malware (as you can see by scanning it
with a virus scanner), Google's mail server takes extra precautions by
refusing to allow sending of executable files or even archive files that
contain executable files.
616_unnamed1 KBDownload
As far as I know, GPG4Win is a compiling/linking of GPG to be Windows
compatible, which means that the code was already altered to work with
Windows. Therefore native Windows code is already in use in the GPG4Win
variant of GPG. Therefore it should work correctly in every respect in
Windows (including correctly sized buttons).
It was already on my own todo list (i.e. ticked in the mail folder). Thanks for
adding it to the tracker.
• werner added a project to T1778: t-exechelp-posix get_max_fds returns MAX_INT32 rather than something sensible: Restricted Project.
• werner added a comment to T1778: t-exechelp-posix get_max_fds returns MAX_INT32 rather than something sensible.
The change is in gnupg 2.1.4.
This requires native Windows code to resize a button in a dialog. This is to
much work for something which is basically a debug tool. I have called several
years for help on building a good native Windows tool (without MFC and such) to
no avail.
Feel free to send a working patch to gnupg-devel@
Even so, this is a bug. As such, it should be fixed.
615_unnamed1 KBDownload
aixtools added a comment to T1778: t-exechelp-posix get_max_fds returns MAX_INT32 rather than something sensible.
it was a while back, and i removed an archive with my notes, so will need
to repeat when i have more time.
On May 11, 2015 8:22 PM, "Werner Koch via BTS" <gnupg@bugs.g10code.com>
wrote:
aixtools added a comment to T1778: t-exechelp-posix get_max_fds returns MAX_INT32 rather than something sensible.
614_unnamed1 KBDownload
May 21 2015
May 21 2015
bjmgeek added projects to T1992: pinentry in text mode is skewed when using PuTTY and GNU screen: pinentry, Debian, Bug Report.
bjmgeek set Version to 0.9.0 on T1992: pinentry in text mode is skewed when using PuTTY and GNU screen.
That might be possible. However outstarting gpg-agent won't be implemented for 1.4.
• werner renamed T1986: gpg-1 should fallback to ~/.gnupg/S.gpg-agent from gpg-1 cannot locate gpg-agent-2.1 to gpg-1 should fallback to ~/.gnupg/S.gpg-agent.
You are using the very simple native WIndows Pinentry. This is more a debug
tool than a real solution. I guess you installed the vanilla version of gpg4win
which comes without any GUI dialog except for this Pinentry. Please install at
least the light version of the installer.
May 20 2015
May 20 2015
Animedude5555 added projects to T1991: pinentry-w32 needs to adjust button sizes: gpg4win, Bug Report.
May 19 2015
May 19 2015
So what should we do about this? Do we need to keep gtksecentry.* in sync with
upstream's gtkentry somehow?
ueno added a comment to T1976: loopback pinentry mode asks passphrase twice on symmetric encryption.
Regarding custom pinentry program, doesn't that mean to require a user to edit
gpg-agent.conf to enable/disable the custom pinentry program?
Yes, pinentry-emacs could implement the fallback mechanism to pinentry-gtk (i.e.
by checking if Emacs is running), but I think it is too much.
Perhaps gpg could have a --pinentry-program option too and pass the value to
gpg-agent?
• gniibe added a comment to T1976: loopback pinentry mode asks passphrase twice on symmetric encryption.
BTW, I believe it would be better for Emacs to implement its own pinentry UI,
not using loopback mode.
I mean, something similar situation where we have emacsclient as an external editor.
If we have pinentry by Emacs, people will be able to invoke gpg on remote
machine and access local secret key by local gpg-agent which asks passphrase to
local Emacs's pinentry.
• gniibe added a comment to T1976: loopback pinentry mode asks passphrase twice on symmetric encryption.
Currently, I don't know the solution. Here is some information, while I'd
understand your implied request.
With use-agent, the behavior is same between 1.4 and 2.1. 2.0 and 2.1 has
similar behavior (although it doesn't support loopback mode).
In 1.4, with cpr_enabled, it stops reading repeated input, which makes sense.
• gniibe added a comment to T1422: Improve misleading message when trying to decrypt a file without the public key available.
Fixed in b3fd30451a5464b124b0296afbc341cb98b3977c.
May 18 2015
May 18 2015
I also added support for control-h (backspace) and control-l.
I don't have a definite authoritative list of escape codes, but those seem to be
the most common ones with use cases in pinentry.
On Mon, May 18, 2015 at 10:37:08AM +0000, Werner Koch via BTS wrote:
Please start gpg-agent manually (gpgconf --launch gpg-agent) and set a fixed
GPG_AGENT_INFO envvar in your login script.
Exactly this thing I reported as a workaound. I'd like to see working gpg
without setting the GPG_AGENT_INFO variable before.
• werner removed a project from T1976: loopback pinentry mode asks passphrase twice on symmetric encryption: Feature Request.
• werner raised the priority of T1976: loopback pinentry mode asks passphrase twice on symmetric encryption from Wishlist to Normal.
Please start gpg-agent manually (gpgconf --launch gpg-agent) and set a fixed
GPG_AGENT_INFO envvar in your login script.
That is a very old gnupg version - You better update GnuPG to 2.0.27 and
Libgcrypt to 1.6.3.
It uses GTK features not availabale on my version. With some replacement macros
you should be abale to aplly it anyway.
611_568.eml17 KBDownload
If I disable the secure entry widget (see patch) and start pinentry as follows:
GTK_IM_MODULE=scim gtk+-2/pinentry-gtk-2
then I'm able to enter text in the same way as with gedit.
This means that the problem is not due to grabing the keyboard, but most likely
due to our secure entry widget. Note: the secure entry widget is based on a
2004 copy of GtkEntry so it's not surprising that it doesn't support some modern
features.
I tested your pkg-config patch on Debian Jessie and everything still compiles
fine. I've applied the pkg-config patch. If gentoo is now using a newer
version of this patch, please let me know. Thanks.
• gniibe added a comment to T1422: Improve misleading message when trying to decrypt a file without the public key available.
Now, we have a patch to fix in the Debian bug tracker.
• gniibe added a comment to T1947: [smartcard] Decryption fails and breaks smartcard reader (Alcor Micro).
It was fixed in 2.1.4.
• gniibe removed a project from T1947: [smartcard] Decryption fails and breaks smartcard reader (Alcor Micro): Restricted Project.
May 16 2015
May 16 2015
neal added a comment to T1391: pinentry-curses does not work when caller does not own the tty (for example, when su'ed).
I'm having trouble reproducing this issue. When I su, root doesn't suddenly own
the terminal:
$ su - Password: # ls -l $(tty) crw------- 1 neal tty 136, 4 May 16 22:52 /dev/pts/4 #
Can you provide a minimal example that illustrates the problem? Thanks. I
realize this issue is very old.
neal added a comment to T1982: pinentry-qt should fallback to curses if $DISPLAY is set but unavailable.
Fixed in edd9a88.
neal closed T1982: pinentry-qt should fallback to curses if $DISPLAY is set but unavailable as Resolved.
I added support for control-u, control-w and alt-backspace in d3c52a1. Do you
think there are any other useful escape codes?
This might also be due to our custom secure entry widget. See this bug report:
Thanks for the great minimal working example.
I tried to reproduce this and I could.
However, when I run
GTK_IM_MODULE=scim gedit
I can't enter any text either. I have to activate scim by pressing it's hotkey
(control-space). Then I can type as usual. pinentry grabs the keyboard to
prevent other applications from snooping the password. I guess this is
inhibiting scim/scim bridge from accessing the keyboard input.
This works for me with Werner's patch. Closing.


