[PATCH pinentry 0/4] Disable echo when entering passphrase

Damien Goutte-Gattat dgouttegattat at incenp.org
Sat Aug 4 23:24:07 CEST 2018


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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gnupg-devel/attachments/20180804/c9145104/attachment-0001.sig>


More information about the Gnupg-devel mailing list