Hey,

this is just a first idea to change pinentry-curses for dumb terminals:


============ BEGIN
commit 0207ab455a36e6e49017e2a8e44b31a3200f5c14
Author: Ingo Krabbe <ikrabbe....@gmail.com>
Date:   Wed Jul 9 18:50:11 2014 +0000

    added \n for the dialog default sequence
    
    I use very plain dumb terminals from plan9 to connect to my servers and I 
still want to use gpg with pinentry to unlock my keys.
    
    This is just a first quick patch to (re) enable the Enter key to finish the 
dialog, as my terminal posts \n not \r for an enter key.
    
    Actually that is no terminal but a plain text connection over the network, 
which is much less interpreted and much simpler than using full tty emulations.
    
    Maybe I will replace the dialog with a plain no-echo dialog, when the 
terminal is "dumb"

diff --git a/pinentry/pinentry-curses.c b/pinentry/pinentry-curses.c
index 58da255..2f02780 100644
--- a/pinentry/pinentry-curses.c
+++ b/pinentry/pinentry-curses.c
@@ -888,7 +888,7 @@ dialog_run (pinentry_t pinentry, const char *tty_name, 
const char *tty_type)
          done = -2;
          break;
 
-       case '\r':
+       case '\r': case '\n':
          switch (diag.pos)
            {
            case DIALOG_POS_PIN:
====================== END

cheers

ingo krabbe



_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-users

Reply via email to