fix gpg tty reading from /dev/console to support yubikey (issue #32)

This commit is contained in:
Trammell Hudson 2017-04-05 18:35:45 -04:00
parent a2e51a599c
commit 9d6c5c5da8
Failed to extract signature

View File

@ -1,6 +1,6 @@
diff -u --recursive ../clean/gnupg-1.4.21/configure gnupg-1.4.21/configure
--- ../clean/gnupg-1.4.21/configure 2016-08-17 09:20:25.000000000 -0400
+++ gnupg-1.4.21/configure 2017-04-05 17:40:53.746515377 -0400
+++ gnupg-1.4.21/configure 2017-04-05 17:59:31.785284325 -0400
@@ -17100,7 +17100,7 @@
_libusb_try_libs=`$LIBS $_usb_config --libs`
_libusb_try_cflags=`$LIBS $_usb_config --cflags`
@ -18,3 +18,16 @@ diff -u --recursive ../clean/gnupg-1.4.21/configure gnupg-1.4.21/configure
#include <usb.h>
int
main ()
diff -u --recursive ../clean/gnupg-1.4.21/util/ttyio.c gnupg-1.4.21/util/ttyio.c
--- ../clean/gnupg-1.4.21/util/ttyio.c 2016-04-22 03:30:18.000000000 -0400
+++ gnupg-1.4.21/util/ttyio.c 2017-04-05 18:33:05.000125354 -0400
@@ -183,7 +183,8 @@
#elif defined(__EMX__)
ttyfp = stdout; /* Fixme: replace by the real functions: see wklib */
#else
- ttyfp = batchmode? stderr : fopen( tty_get_ttyname (), "r+");
+ //ttyfp = batchmode? stderr : fopen( tty_get_ttyname (), "r+");
+ ttyfp = stderr;
if( !ttyfp ) {
ttyfp = stderr; /* Use stderr as fallback for log_error. */
initialized = 1; /* Make sure log_error won't try to init