]> asedeno.scripts.mit.edu Git - PuTTY.git/commit - Recipe
Unix Pageant: implement GUI passphrase prompting.
authorSimon Tatham <anakin@pobox.com>
Wed, 13 May 2015 12:55:08 +0000 (13:55 +0100)
committerSimon Tatham <anakin@pobox.com>
Wed, 13 May 2015 14:34:03 +0000 (15:34 +0100)
commit75b7ba26d3437dc0c89446f1e8d3dd6edb05e1af
tree0f220d7a6c10425896536f5d8e8c1b4becc84619
parent460c45dd235fae180256c9606df865066f8a791c
Unix Pageant: implement GUI passphrase prompting.

I've written my own analogue of OpenSSH's ssh-askpass. At the moment,
it's contained inside Pageant proper, though it could easily be
compiled into a standalone binary as well or instead.

Unlike OpenSSH's version, I don't use a GTK edit box; instead I just
process key events myself and append them to a buffer. The big
advantage of doing this is that I can arrange for ^W and ^U to
function as they do in terminal line editing, i.e. delete a word or
delete the whole line.

^W in particular is really valuable when typing a multiple-word
passphrase unseen. If you feel yourself making the kind of typo in
which you're not sure if you pressed six keys or just five, you can
hit ^W and restart just that word, without either having to go right
back to the beginning or carry on and see if you feel lucky.

A delete-word function would of course be an information leak in even
an obscured edit box (displaying a blob per character), so instead I
give a visual acknowledgment of keypresses by a more ad-hoc means: I
display three lights in the box, and every meaningful keypress turns
off the currently active one and instead turns on a randomly selected
one of the others. (So the lit light doesn't even indicate _mod 3_ how
many keys have been pressed.)
Recipe
unix/gtkask.c [new file with mode: 0644]
unix/uxpgnt.c