Mailing List Archive

[PATCH pinentry 0/4] Disable echo when entering passphrase
Hi GnuPG folks,

The following patchset attempts to implement the feature requested
by Daniel Kahn Gillmor in [1], that is allowing the user to
completely hide the passphrase they're about to enter (not even
displaying masking characters) by pressing the backspace key first.

This is done for the curses, Gtk+, Qt, and TQt pinentries. There
doesn't seem to be an easy way to do it with the FLTK, EFL, or
Gnome3 libraries. I didn't look at the Emacs and w32 pinentries.

There are some differences between the implementations:

* Only the curses variant has an explicit indicator that echoing
is disabled (it displays "[no echo]"); the Gtk+, Qt, and TQt
variants simply display an empty text box.

* In both the Gtk+ and Qt pinentries, once echoing has been
disabled the passphrase may still be displayed by clicking the
"Show/Hide" button (Gtk+) or the "Show passphrase" checkbox (Qt).
But if the user wants to hide the passphrase again, in the Gtk+
pinentry the widget will switch back to no echo, whereas in the
Qt pinentry it will return to echoing masking characters.

[1] https://dev.gnupg.org/T3428

Damien Goutte-Gattat (4):
curses: Disable echoing if backspace is pressed first.
gtk: Disable echoing if backspace is pressed first.
qt: Disable echoing if backspace is pressed first.
tqt: Disable echoing if backspace is pressed first.

gtk+-2/pinentry-gtk-2.c | 18 ++++++++++++++++++
pinentry/pinentry-curses.c | 36 ++++++++++++++++++++++++++----------
qt/Makefile.am | 9 +++++----
qt/pinentrydialog.cpp | 18 +++++++++++++++++-
qt/pinentrydialog.h | 7 +++++--
qt/pinlineedit.cpp | 36 ++++++++++++++++++++++++++++++++++++
qt/pinlineedit.h | 38 ++++++++++++++++++++++++++++++++++++++
tqt/pinentrydialog.cpp | 14 +++++++++++++-
tqt/pinentrydialog.h | 2 ++
tqt/secqlineedit.cpp | 2 ++
tqt/secqlineedit.h | 1 +
11 files changed, 163 insertions(+), 18 deletions(-)
create mode 100644 qt/pinlineedit.cpp
create mode 100644 qt/pinlineedit.h

--
2.14.4
Re: [PATCH pinentry 0/4] Disable echo when entering passphrase [ In reply to ]
Hi GnuPG folks,

On 08/04/2018 10:24 PM, Damien Goutte-Gattat via Gnupg-devel wrote:
> Damien Goutte-Gattat (4):
> curses: Disable echoing if backspace is pressed first.
> gtk: Disable echoing if backspace is pressed first.
> qt: Disable echoing if backspace is pressed first.
> tqt: Disable echoing if backspace is pressed first.

Given that the feature was requested on the bug tracker, that the idea
received Werner's approval at the time, and that no one complained about
the implementation in the past 10 days, I intend to apply the patchset
to the master branch of pinentry by tomorrow.

Thanks to Andre and "deloptes" for the green light regarding the Qt and
TQt variants.

Cheers,

Damien