[git] Pinentry - branch, master, updated. pinentry-0.9.7-47-gb945576

by Daniel Kahn Gillmor cvs at cvs.gnupg.org
Sat Nov 5 11:49:34 CET 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The standard pinentry collection".

The branch, master has been updated
       via  b945576fe906ffcd5bcc50b4322ef2f34d8fb89f (commit)
       via  aa5b7bb42d5324e6f5494faaf85b24c2e161f810 (commit)
       via  799116010a57aec9a86c5529388111d54aff3c55 (commit)
       via  f7b99ff5f7f78db45350308bf409ea4a9e94f161 (commit)
       via  d0fe54d592a8d2be6fc82b26290a644bb3629214 (commit)
       via  102832a2c1f3ffa432e2a169791611bb3ca13a04 (commit)
       via  784c4e0a3acace39a4a632bf443c794752297d54 (commit)
       via  93b4454f4fe4d97dd89efccd64dbdd02bd002f77 (commit)
       via  3be5b4fabaabf86f085b0b5303a1312abb7d0617 (commit)
       via  19c2110557d0504c1b406bde24e86cb5eb552fc7 (commit)
       via  96e3c5fcf210e971fe1ba66b9127ad51144fcc49 (commit)
      from  553af04cf9c103c2e2cd5085b0d5fb647a608d51 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b945576fe906ffcd5bcc50b4322ef2f34d8fb89f
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date:   Sat Nov 5 00:44:53 2016 -0400

    build: Avoid unnecessary dependency on gtk+-2 for GNOME3 development.
    
    * configure.ac: There is no reason to reject building the GNOME3
    pinentry if GTK+-2 development libraries are not present.  GNOME3 does
    not require GTK+-2.
    
    Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>

diff --git a/configure.ac b/configure.ac
index 1dfdf17..2a96ccd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -438,14 +438,13 @@ if test "$pinentry_gtk_2" != "no" -o "$pinentry_gnome_3" != "no"; then
 fi
 
 dnl check if the module gtk+-2.0 exists
-if test "$pinentry_gtk_2" != "no" -o "$pinentry_gnome_3" != "no"; then
+if test "$pinentry_gtk_2" != "no"; then
 	AC_MSG_CHECKING([for gtk+-2])
 	"${PKG_CONFIG}" --exists gtk+-2.0
 	if test $? -ne 0 ; then
 		AC_MSG_RESULT([no])
 		AC_MSG_WARN([pkg-config could not find the module gtk+-2.0])
 		pinentry_gtk_2=no
-		pinentry_gnome_3=no
 	else
 		AC_MSG_RESULT([yes])
 		AC_MSG_CHECKING([gtk+-2 version >= 2.4.0])
@@ -455,7 +454,6 @@ if test "$pinentry_gtk_2" != "no" -o "$pinentry_gnome_3" != "no"; then
 		if test $? -ne 0 ; then
 			AC_MSG_WARN([building GTK+-2 pinentry disabled])
 			pinentry_gtk_2=no
-			pinentry_gnome_3=no
 		else
 			GTK2CFLAGS=`"${PKG_CONFIG}" --cflags gtk+-2.0`
 			GTK2LIBS=`"${PKG_CONFIG}" --libs gtk+-2.0`
@@ -465,10 +463,6 @@ if test "$pinentry_gtk_2" != "no" -o "$pinentry_gnome_3" != "no"; then
 			then
 			  pinentry_gtk_2=yes
 			fi
-			if test "$pinentry_gnome_3" != "no"
-			then
-			  pinentry_gnome_3=yes
-			fi
 		fi
 	fi
 fi

commit aa5b7bb42d5324e6f5494faaf85b24c2e161f810
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date:   Sat Nov 5 00:25:12 2016 -0400

    all: Prefer https:// over http:// in source where possible.
    
    --
    This change cleans up as many internal web references as possible, to
    make them use https.  In some cases, the canonical references had
    slightly different URLs in addition to the change in schema.
    
    Sadly, git.savannah.gnu.org is still http-only.
    
    Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>

diff --git a/README b/README
index b80d466..33f0ab4 100644
--- a/README
+++ b/README
@@ -3,7 +3,7 @@ PIN Entry
 
 This is a collection of simple PIN or passphrase entry dialogs which
 utilize the Assuan protocol as described by the aegypten project; see
-http://www.gnupg.org/aegypten/ for details.
+https://www.gnupg.org/aegypten/ for details.
 
 There are programs for different toolkits available.  For all GUIs it
 is automatically detected which modules can be built, but it can also
diff --git a/autogen.sh b/autogen.sh
index 7effd56..37edfc6 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -422,7 +422,7 @@ if [ -d .git ]; then
     [ -z "${SILENT}" ] && cat <<EOF
 *** Activating trailing whitespace git pre-commit hook. ***
     For more information see this thread:
-      http://mail.gnome.org/archives/desktop-devel-list/2009-May/msg00084html
+      https://mail.gnome.org/archives/desktop-devel-list/2009-May/msg00084.html
     To deactivate this pre-commit hook again move .git/hooks/pre-commit
     and .git/hooks/pre-commit.sample out of the way.
 EOF
diff --git a/build-aux/compile b/build-aux/compile
index 531136b..52f8f94 100755
--- a/build-aux/compile
+++ b/build-aux/compile
@@ -17,7 +17,7 @@ scriptversion=2012-10-14.11; # UTC
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
diff --git a/build-aux/config.guess b/build-aux/config.guess
index dbfb978..7adf147 100755
--- a/build-aux/config.guess
+++ b/build-aux/config.guess
@@ -15,7 +15,7 @@ timestamp='2015-01-01'
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
diff --git a/build-aux/config.sub b/build-aux/config.sub
index 6d2e94c..0b2d816 100755
--- a/build-aux/config.sub
+++ b/build-aux/config.sub
@@ -15,7 +15,7 @@ timestamp='2015-01-01'
 # General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
diff --git a/build-aux/depcomp b/build-aux/depcomp
index 4ebd5b3..f0a474c 100755
--- a/build-aux/depcomp
+++ b/build-aux/depcomp
@@ -16,7 +16,7 @@ scriptversion=2013-05-30.07; # UTC
 # GNU General Public License for more details.
 
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
diff --git a/build-aux/gitlog-to-changelog b/build-aux/gitlog-to-changelog
index 5cf071f..81a0431 100755
--- a/build-aux/gitlog-to-changelog
+++ b/build-aux/gitlog-to-changelog
@@ -22,7 +22,7 @@ my $VERSION = '2012-01-24 15:58 (wk)'; # UTC
 # GNU General Public License for more details.
 
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 # Written by Jim Meyering
 # Custom bugs bred by Werner Koch
diff --git a/build-aux/mdate-sh b/build-aux/mdate-sh
index b3719cf..39f48bb 100755
--- a/build-aux/mdate-sh
+++ b/build-aux/mdate-sh
@@ -17,7 +17,7 @@ scriptversion=2010-08-21.06; # UTC
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
diff --git a/build-aux/missing b/build-aux/missing
index db98974..528c6c4 100755
--- a/build-aux/missing
+++ b/build-aux/missing
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Common wrapper for a few potentially missing GNU programs.
 
-scriptversion=2013-10-28.13; # UTC
+scriptversion=2016-11-05.04; # UTC
 
 # Copyright (C) 1996-2013 Free Software Foundation, Inc.
 # Originally written by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
@@ -17,7 +17,7 @@ scriptversion=2013-10-28.13; # UTC
 # GNU General Public License for more details.
 
 # You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
@@ -101,9 +101,9 @@ else
   exit $st
 fi
 
-perl_URL=http://www.perl.org/
-flex_URL=http://flex.sourceforge.net/
-gnu_software_URL=http://www.gnu.org/software
+perl_URL=https://www.perl.org/
+flex_URL=https://github.com/westes/flex
+gnu_software_URL=https://www.gnu.org/software
 
 program_details ()
 {
diff --git a/build-aux/texinfo.tex b/build-aux/texinfo.tex
index 5552e50..1e6de89 100644
--- a/build-aux/texinfo.tex
+++ b/build-aux/texinfo.tex
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2016-11-03.12}
+\def\texinfoversion{2016-11-05.00}
 %
 % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -21,7 +21,7 @@
 %
 % You should have received a copy of the GNU General Public License
 % along with this texinfo.tex file; see the file COPYING.  If not,
-% see <http://www.gnu.org/licenses/>.
+% see <https://www.gnu.org/licenses/>.
 %
 % As a special exception, when this file is read by TeX when processing
 % a Texinfo source document, you may use the result without
@@ -29,9 +29,9 @@
 %
 % Please try the latest version of texinfo.tex before submitting bug
 % reports; you can get the latest version from:
-%   http://www.gnu.org/software/texinfo/ (the Texinfo home page), or
+%   https://www.gnu.org/software/texinfo/ (the Texinfo home page), or
 %   ftp://tug.org/tex/texinfo.tex
-%     (and all CTAN mirrors, see http://www.ctan.org).
+%     (and all CTAN mirrors, see https://www.ctan.org).
 % The texinfo.tex in any given distribution could well be out
 % of date, so if that's what you're using, please check.
 %
@@ -55,7 +55,7 @@
 % extent.  You can get the existing language-specific files from the
 % full Texinfo distribution.
 %
-% The GNU Texinfo home page is http://www.gnu.org/software/texinfo.
+% The GNU Texinfo home page is https://www.gnu.org/software/texinfo.
 
 
 \message{Loading texinfo [version \texinfoversion]:}
@@ -1209,7 +1209,7 @@ where each line of input produces a line of output.}
 % for display in the outlines, and in other places.  Thus, we have to
 % double any backslashes.  Otherwise, a name like "\node" will be
 % interpreted as a newline (\n), followed by o, d, e.  Not good.
-% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html
+% https://mailman.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html
 % (and related messages, the final outcome is that it is up to the TeX
 % user to double the backslashes and otherwise make the string valid, so
 % that's what we do).
@@ -2560,7 +2560,7 @@ end
 % We use the free feym* fonts from the eurosym package by Henrik
 % Theiling, which support regular, slanted, bold and bold slanted (and
 % "outlined" (blackboard board, sort of) versions, which we don't need).
-% It is available from http://www.ctan.org/tex-archive/fonts/eurosym.
+% It is available from https://www.ctan.org/tex-archive/fonts/eurosym.
 %
 % Although only regular is the truly official Euro symbol, we ignore
 % that.  The Euro is designed to be slightly taller than the regular
diff --git a/configure.ac b/configure.ac
index 1620ebd..1dfdf17 100644
--- a/configure.ac
+++ b/configure.ac
@@ -42,7 +42,7 @@ m4_define([mym4_betastring],
 m4_define([mym4_isgit],m4_if(mym4_betastring,[],[no],[yes]))
 m4_define([mym4_full_version],[mym4_version[]mym4_betastring])
 
-AC_INIT([pinentry],[mym4_full_version], [http://bugs.gnupg.org])
+AC_INIT([pinentry],[mym4_full_version], [https://bugs.gnupg.org])
 
 AC_CONFIG_AUX_DIR([build-aux])
 AM_CONFIG_HEADER(config.h)
diff --git a/doc/texinfo.tex b/doc/texinfo.tex
index 919d85d..3f81058 100644
--- a/doc/texinfo.tex
+++ b/doc/texinfo.tex
@@ -3,7 +3,7 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2016-11-03.12}
+\def\texinfoversion{2016-11-05.00}
 %
 % Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -21,7 +21,7 @@
 %
 % You should have received a copy of the GNU General Public License
 % along with this texinfo.tex file; see the file COPYING.  If not, 
-% see <http://www.gnu.org/licenses/>.
+% see <https://www.gnu.org/licenses/>.
 %
 % As a special exception, when this file is read by TeX when processing
 % a Texinfo source document, you may use the result without
@@ -29,9 +29,9 @@
 %
 % Please try the latest version of texinfo.tex before submitting bug
 % reports; you can get the latest version from:
-%   http://www.gnu.org/software/texinfo/ (the Texinfo home page), or
+%   https://www.gnu.org/software/texinfo/ (the Texinfo home page), or
 %   ftp://tug.org/tex/texinfo.tex
-%     (and all CTAN mirrors, see http://www.ctan.org).
+%     (and all CTAN mirrors, see https://www.ctan.org).
 % The texinfo.tex in any given distribution could well be out
 % of date, so if that's what you're using, please check.
 %
@@ -55,7 +55,7 @@
 % extent.  You can get the existing language-specific files from the
 % full Texinfo distribution.
 %
-% The GNU Texinfo home page is http://www.gnu.org/software/texinfo.
+% The GNU Texinfo home page is https://www.gnu.org/software/texinfo.
 
 
 \message{Loading texinfo [version \texinfoversion]:}
@@ -1209,7 +1209,7 @@ where each line of input produces a line of output.}
 % for display in the outlines, and in other places.  Thus, we have to
 % double any backslashes.  Otherwise, a name like "\node" will be
 % interpreted as a newline (\n), followed by o, d, e.  Not good.
-% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html
+% https://mailman.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html
 % (and related messages, the final outcome is that it is up to the TeX
 % user to double the backslashes and otherwise make the string valid, so
 % that's what we do).
@@ -2560,7 +2560,7 @@ end
 % We use the free feym* fonts from the eurosym package by Henrik
 % Theiling, which support regular, slanted, bold and bold slanted (and
 % "outlined" (blackboard board, sort of) versions, which we don't need).
-% It is available from http://www.ctan.org/tex-archive/fonts/eurosym.
+% It is available from https://www.ctan.org/tex-archive/fonts/eurosym.
 % 
 % Although only regular is the truly official Euro symbol, we ignore
 % that.  The Euro is designed to be slightly taller than the regular
diff --git a/emacs/pinentry-emacs.c b/emacs/pinentry-emacs.c
index de4ca05..da96985 100644
--- a/emacs/pinentry-emacs.c
+++ b/emacs/pinentry-emacs.c
@@ -14,7 +14,7 @@
    General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, see <http://www.gnu.org/licenses/>.
+   along with this program; if not, see <https://www.gnu.org/licenses/>.
 */
 
 #ifdef HAVE_CONFIG_H
diff --git a/gtk+-2/pinentry-gtk-2.c b/gtk+-2/pinentry-gtk-2.c
index 9d29d90..a7ac91e 100644
--- a/gtk+-2/pinentry-gtk-2.c
+++ b/gtk+-2/pinentry-gtk-2.c
@@ -116,7 +116,7 @@ constrain_size (GtkWidget *win, GtkRequisition *req, gpointer data)
 /* Realize the window as transient if we grab the keyboard.  This
    makes the window a modal dialog to the root window, which helps the
    window manager.  See the following quote from:
-   http://standards.freedesktop.org/wm-spec/wm-spec-1.4.html#id2512420
+   https://standards.freedesktop.org/wm-spec/wm-spec-1.4.html#id2512420
 
    Implementing enhanced support for application transient windows
 
diff --git a/m4/pkg.m4 b/m4/pkg.m4
index e602e5b..5acff96 100644
--- a/m4/pkg.m4
+++ b/m4/pkg.m4
@@ -146,7 +146,7 @@ path to pkg-config.
 
 _PKG_TEXT
 
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
+To get pkg-config, see <https://pkg-config.freedesktop.org/>.])],
 		[$4])
 else
 	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
diff --git a/pinentry/argparse.c b/pinentry/argparse.c
index 4f586d4..f6c160c 100644
--- a/pinentry/argparse.c
+++ b/pinentry/argparse.c
@@ -26,7 +26,7 @@
  *
  * You should have received a copies of the GNU General Public License
  * and the GNU Lesser General Public License along with this program;
- * if not, see <http://www.gnu.org/licenses/>.
+ * if not, see <https://www.gnu.org/licenses/>.
  */
 
 /* This file may be used as part of GnuPG or standalone.  A GnuPG
@@ -1490,10 +1490,10 @@ strusage( int level )
     case 10:
 #if ARGPARSE_GPL_VERSION == 3
       p = ("License GPLv3+: GNU GPL version 3 or later "
-           "<http://gnu.org/licenses/gpl.html>");
+           "<https://www.gnu.org/licenses/gpl.html>");
 #else
       p = ("License GPLv2+: GNU GPL version 2 or later "
-           "<http://gnu.org/licenses/>");
+           "<https://www.gnu.org/licenses/>");
 #endif
       break;
     case 11: p = "foo"; break;
@@ -1515,7 +1515,7 @@ ARGPARSE_STR2(ARGPARSE_GPL_VERSION)
 "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n"
 "GNU General Public License for more details.\n\n"
 "You should have received a copy of the GNU General Public License\n"
-"along with this software.  If not, see <http://www.gnu.org/licenses/>.\n";
+"along with this software.  If not, see <https://www.gnu.org/licenses/>.\n";
       break;
     case 40: /* short and long usage */
     case 41: p = ""; break;
diff --git a/pinentry/argparse.h b/pinentry/argparse.h
index b4dc253..54d9c5b 100644
--- a/pinentry/argparse.h
+++ b/pinentry/argparse.h
@@ -25,7 +25,7 @@
  *
  * You should have received a copies of the GNU General Public License
  * and the GNU Lesser General Public License along with this program;
- * if not, see <http://www.gnu.org/licenses/>.
+ * if not, see <https://www.gnu.org/licenses/>.
  */
 
 #ifndef LIBJNLIB_ARGPARSE_H
diff --git a/pinentry/password-cache.c b/pinentry/password-cache.c
index c98c4c5..903c013 100644
--- a/pinentry/password-cache.c
+++ b/pinentry/password-cache.c
@@ -14,7 +14,7 @@
    General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, see <http://www.gnu.org/licenses/>.
+   along with this program; if not, see <https://www.gnu.org/licenses/>.
  */
 
 #ifdef HAVE_CONFIG_H
diff --git a/pinentry/password-cache.h b/pinentry/password-cache.h
index 0bc8788..77e82e1 100644
--- a/pinentry/password-cache.h
+++ b/pinentry/password-cache.h
@@ -14,7 +14,7 @@
    General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, see <http://www.gnu.org/licenses/>.
+   along with this program; if not, see <https://www.gnu.org/licenses/>.
  */
 
 #ifndef PASSWORD_CACHE_H
diff --git a/pinentry/pinentry-emacs.c b/pinentry/pinentry-emacs.c
index 9ced8da..df12f1b 100644
--- a/pinentry/pinentry-emacs.c
+++ b/pinentry/pinentry-emacs.c
@@ -14,7 +14,7 @@
    General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, see <http://www.gnu.org/licenses/>.
+   along with this program; if not, see <https://www.gnu.org/licenses/>.
 */
 
 #ifdef HAVE_CONFIG_H
diff --git a/pinentry/pinentry-emacs.h b/pinentry/pinentry-emacs.h
index 61d04cc..24dabb9 100644
--- a/pinentry/pinentry-emacs.h
+++ b/pinentry/pinentry-emacs.h
@@ -14,7 +14,7 @@
    General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, see <http://www.gnu.org/licenses/>.
+   along with this program; if not, see <https://www.gnu.org/licenses/>.
 */
 
 #ifndef PINENTRY_EMACS_H
diff --git a/pinentry/pinentry.c b/pinentry/pinentry.c
index d2f4229..0023ebe 100644
--- a/pinentry/pinentry.c
+++ b/pinentry/pinentry.c
@@ -14,7 +14,7 @@
    General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, see <http://www.gnu.org/licenses/>.
+   along with this program; if not, see <https://www.gnu.org/licenses/>.
  */
 
 #ifdef HAVE_CONFIG_H
diff --git a/pinentry/pinentry.h b/pinentry/pinentry.h
index c6e12e4..01fb373 100644
--- a/pinentry/pinentry.h
+++ b/pinentry/pinentry.h
@@ -14,7 +14,7 @@
    General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, see <http://www.gnu.org/licenses/>.
+   along with this program; if not, see <https://www.gnu.org/licenses/>.
  */
 
 #ifndef PINENTRY_H
diff --git a/tty/Makefile.am b/tty/Makefile.am
index e232473..7168342 100644
--- a/tty/Makefile.am
+++ b/tty/Makefile.am
@@ -14,7 +14,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, see <http://www.gnu.org/licenses/>.
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
 
 ## Process this file with automake to produce Makefile.in
 
diff --git a/tty/pinentry-tty.c b/tty/pinentry-tty.c
index 183b7a5..bd82fad 100644
--- a/tty/pinentry-tty.c
+++ b/tty/pinentry-tty.c
@@ -16,7 +16,7 @@
    General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, see <http://www.gnu.org/licenses/>.
+   along with this program; if not, see <https://www.gnu.org/licenses/>.
  */
 
 #ifdef HAVE_CONFIG_H

commit 799116010a57aec9a86c5529388111d54aff3c55
Author: Werner Koch <wk at gnupg.org>
Date:   Sat Nov 5 11:42:24 2016 +0100

    gnome3: Avoid using gnome and gcr symbol namespace.
    
    * gnome3/pinentry-gnome3.c (struct _gnome3_run): Rename to
    pe_gnome3_run_s.
    (_gcr_prompt_password_done): Rename to pe_gcr_prompt_password_done.
    (_gcr_prompt_confirm_done): Rename to pe_gcr_prompt_confirm_done.
    (_gcr_timeout_done): Rename to pe_gcr_timeout_done.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/gnome3/pinentry-gnome3.c b/gnome3/pinentry-gnome3.c
index c8d8fcf..afa95b7 100644
--- a/gnome3/pinentry-gnome3.c
+++ b/gnome3/pinentry-gnome3.c
@@ -44,6 +44,25 @@
 #  define VERSION
 #endif
 
+
+struct pe_gnome3_run_s {
+  pinentry_t pinentry;
+  GcrPrompt *prompt;
+  GMainLoop *main_loop;
+  int ret;
+  guint timeout_id;
+  int timed_out;
+};
+
+static void pe_gcr_prompt_password_done (GObject *source_object,
+                                         GAsyncResult *res, gpointer user_data);
+
+static void pe_gcr_prompt_confirm_done (GObject *source_object,
+                                        GAsyncResult *res, gpointer user_data);
+static gboolean pe_gcr_timeout_done (gpointer user_data);
+
+
+
 static gchar *
 pinentry_utf8_validate (gchar *text)
 {
@@ -69,23 +88,6 @@ pinentry_utf8_validate (gchar *text)
   return result;
 }
 
-struct _gnome3_run {
-  pinentry_t pinentry;
-  GcrPrompt *prompt;
-  GMainLoop *main_loop;
-  int ret;
-  guint timeout_id;
-  int timed_out;
-};
-
-static void
-_gcr_prompt_password_done (GObject *source_object, GAsyncResult *res, gpointer user_data);
-
-static void
-_gcr_prompt_confirm_done (GObject *source_object, GAsyncResult *res, gpointer user_data);
-
-static gboolean
-_gcr_timeout_done (gpointer user_data);
 
 static void
 _propagate_g_error_to_pinentry (pinentry_t pe, GError *error,
@@ -217,7 +219,7 @@ create_prompt (pinentry_t pe, int confirm)
 static int
 gnome3_cmd_handler (pinentry_t pe)
 {
-  struct _gnome3_run state;
+  struct pe_gnome3_run_s state;
 
   state.main_loop = g_main_loop_new (NULL, FALSE);
   if (!state.main_loop)
@@ -239,19 +241,22 @@ gnome3_cmd_handler (pinentry_t pe)
       return -1;
     }
   if (pe->pin)
-    gcr_prompt_password_async (state.prompt, NULL, _gcr_prompt_password_done,
+    gcr_prompt_password_async (state.prompt, NULL, pe_gcr_prompt_password_done,
                                &state);
   else
-    gcr_prompt_confirm_async (state.prompt, NULL, _gcr_prompt_confirm_done,
+    gcr_prompt_confirm_async (state.prompt, NULL, pe_gcr_prompt_confirm_done,
                               &state);
 
   if (pe->timeout)
-    state.timeout_id = g_timeout_add_seconds (pe->timeout, _gcr_timeout_done, &state);
+    state.timeout_id = g_timeout_add_seconds (pe->timeout,
+                                              pe_gcr_timeout_done, &state);
   g_main_loop_run (state.main_loop);
 
   /* clean up state: */
   if (state.timeout_id && !state.timed_out)
-    g_source_destroy (g_main_context_find_source_by_id (NULL, state.timeout_id));
+    g_source_destroy
+      (g_main_context_find_source_by_id (NULL, state.timeout_id));
+
   g_clear_object (&state.prompt);
   g_main_loop_unref (state.main_loop);
   return state.ret;
@@ -259,9 +264,10 @@ gnome3_cmd_handler (pinentry_t pe)
 
 
 static void
-_gcr_prompt_password_done (GObject *source_object, GAsyncResult *res, gpointer user_data)
+pe_gcr_prompt_password_done (GObject *source_object,
+                             GAsyncResult *res, gpointer user_data)
 {
-  struct _gnome3_run *state = (struct _gnome3_run *) user_data;
+  struct pe_gnome3_run_s *state = user_data;
   GcrPrompt *prompt = GCR_PROMPT (source_object);
 
   if (state && prompt && state->prompt == prompt)
@@ -316,10 +322,10 @@ _gcr_prompt_password_done (GObject *source_object, GAsyncResult *res, gpointer u
 }
 
 static void
-_gcr_prompt_confirm_done (GObject *source_object, GAsyncResult *res,
-                          gpointer user_data)
+pe_gcr_prompt_confirm_done (GObject *source_object, GAsyncResult *res,
+                            gpointer user_data)
 {
-  struct _gnome3_run *state = (struct _gnome3_run *) user_data;
+  struct pe_gnome3_run_s *state = user_data;
   GcrPrompt *prompt = GCR_PROMPT (source_object);
 
   if (state && prompt && state->prompt == prompt)
@@ -369,9 +375,9 @@ _gcr_prompt_confirm_done (GObject *source_object, GAsyncResult *res,
 }
 
 static gboolean
-_gcr_timeout_done (gpointer user_data)
+pe_gcr_timeout_done (gpointer user_data)
 {
-  struct _gnome3_run *state = (struct _gnome3_run *) user_data;
+  struct pe_gnome3_run_s *state = user_data;
 
   if (!state)
     return FALSE;

commit f7b99ff5f7f78db45350308bf409ea4a9e94f161
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date:   Fri Nov 4 18:57:52 2016 -0400

    gnome3: Honor timeout.
    
    * gnome3/pinentry-gnome3.c (create_prompt): Use timeout to determine
    how long to wait for Gcr to provide a system prompt before giving up.
    (_gcr_timeout_done): New.  Record that a timeout has elapsed.
    (gnome3_cmd_handler): Set up a timeout before launching the prompt,
    and tear it down afterward.
    (_gcr_prompt_password_done): Report timeout differently from normal
    cancellation.
    (_gcr_prompt_confirm_done): Report timeout differently from normal
    cancellation.
    
    --
    
    Without this change, pinentry-gnome3 does not respect the timeout
    parameter at all, and can hang indefinitely in the event that the
    system prompter is locked or the user is ignoring the session.
    
    Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>

diff --git a/gnome3/pinentry-gnome3.c b/gnome3/pinentry-gnome3.c
index 85142b9..c8d8fcf 100644
--- a/gnome3/pinentry-gnome3.c
+++ b/gnome3/pinentry-gnome3.c
@@ -74,6 +74,8 @@ struct _gnome3_run {
   GcrPrompt *prompt;
   GMainLoop *main_loop;
   int ret;
+  guint timeout_id;
+  int timed_out;
 };
 
 static void
@@ -82,6 +84,9 @@ _gcr_prompt_password_done (GObject *source_object, GAsyncResult *res, gpointer u
 static void
 _gcr_prompt_confirm_done (GObject *source_object, GAsyncResult *res, gpointer user_data);
 
+static gboolean
+_gcr_timeout_done (gpointer user_data);
+
 static void
 _propagate_g_error_to_pinentry (pinentry_t pe, GError *error,
                                 gpg_err_code_t code, const char *loc)
@@ -105,11 +110,25 @@ create_prompt (pinentry_t pe, int confirm)
   char window_id[32];
 
   /* Create the prompt.  */
-  prompt = GCR_PROMPT (gcr_system_prompt_open (-1, NULL, &error));
+  prompt = GCR_PROMPT (gcr_system_prompt_open (pe->timeout ? pe->timeout : -1, NULL, &error));
   if (! prompt)
     {
-      _propagate_g_error_to_pinentry (pe, error, GPG_ERR_CONFIGURATION,
-                                      "gcr_system_prompt_open");
+      /* this means the timeout elapsed, but no prompt was ever shown. */
+      if (error->code == GCR_SYSTEM_PROMPT_IN_PROGRESS)
+        {
+          fprintf (stderr, "Timeout: the Gcr system prompter was already in use.\n");
+          pe->specific_err_info = strdup ("Timeout: the Gcr system prompter was already in use.");
+          /* not using GPG_ERR_TIMEOUT here because the user never saw
+             a prompt: */
+          pe->specific_err = gpg_error (GPG_ERR_PIN_ENTRY);
+        }
+      else
+        {
+          fprintf (stderr, "couldn't create prompt for gnupg passphrase: %s\n",
+                   error->message);
+          _propagate_g_error_to_pinentry (pe, error, GPG_ERR_CONFIGURATION,
+                                          "gcr_system_prompt_open");
+        }
       g_error_free (error);
       return NULL;
     }
@@ -211,6 +230,8 @@ gnome3_cmd_handler (pinentry_t pe)
     }
   state.pinentry = pe;
   state.ret = 0;
+  state.timeout_id = 0;
+  state.timed_out = 0;
   state.prompt = create_prompt (pe, !!(pe->pin));
   if (!state.prompt)
     {
@@ -224,9 +245,13 @@ gnome3_cmd_handler (pinentry_t pe)
     gcr_prompt_confirm_async (state.prompt, NULL, _gcr_prompt_confirm_done,
                               &state);
 
+  if (pe->timeout)
+    state.timeout_id = g_timeout_add_seconds (pe->timeout, _gcr_timeout_done, &state);
   g_main_loop_run (state.main_loop);
 
   /* clean up state: */
+  if (state.timeout_id && !state.timed_out)
+    g_source_destroy (g_main_context_find_source_by_id (NULL, state.timeout_id));
   g_clear_object (&state.prompt);
   g_main_loop_unref (state.main_loop);
   return state.ret;
@@ -249,7 +274,17 @@ _gcr_prompt_password_done (GObject *source_object, GAsyncResult *res, gpointer u
       /* "The returned password is valid until the next time a method
 	 is called to display another prompt."  */
       password = gcr_prompt_password_finish (prompt, res, &error);
-      if (error)
+      if ((! password && ! error)
+          || (error && error->code == G_IO_ERROR_CANCELLED))
+        {
+          /* operation was cancelled or timed out.  */
+          ret = -1;
+          if (state->timed_out)
+            state->pinentry->specific_err = gpg_error (GPG_ERR_TIMEOUT);
+          if (error)
+            g_error_free (error);
+        }
+      else if (error)
 	{
           _propagate_g_error_to_pinentry (pe, error,
                                           GPG_ERR_PIN_ENTRY,
@@ -257,8 +292,6 @@ _gcr_prompt_password_done (GObject *source_object, GAsyncResult *res, gpointer u
 	  g_error_free (error);
 	  ret = -1;
 	}
-      else if (! password && ! error) /* User cancelled the operation.  */
-	ret = -1;
       else
 	{
 	  pinentry_setbufferlen (pe, strlen (password) + 1);
@@ -301,8 +334,16 @@ _gcr_prompt_confirm_done (GObject *source_object, GAsyncResult *res,
       reply = gcr_prompt_confirm_finish (prompt, res, &error);
       if (error)
 	{
-          _propagate_g_error_to_pinentry (pe, error, GPG_ERR_PIN_ENTRY,
-                                          "gcr_system_confirm_finish");
+          if (error->code == G_IO_ERROR_CANCELLED)
+            {
+              pe->canceled = 1;
+              if (state->timed_out)
+                state->pinentry->specific_err = gpg_error (GPG_ERR_TIMEOUT);
+            }
+          else
+            _propagate_g_error_to_pinentry (state->pinentry, error, GPG_ERR_PIN_ENTRY,
+                                            "gcr_system_confirm_finish");
+	  g_error_free (error);
 	  ret = 0;
 	}
       else if (reply == GCR_PROMPT_REPLY_CONTINUE
@@ -316,6 +357,8 @@ _gcr_prompt_confirm_done (GObject *source_object, GAsyncResult *res,
       else /* GCR_PROMPT_REPLY_CANCEL */
 	{
 	  pe->canceled = 1;
+          if (state->timed_out)
+            state->pinentry->specific_err = gpg_error (GPG_ERR_TIMEOUT);
 	  ret = 0;
 	}
       state->ret = ret;
@@ -325,6 +368,20 @@ _gcr_prompt_confirm_done (GObject *source_object, GAsyncResult *res,
     g_main_loop_quit (state->main_loop);
 }
 
+static gboolean
+_gcr_timeout_done (gpointer user_data)
+{
+  struct _gnome3_run *state = (struct _gnome3_run *) user_data;
+
+  if (!state)
+    return FALSE;
+
+  state->timed_out = 1;
+  gcr_prompt_close (state->prompt);
+
+  return FALSE;
+}
+
 pinentry_cmd_handler_t pinentry_cmd_handler = gnome3_cmd_handler;
 
 int

commit d0fe54d592a8d2be6fc82b26290a644bb3629214
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date:   Fri Nov 4 18:57:51 2016 -0400

    gnome3: Convert password/confirmation to asynchronous model.
    
    * gnome3/pinentry-gnome3.c (gnome3_cmd_handler): Convert main part of
    password or confirmation fetching into asynchronous code by moving
    completion into...
    (_gcr_prompt_password_done): ... here and...
    (_gcr_prompt_confirm_done): ... here.
    
    --
    
    The async programming interface to gcr is necessary if we want to be
    able to enforce a timeout, which will happen in the next patch in this
    series.
    
    Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
    
    Did not apply cleanluy due to me comment reformatting in a former
    patch. Fixed.  -wk

diff --git a/gnome3/pinentry-gnome3.c b/gnome3/pinentry-gnome3.c
index f24ac4a..85142b9 100644
--- a/gnome3/pinentry-gnome3.c
+++ b/gnome3/pinentry-gnome3.c
@@ -69,6 +69,19 @@ pinentry_utf8_validate (gchar *text)
   return result;
 }
 
+struct _gnome3_run {
+  pinentry_t pinentry;
+  GcrPrompt *prompt;
+  GMainLoop *main_loop;
+  int ret;
+};
+
+static void
+_gcr_prompt_password_done (GObject *source_object, GAsyncResult *res, gpointer user_data);
+
+static void
+_gcr_prompt_confirm_done (GObject *source_object, GAsyncResult *res, gpointer user_data);
+
 static void
 _propagate_g_error_to_pinentry (pinentry_t pe, GError *error,
                                 gpg_err_code_t code, const char *loc)
@@ -185,24 +198,57 @@ create_prompt (pinentry_t pe, int confirm)
 static int
 gnome3_cmd_handler (pinentry_t pe)
 {
-  GcrPrompt *prompt = NULL;
-  GError *error = NULL;
-  int ret = -1;
+  struct _gnome3_run state;
 
-  if (pe->pin) /* Passphrase mode.  */
+  state.main_loop = g_main_loop_new (NULL, FALSE);
+  if (!state.main_loop)
     {
-      const char *password;
+      pe->specific_err_info = strdup ("Failed to create GMainLoop");
+      pe->specific_err = gpg_error (GPG_ERR_PIN_ENTRY);
+      pe->specific_err_loc = "g_main_loop_new";
+      pe->canceled = 1;
+      return -1;
+    }
+  state.pinentry = pe;
+  state.ret = 0;
+  state.prompt = create_prompt (pe, !!(pe->pin));
+  if (!state.prompt)
+    {
+      pe->canceled = 1;
+      return -1;
+    }
+  if (pe->pin)
+    gcr_prompt_password_async (state.prompt, NULL, _gcr_prompt_password_done,
+                               &state);
+  else
+    gcr_prompt_confirm_async (state.prompt, NULL, _gcr_prompt_confirm_done,
+                              &state);
+
+  g_main_loop_run (state.main_loop);
+
+  /* clean up state: */
+  g_clear_object (&state.prompt);
+  g_main_loop_unref (state.main_loop);
+  return state.ret;
+};
 
-      prompt = create_prompt (pe, 0);
-      if (! prompt) /* Something went wrong.  */
-	{
-	  pe->canceled = 1;
-	  return -1;
-	}
+
+static void
+_gcr_prompt_password_done (GObject *source_object, GAsyncResult *res, gpointer user_data)
+{
+  struct _gnome3_run *state = (struct _gnome3_run *) user_data;
+  GcrPrompt *prompt = GCR_PROMPT (source_object);
+
+  if (state && prompt && state->prompt == prompt)
+    {
+      const char *password;
+      GError *error = NULL;
+      pinentry_t pe = state->pinentry;
+      int ret = -1;
 
       /* "The returned password is valid until the next time a method
 	 is called to display another prompt."  */
-      password = gcr_prompt_password (prompt, NULL, &error);
+      password = gcr_prompt_password_finish (prompt, res, &error);
       if (error)
 	{
           _propagate_g_error_to_pinentry (pe, error,
@@ -229,21 +275,30 @@ gnome3_cmd_handler (pinentry_t pe)
 
 	  ret = 1;
 	}
+      state->ret = ret;
     }
-  else /* Message box mode.  */
+
+  if (state)
+    g_main_loop_quit (state->main_loop);
+}
+
+static void
+_gcr_prompt_confirm_done (GObject *source_object, GAsyncResult *res,
+                          gpointer user_data)
+{
+  struct _gnome3_run *state = (struct _gnome3_run *) user_data;
+  GcrPrompt *prompt = GCR_PROMPT (source_object);
+
+  if (state && prompt && state->prompt == prompt)
     {
       GcrPromptReply reply;
-
-      prompt = create_prompt (pe, 1);
-      if (! prompt) /* Something went wrong.  */
-	{
-	  pe->canceled = 1;
-	  return -1;
-	}
+      GError *error = NULL;
+      pinentry_t pe = state->pinentry;
+      int ret = -1;
 
       /* XXX: We don't support a third button!  */
 
-      reply = gcr_prompt_confirm_run (prompt, NULL, &error);
+      reply = gcr_prompt_confirm_finish (prompt, res, &error);
       if (error)
 	{
           _propagate_g_error_to_pinentry (pe, error, GPG_ERR_PIN_ENTRY,
@@ -263,11 +318,11 @@ gnome3_cmd_handler (pinentry_t pe)
 	  pe->canceled = 1;
 	  ret = 0;
 	}
+      state->ret = ret;
     }
 
-  if (prompt)
-    g_clear_object (&prompt);
-  return ret;
+  if (state)
+    g_main_loop_quit (state->main_loop);
 }
 
 pinentry_cmd_handler_t pinentry_cmd_handler = gnome3_cmd_handler;

commit 102832a2c1f3ffa432e2a169791611bb3ca13a04
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date:   Fri Nov 4 18:57:50 2016 -0400

    qt: Report timeout.
    
    * qt/pinentryconfirm.h (PinentryConfirm): Add _timed_out, timedOut().
    * qt/pinentrydialog.h (PinentryDialog): Add _timed_out, timedOut().
    * qt/pinentryconfirm.cpp (slotTimeout): Record elapsed timeout.
    (PinentryConfirm): Initialize _timed_out to false.
    (timedOut): New. Returns value of _timed_out.
    * qt/pinentryDialog.cpp (slotTimeout): Record elapsed timeout.
    (PinentryDialog): Initialize _timed_out to false.
    (timedOut): New. Returns value of _timed_out.
    * qt/main.cpp (qt_cmd_handler): Report if canceled due to timeout.
    
    Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>

diff --git a/qt/main.cpp b/qt/main.cpp
index d5da4a8..8284960 100644
--- a/qt/main.cpp
+++ b/qt/main.cpp
@@ -44,6 +44,7 @@
 
 #include <memory>
 #include <stdexcept>
+#include <gpg-error.h>
 
 #ifdef FALLBACK_CURSES
 #include <pinentry-curses.h>
@@ -205,6 +206,8 @@ qt_cmd_handler(pinentry_t pe)
         }
         bool ret = pinentry.exec();
         if (!ret) {
+            if (pinentry.timedOut())
+                pe->specific_err = gpg_error (GPG_ERR_TIMEOUT);
             return -1;
         }
 
@@ -270,6 +273,9 @@ qt_cmd_handler(pinentry_t pe)
         if (rc == QMessageBox::Cancel) {
             pe->canceled = true;
         }
+        if (box.timedOut()) {
+          pe->specific_err = gpg_error (GPG_ERR_TIMEOUT);
+        }
 
         return rc == QMessageBox::Ok || rc == QMessageBox::Yes ;
 
diff --git a/qt/pinentryconfirm.cpp b/qt/pinentryconfirm.cpp
index e81b188..8b59d9d 100644
--- a/qt/pinentryconfirm.cpp
+++ b/qt/pinentryconfirm.cpp
@@ -24,6 +24,7 @@ PinentryConfirm::PinentryConfirm(Icon icon, int timeout, const QString &title,
                                  const QString &desc, StandardButtons buttons, QWidget *parent) :
     QMessageBox(icon, title, desc, buttons, parent)
 {
+    _timed_out = false;
     if (timeout > 0) {
         _timer = new QTimer(this);
         connect(_timer, SIGNAL(timeout()), this, SLOT(slotTimeout()));
@@ -36,6 +37,11 @@ PinentryConfirm::PinentryConfirm(Icon icon, int timeout, const QString &title,
     raiseWindow(this);
 }
 
+bool PinentryConfirm::timedOut() const
+{
+    return _timed_out;
+}
+
 void PinentryConfirm::showEvent(QShowEvent *event)
 {
     QDialog::showEvent(event);
@@ -45,6 +51,7 @@ void PinentryConfirm::showEvent(QShowEvent *event)
 void PinentryConfirm::slotTimeout()
 {
     QAbstractButton *b = button(QMessageBox::Cancel);
+    _timed_out = true;
 
     if (b) {
         b->animateClick(0);
diff --git a/qt/pinentryconfirm.h b/qt/pinentryconfirm.h
index 23e05dc..21b91c5 100644
--- a/qt/pinentryconfirm.h
+++ b/qt/pinentryconfirm.h
@@ -29,12 +29,14 @@ public:
     PinentryConfirm(Icon, int timeout, const QString &title,
                     const QString &desc, StandardButtons buttons,
                     QWidget *parent);
+    bool timedOut() const;
 
 private slots:
     void slotTimeout();
 
 private:
     QTimer *_timer;
+    bool _timed_out;
 
 protected:
     /* reimp */ void showEvent(QShowEvent *event);
diff --git a/qt/pinentrydialog.cpp b/qt/pinentrydialog.cpp
index f9dd700..92cf19e 100644
--- a/qt/pinentrydialog.cpp
+++ b/qt/pinentrydialog.cpp
@@ -121,6 +121,7 @@ QPixmap icon(QStyle::StandardPixmap which)
 
 void PinEntryDialog::slotTimeout()
 {
+    _timed_out = true;
     reject();
 }
 
@@ -137,6 +138,7 @@ PinEntryDialog::PinEntryDialog(QWidget *parent, const char *name,
       mVisiActionEdit(NULL),
       mVisiCB(NULL)
 {
+    _timed_out = false;
     setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
 
     if (modal) {
@@ -463,6 +465,11 @@ QString PinEntryDialog::repeatedPin() const
     return QString();
 }
 
+bool PinEntryDialog::timedOut() const
+{
+    return _timed_out;
+}
+
 void PinEntryDialog::setRepeatErrorText(const QString &err)
 {
     mRepeatError = err;
diff --git a/qt/pinentrydialog.h b/qt/pinentrydialog.h
index c302f95..905be0f 100644
--- a/qt/pinentrydialog.h
+++ b/qt/pinentrydialog.h
@@ -82,6 +82,8 @@ public:
 
     void setPinentryInfo(pinentry_t);
 
+    bool timedOut() const;
+
 protected slots:
     void updateQuality(const QString &);
     void slotTimeout();
@@ -105,6 +107,7 @@ private:
     QPushButton *_cancel;
     bool       _grabbed;
     bool       _have_quality_bar;
+    bool       _timed_out;
     pinentry_t _pinentry_info;
     QTimer    *_timer;
     QString    mRepeatError,

commit 784c4e0a3acace39a4a632bf443c794752297d54
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date:   Fri Nov 4 18:57:49 2016 -0400

    curses: Report timeout.
    
    * pinentry/pinentry-curses.c (dialog_run): Report if canceled due to
    timeout.
    
    Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>

diff --git a/pinentry/pinentry-curses.c b/pinentry/pinentry-curses.c
index 9882cbf..a6dbb69 100644
--- a/pinentry/pinentry-curses.c
+++ b/pinentry/pinentry-curses.c
@@ -941,6 +941,7 @@ dialog_run (pinentry_t pinentry, const char *tty_name, const char *tty_type)
       if (timed_out && no_input)
 	{
 	  done = -2;
+          pinentry->specific_err = gpg_error (GPG_ERR_TIMEOUT);
 	  break;
 	}
 #endif

commit 93b4454f4fe4d97dd89efccd64dbdd02bd002f77
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date:   Fri Nov 4 18:57:48 2016 -0400

    gtk2: Report timeout.
    
    * gtk+-2/pinentry-gtk-2.c (create_window): Send pointer to pinentry
    into timeout_cb.
    (timeout_cb): Report if canceled due to timeout.
    --
    
    Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
    
    Fixed a shadowed variable in timeout_cb.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/gtk+-2/pinentry-gtk-2.c b/gtk+-2/pinentry-gtk-2.c
index cd6270f..9d29d90 100644
--- a/gtk+-2/pinentry-gtk-2.c
+++ b/gtk+-2/pinentry-gtk-2.c
@@ -38,6 +38,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <gpg-error.h>
 
 #ifdef HAVE_GETOPT_H
 #include <getopt.h>
@@ -515,9 +516,13 @@ show_hide_button_toggled (GtkWidget *widget, gpointer data)
 static gboolean
 timeout_cb (gpointer data)
 {
-  (void)data;
+  pinentry_t pe = (pinentry_t)data;
   if (!got_input)
-    gtk_main_quit ();
+    {
+      gtk_main_quit ();
+      if (pe)
+        pe->specific_err = gpg_error (GPG_ERR_TIMEOUT);
+    }
 
   /* Don't run again.  */
   timeout_source = 0;
@@ -873,7 +878,7 @@ create_window (pinentry_t ctx)
   gtk_window_present (GTK_WINDOW (win));  /* Make sure it has the focus.  */
 
   if (pinentry->timeout > 0)
-    timeout_source = g_timeout_add (pinentry->timeout*1000, timeout_cb, NULL);
+    timeout_source = g_timeout_add (pinentry->timeout*1000, timeout_cb, pinentry);
 
   return win;
 }

commit 3be5b4fabaabf86f085b0b5303a1312abb7d0617
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date:   Fri Nov 4 18:57:47 2016 -0400

    tty: Report timeout.
    
    * tty/pinentry-tty.c (confirm): Report if canceled due to timeout.
    (password): Report if canceled due to timeout.
    
    Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>

diff --git a/tty/pinentry-tty.c b/tty/pinentry-tty.c
index cef6947..183b7a5 100644
--- a/tty/pinentry-tty.c
+++ b/tty/pinentry-tty.c
@@ -37,6 +37,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <ctype.h>
+#include <gpg-error.h>
 
 #include "pinentry.h"
 #include "memory.h"
@@ -283,6 +284,11 @@ confirm (pinentry_t pinentry, FILE *ttyfi, FILE *ttyfo)
         }
     }
 
+#ifndef HAVE_DOSISH_SYSTEM
+  if (timed_out)
+    pinentry->specific_err = gpg_error (GPG_ERR_TIMEOUT);
+#endif
+
   tcsetattr (fileno(ttyfi), TCSANOW, &o_term);
 
   return ret;
@@ -447,6 +453,11 @@ password (pinentry_t pinentry, FILE *ttyfi, FILE *ttyfo)
 	secmem_free (passphrase);
     }
 
+#ifndef HAVE_DOSISH_SYSTEM
+  if (timed_out)
+    pinentry->specific_err = gpg_error (GPG_ERR_TIMEOUT);
+#endif
+
   return done;
 }
 

commit 19c2110557d0504c1b406bde24e86cb5eb552fc7
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date:   Fri Nov 4 18:57:46 2016 -0400

    gnome3: Propagate GError messages to pinentry.
    
    * gnome3/pinentry-gnome3.c (_propagate_g_error_to_pinentry): New. Send
    GError messages back out to pinentry error reporting.
    (create_prompt): Use _propagate_g_error_to_pinentry on error.
    (gnome3_cmd_handler): Use _propagate_g_error_to_pinentry on error.
    --
    
    Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
    
    Modified to take care of malloc failure.  Also fixed alignment of some
    old comments.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/gnome3/pinentry-gnome3.c b/gnome3/pinentry-gnome3.c
index 1205300..f24ac4a 100644
--- a/gnome3/pinentry-gnome3.c
+++ b/gnome3/pinentry-gnome3.c
@@ -69,6 +69,20 @@ pinentry_utf8_validate (gchar *text)
   return result;
 }
 
+static void
+_propagate_g_error_to_pinentry (pinentry_t pe, GError *error,
+                                gpg_err_code_t code, const char *loc)
+{
+  size_t infolen = strlen(error->message) + 20;
+
+  pe->specific_err = gpg_error (code);
+  pe->specific_err_info = malloc (infolen);
+  if (pe->specific_err_info)
+    snprintf (pe->specific_err_info, infolen,
+              "%d: %s", error->code, error->message);
+  pe->specific_err_loc = loc;
+}
+
 static GcrPrompt *
 create_prompt (pinentry_t pe, int confirm)
 {
@@ -81,11 +95,8 @@ create_prompt (pinentry_t pe, int confirm)
   prompt = GCR_PROMPT (gcr_system_prompt_open (-1, NULL, &error));
   if (! prompt)
     {
-      fprintf (stderr, "couldn't create prompt for gnupg passphrase: %s\n",
-               error->message);
-      pe->specific_err_loc = "gcr_prompt";
-      pe->specific_err_info = strdup (error->message);
-      pe->specific_err = gpg_error (GPG_ERR_CONFIGURATION);
+      _propagate_g_error_to_pinentry (pe, error, GPG_ERR_CONFIGURATION,
+                                      "gcr_system_prompt_open");
       g_error_free (error);
       return NULL;
     }
@@ -148,7 +159,8 @@ create_prompt (pinentry_t pe, int confirm)
 
   /* gcr expects a string; we have a int.  see gcr's
      ui/frob-system-prompt.c for example conversion using %lu */
-  snprintf(window_id, sizeof (window_id), "%lu", (long unsigned int)pe->parent_wid);
+  snprintf (window_id, sizeof (window_id), "%lu",
+            (long unsigned int)pe->parent_wid);
   window_id[sizeof (window_id) - 1] = '\0';
   gcr_prompt_set_caller_window (prompt, window_id);
 
@@ -177,14 +189,12 @@ gnome3_cmd_handler (pinentry_t pe)
   GError *error = NULL;
   int ret = -1;
 
-  if (pe->pin)
-    /* Passphrase mode.  */
+  if (pe->pin) /* Passphrase mode.  */
     {
       const char *password;
 
       prompt = create_prompt (pe, 0);
-      if (! prompt)
-	/* Something went wrong.  */
+      if (! prompt) /* Something went wrong.  */
 	{
 	  pe->canceled = 1;
 	  return -1;
@@ -194,14 +204,14 @@ gnome3_cmd_handler (pinentry_t pe)
 	 is called to display another prompt."  */
       password = gcr_prompt_password (prompt, NULL, &error);
       if (error)
-	/* Error.  */
 	{
-	  pe->specific_err = gpg_error (GPG_ERR_ASS_GENERAL);
+          _propagate_g_error_to_pinentry (pe, error,
+                                          GPG_ERR_PIN_ENTRY,
+                                          "gcr_system_password_finish");
 	  g_error_free (error);
 	  ret = -1;
 	}
-      else if (! password && ! error)
-	/* User cancelled the operation.  */
+      else if (! password && ! error) /* User cancelled the operation.  */
 	ret = -1;
       else
 	{
@@ -220,14 +230,12 @@ gnome3_cmd_handler (pinentry_t pe)
 	  ret = 1;
 	}
     }
-  else
-    /* Message box mode.  */
+  else /* Message box mode.  */
     {
       GcrPromptReply reply;
 
       prompt = create_prompt (pe, 1);
-      if (! prompt)
-	/* Something went wrong.  */
+      if (! prompt) /* Something went wrong.  */
 	{
 	  pe->canceled = 1;
 	  return -1;
@@ -238,17 +246,19 @@ gnome3_cmd_handler (pinentry_t pe)
       reply = gcr_prompt_confirm_run (prompt, NULL, &error);
       if (error)
 	{
-	  pe->specific_err = gpg_error (GPG_ERR_ASS_GENERAL);
+          _propagate_g_error_to_pinentry (pe, error, GPG_ERR_PIN_ENTRY,
+                                          "gcr_system_confirm_finish");
 	  ret = 0;
 	}
       else if (reply == GCR_PROMPT_REPLY_CONTINUE
 	       /* XXX: Hack since gcr doesn't yet support one button
 		  message boxes treat cancel the same as okay.  */
 	       || pe->one_button)
-	/* Confirmation.  */
-	ret = 1;
-      else
-	/* GCR_PROMPT_REPLY_CANCEL */
+        {
+          /* Confirmation.  */
+          ret = 1;
+        }
+      else /* GCR_PROMPT_REPLY_CANCEL */
 	{
 	  pe->canceled = 1;
 	  ret = 0;

commit 96e3c5fcf210e971fe1ba66b9127ad51144fcc49
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date:   Fri Nov 4 18:57:45 2016 -0400

    gnome3: Set parent window.
    
    * gnome3/pinentry-gnome3.c (create_prompt): Tell Gcr about the caller
    window, if we know it.
    
    Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>

diff --git a/gnome3/pinentry-gnome3.c b/gnome3/pinentry-gnome3.c
index 90ff60f..1205300 100644
--- a/gnome3/pinentry-gnome3.c
+++ b/gnome3/pinentry-gnome3.c
@@ -75,6 +75,7 @@ create_prompt (pinentry_t pe, int confirm)
   GcrPrompt *prompt;
   GError *error = NULL;
   char *msg;
+  char window_id[32];
 
   /* Create the prompt.  */
   prompt = GCR_PROMPT (gcr_system_prompt_open (-1, NULL, &error));
@@ -145,8 +146,11 @@ create_prompt (pinentry_t pe, int confirm)
       /* XXX: Add support for the third option.  */
     }
 
-  /* XXX: gcr expects a string; we have a int.  */
-  // gcr_prompt_set_caller_window (prompt, pe->parent_wid);
+  /* gcr expects a string; we have a int.  see gcr's
+     ui/frob-system-prompt.c for example conversion using %lu */
+  snprintf(window_id, sizeof (window_id), "%lu", (long unsigned int)pe->parent_wid);
+  window_id[sizeof (window_id) - 1] = '\0';
+  gcr_prompt_set_caller_window (prompt, window_id);
 
 #ifdef HAVE_LIBSECRET
   if (! confirm && pe->allow_external_password_cache && pe->keyinfo)

-----------------------------------------------------------------------

Summary of changes:
 README                        |   2 +-
 autogen.sh                    |   2 +-
 build-aux/compile             |   2 +-
 build-aux/config.guess        |   2 +-
 build-aux/config.sub          |   2 +-
 build-aux/depcomp             |   2 +-
 build-aux/gitlog-to-changelog |   2 +-
 build-aux/mdate-sh            |   2 +-
 build-aux/missing             |  10 +-
 build-aux/texinfo.tex         |  14 +--
 configure.ac                  |  10 +-
 doc/texinfo.tex               |  14 +--
 emacs/pinentry-emacs.c        |   2 +-
 gnome3/pinentry-gnome3.c      | 224 +++++++++++++++++++++++++++++++++---------
 gtk+-2/pinentry-gtk-2.c       |  13 ++-
 m4/pkg.m4                     |   2 +-
 pinentry/argparse.c           |   8 +-
 pinentry/argparse.h           |   2 +-
 pinentry/password-cache.c     |   2 +-
 pinentry/password-cache.h     |   2 +-
 pinentry/pinentry-curses.c    |   1 +
 pinentry/pinentry-emacs.c     |   2 +-
 pinentry/pinentry-emacs.h     |   2 +-
 pinentry/pinentry.c           |   2 +-
 pinentry/pinentry.h           |   2 +-
 qt/main.cpp                   |   6 ++
 qt/pinentryconfirm.cpp        |   7 ++
 qt/pinentryconfirm.h          |   2 +
 qt/pinentrydialog.cpp         |   7 ++
 qt/pinentrydialog.h           |   3 +
 tty/Makefile.am               |   2 +-
 tty/pinentry-tty.c            |  13 ++-
 32 files changed, 268 insertions(+), 100 deletions(-)


hooks/post-receive
-- 
The standard pinentry collection
http://git.gnupg.org




More information about the Gnupg-commits mailing list