2016-11-22  Werner Koch  <wk@gnupg.org>

	Release 1.0.0.

	emacs: Add curses handler stub.
	* emacs/pinentry-emacs.c (curses_cmd_handler): New stub.

2016-11-08  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>

	gnome3: Tighten up error messages when GNOME screensaver is absent.
	* gnome3/pinentry-gnome3.c (pe_gnome_screen_locked): clean up error
	messages when GNOME screensaver is absent or misbehaving.

2016-11-07  Werner Koch  <wk@gnupg.org>

	Add fail-safe string termination for snprintf.
	* gtk+-2/pinentry-gtk-2.c (changed_text_handler): Make sure an
	 snprintf buffer is always ternminated.
	* pinentry/pinentry.c (my_strusage): Ditto.
	(write_status_error): Ditto.
	(cmd_getinfo): Ditto.
	* w32/main.c (w32_strerror): Ditto.

2016-11-07  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>

	gnome3: Avoid risk of uinitialized memory access.
	* gnome3/pinentry-gnome3.c (_propagate_g_error_to_pinentry): Ensure
	that pinentry->specific_err_info is null-terminated.

	tty: Declare dummy curses_cmd_handler.
	* tty/pinentry-tty.c: Declare a dummy handler for the
	curses_cmd_handler for fallback.

	gnome3: Fall back to curses if screensaver is locked.
	* gnome3/pinentry-gnome3.c (pe_gnome_screen_locked): New Function.
	Returns true only if we can talk to a GNOME screensaver over D-Bus and
	it assures us that it is locked.
	(main): If GNOME screensaver is locked, fall back to curses.

2016-11-05  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>

	gnome3: Test if Gcr System Prompter is available at startup.
	* gnome3/pinentry-gnome3.c (gcr_system_prompt_available): New. Tests
	whether it is possible to create a GcrSystemPrompt.
	(main): Use gcr_system_prompt_available() to decide whether to fall
	back to curses or not.

	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.

2016-11-05  Werner Koch  <wk@gnupg.org>

	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.

2016-11-05  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>

	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.

	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.

	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.

	curses: Report timeout.
	* pinentry/pinentry-curses.c (dialog_run): Report if canceled due to
	timeout.

	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.

	tty: Report timeout.
	* tty/pinentry-tty.c (confirm): Report if canceled due to timeout.
	(password): Report if canceled due to timeout.

	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.

	gnome3: Set parent window.
	* gnome3/pinentry-gnome3.c (create_prompt): Tell Gcr about the caller
	window, if we know it.

2016-11-05  Werner Koch  <wk@gnupg.org>

	core: Add command getinfo/flavor.
	* pinentry/pinentry.c: Inlcude pinentry-curses.h.
	(cmd_getinfo): Add sub-command "flavor"

2016-11-03  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>

	Convert to UTF-8.

2016-10-11  Daiki Ueno  <ueno@gnu.org>

	core: Don't report error on setting option 'allow-emacs-pinentry'.
	Previously "OPTION allow-emacs-pinentry" returned an error if the Emacs
	pinentry is not compiled in.  Since it is merely an option, it would
	make more sense to just return OK.

	Suggested-by: Werner Koch <wk@gnupg.org>

2016-10-04  Werner Koch  <wk@gnupg.org>

	gnome3: Drop unnecessary use of gtk.
	* configure.ac: pinentry-gnome3 only needs gcr-base, not gcr.
	* gnome3/pinentry-gnome3.c (main): Instead of testing whether GTK can
	be loaded, check for DBUS_SESSION_BUS_ADDRESS.
	(create_prompt): Use fprintf (stderr, ...) instead of g_warning (...),
	to align with the rest of pinentry.c.

	core: Add a way to print ERROR status lines.
	* pinentry/pinentry.h (struct pinentry): New fields SPECIFIC_ERR_LOC
	and SPECIFIC_ERR_INFO.
	* pinentry/pinentry.c (pinentry_reset): Free the new field.
	(write_status_error): New.
	(cmd_getpin): Use new fields.
	(cmd_confirm): Ditto.
	* gnome3/pinentry-gnome3.c (create_prompt): Set error for failed
	GCR_PROMPT.

2016-10-03  Ineiev  <ineiev@gnu.org>

	tty: Provide default text for "notok".
	* tty/pinentry-tty.c (confirm): Provide default text for "notok".

	tty: Fix underscore processing in accelerators.
	* tty/pinentry-tty.c (button): Fix underscore processing in
	accelerators.

	tty: Refactor usage of tolower.
	* tty/pinentry-tty.c (button): Apply tolower to the result.
	* tty/pinentry-tty.c (confirm): Compare lowercased character instead of
	converting them every time.

2016-09-01  Werner Koch  <wk@gnupg.org>

	curses: Return better error codes for bad ttynames.
	* pinentry/pinentry-curses.c (dialog_create): Return better error
	codes.

2016-08-18  Andre Heinecke  <aheinecke@intevation.de>

	Qt: Add SetWindowPos based foreground hack for Win.
	* qt/pinentrydialog.cpp(raiseWindow): Add another fallback for
	our foreground window hacks.

2016-08-12  Andre Heinecke  <aheinecke@intevation.de>

	Qt: Disable automatic wrap for desc and errors.
	* qt/pinentrydialog.cpp (PinEntryDialog): Disable WordWrap.

2016-08-12  Kristian Fiskerstrand  <kf@sumptuouscapital.com>

	Qt: Append -std=c++11 if building against Qt 5.7.
	 * m4/qt.m4: Append -std=c++11 to CFLAGS if building against Qt 5.7

2016-08-04  Ben Kibbey  <bjk@luxsci.net>

	Fix ncurses build.
	* pinentry/Makefile.am: Add NCURSES_CFLAGS.

2016-08-02  Justus Winter  <justus@g10code.com>

	gtk2: Also grab the pointer.
	* gtk+-2/pinentry-gtk-2.c (grab_pointer): New function.
	(ungrab_keyboard): Rename to 'ungrab_inputs' and also release the
	pointer grab.
	(create_window): Also grab the pointer.

	GnuPG-bug-id: 2430

2016-08-01  Justus Winter  <justus@g10code.com>

	gtk2: Be more persistent trying to grab the keyboard.
	We seem to get the 'visibility-notify' event before X is willing to
	let us grab the keyboard, insisting that the target window is not
	viewable (sic).

	* gtk+-2/pinentry-gtk-2.c (grab_keyboard): Retry grabbing the
	keyboard.

	GnuPG-bug-id: 2375

	gtk2: Print keyboard grabbing errors.
	* gtk+-2/pinentry-gtk-2.c (grab_strerror): New function.
	(grab_keyboard): Use the new function to print the error.

	gtk2: Avoid possible format string troubles.
	* gtk+-2/pinentry-gtk-2.c (confirm_unhiding): Do not use message as
	format string.

2016-04-25  Andre Heinecke  <aheinecke@intevation.de>

	Qt: Only use one line action for visibility.
	* qt/pinentrydialog.cpp (PinEntryDialog::toggleVisibility): Toggle
	both lines in repeat mode.
	(PinEntryDialog::PinEntryDialog): Remove repeat line action.

	Qt: Move qualitybar below repeat.
	* qt/pinentrydialog.cpp (PinEntryDialog::PinEntryDialog): Move
	quality bar below repeat.

	Qt: Do not take icon from theme.
	* qt/main.cpp (main): Revert changes to take icon from theme.

2016-04-15  Andre Heinecke  <aheinecke@intevation.de>

	Qt: Change qualitybar position back to below.
	* qt/pinentrydialog.cpp (PinEntryDialog::PinEntryDialog): Change
	position back to below the entry. Fix label alignment.

	gtk2: Add a button to show/hide the passphrase.
	* gtk+-2/pinentry-gtk-2.c (HIG_TINY): New.
	 (confirm_unhiding): New.
	 (show_hide_button_toggled): New.
	 (create_show_hide_button): New.
	 (create_window): Add a show/hide button.

2016-04-14  Andre Heinecke  <aheinecke@intevation.de>

	Revert "GTK: Add visibility toggle button"
	This reverts commit 71b51e02cf20174ba7144765e985f7e889eaa429.

	GTK: Add visibility toggle button.
	* gtk+-2/pinentry-gtk-2.c (create_window): Create checkbox.
	 (show_passphrase_toggled): New. Do the toggling.

	Qt: Restrict list of icon themes to try.
	* qt/main.cpp (main): Only search in select icon themes.

	Qt: Add actions to make passphrase visible.
	* qt/main.cpp (qt_cmd_handler): Support visibility tooltips.
	* qt/pinentrydialog.cpp (PinEntryDialog::PinEntryDialog):
	 Add a checkbox or line actions.
	 (PinEntryDialog::checkRepeat): Renabed to textChanged.
	 (PinEntryDialog::toggleVisibility): New. Toggle echo mode.
	* qt/pinentrydialog.h: Update accordingly.

	Add support for visibility string options.
	* doc/pinentry.texi: Note new values.
	* pinentry/pinentry.c (pinentry): Add default_cf_visi,
	 default_tt_visi and default_tt_hide.
	 (option_handler): Parse new values.
	* pinentry/pinentry.h (pinentry_t): Add new values.

	Qt: Implement repeat and improve grabbing.
	The keyboard is now only grabbed if an edit has input focus.

	* qt/main.cpp (qt_cmd_handler): Parse repeat values. Set repeat_okay.
	* qt/pinentrydialog.cpp (PinentryDialog::PinentryDialog): Update
	 layout. Add repeat label and edit. Connect focusChanged.
	 (PinEntryDialog::hideEvent): Remove grabbing hack.
	 (PinEntryDialog::focusChanged): New. Properly handle grabbing.
	 (PinEntryDialog::checkRepeat): New. Enable Ok if repeat matches.
	 (PinEntryDialog::repeatedPin): New. Getter for repeated pin.
	 (PinEntryDialog::setRepeatErrorText): Setter for error.
	* qt/pinentrydialog.h: Update accordingly.

	Qt: Respect icon themes and only fallback to own.
	* m4/qt.m4: Raise version requirement.
	* qt/main.cpp (main): Use QIcon::fromTheme to get the icon.

	Qt: Unify coding style and encoding.
	* qt/main.cpp, qt/pinentryconfirm.cpp, qt/pinentryconfirm.h,
	  qt/pinentrydialog.cpp, qt/pinentrydialog.h: Use KDE coding style.
	  Encode as UTF-8.

2016-03-04  Andre Heinecke  <aheinecke@intevation.de>

	Qt: Fix Windows foreground window hacks for Qt5.
	* qt/pinentrydialog.cpp: Use Q_OS_WIN instead of Q_WS_WIN
	 (SetForegroundWindowEx): Handle new Wid type with casts.

2016-02-15  Stef Walter  <stefw@redhat.com>

	pinentry: Use stderr to print failures in password-cache.c.
	Otherwise this interferes with the assuan protocol expected
	on stdout.

	GnuPG-bug-id: 2243

2016-01-05  Andre Heinecke  <aheinecke@intevation.de>

	Qt: Fix use after free in quality calculation.
	* qt/pinentrydialog.cpp (PinEntryDialog::updateQuality): Keep UTF8
	 byte array alive after conversion.

2015-12-07  Werner Koch  <wk@gnupg.org>

	Release 0.9.7.

2015-12-01  Werner Koch  <wk@gnupg.org>

	Remove unused code.
	* secmem/util.c (lower_privs, raise_privs): Remove commented
	functions.

2015-11-27  Neal H. Walfield  <neal@gnu.org>

	tty: Fix formatting.
	* tty/pinentry-tty.c (password): Remove trailing space.

2015-11-18  Neal H. Walfield  <neal@gnu.org>

	tty: Flush output.  Show an error if an invalid option is selected.
	* tty/pinentry-tty.c (confirm): Flush the output after printing the
	prompt.  Echo what the user typed.  If the user's selection is
	invalid, indicate as much.

2015-10-22  Dirk Mueller  <dirk@dmllr.de>

	Qt: Do not use temporary reference to utf8 pin.
	* qt/main.cpp (qt_cmd_handler): Keep utf8 pin byte array.

2015-10-02  Andre Heinecke  <aheinecke@intevation.de>

	Qt: Fix assignment of have_qt5_libs variable.
	* m4/qt.m4 (FIND_QT): Remove spaces in variable assignment.

	Qt: Fix quoting of have_qt5_libs init in FIND_QT.
	* m4/qt.m4 (FIND_QT): Quote initialization of have_qt5_libs var.

2015-09-25  Andre Heinecke  <aheinecke@intevation.de>

	Add option to disable looking for qt5.
	* m4/qt.m4 (FIND_QT): Add --disable-pinentry-qt5 option to
	disable qt5 support even if it is available.

2015-09-16  Werner Koch  <wk@gnupg.org>

	Add option "invisible-char".
	* pinentry/pinentry.h (struct pinentry): Add field invisible_char.
	* pinentry/pinentry.c (pinentry_reset): Restore that.
	(option_handler): Add option "invisible-char".
	* gtk+-2/pinentry-gtk-2.c (create_window): Set the invisible char if
	given.

2015-09-10  Werner Koch  <wk@gnupg.org>

	Release 0.9.6.

2015-08-24  Neal H. Walfield  <neal@gnu.org>

	tty: When reading the password, print any supplied error message.
	* tty/pinentry-tty.c (password): Print any supplied error message.

	tty: Refactor the code for printing error messages.
	* tty/pinentry-tty.c (dump_error_text): New function to display error
	messages.
	(confirm): Use it.
	(password): Likewise.

2015-08-18  Andre Heinecke  <aheinecke@intevation.de>

	Clarify comment about fds in pinentry_loop2.
	* pinentry/pinentry.h (pinetry_loop2): Clarify comment.

	Qt: Make it possible to build qt5 variant static.
	* qt/main.cpp: Import static platform plugins when necessary.

	Respect SYSROOT variable when looking for assuan.
	* m4/libassuan.m4: Respect SYSROOT Variable.

	Fix pinentry for Windows.
	* pinentry/pinentry.c (pinentry_loop2): Use assuan_fdopen for pipe fds.
	* pinentry/pinentry.h (pinentry_loop2): Mention this in the comment.

2015-08-11  Neal H. Walfield  <neal@gnu.org>

	tty: Correctly implement the repeat passphrase functionality.
	* tty/pinentry-tty.c (password): If the user repeated the passphrase
	and they matched, then set PINENTRY->REPEAT_OKAY.

	tty: Fix buffer resizing bug.
	* tty/pinentry-tty.c (read_password): Fix buffer resizing bug.

2015-07-28  Andre Heinecke  <aheinecke@intevation.de>

	Qt4: Rename to pinentry-qt and add Qt5 Support.
	* qt4: Moved to qt.
	* Makefile.am: Change qt4 suffix to qt.
	* m4/qt.m4: Remove old qt lookup functions.
	  (FIND_QT): New. Use pkg-config to find either Qt5 or Qt4
	* configure.ac: Change qt4 suffix to qt. Use new FIND_QT function.
	* qt/Makefile.am: Change qt4 suffix to qt. Use new FLAGS / LIBS.
	* qt/pinentrydialog.cpp, qt/qrc_pinentry.cpp: Fix whitespace.
	* .gitignore: Change qt4 paths to qt.
	* README: Update accordingly.
	* autogen.rc: Change qt4 to qt.
	* qt/main.cpp (qt_cmd_handler, main): Change qt4 to qt.

2015-07-28  Neal H. Walfield  <neal@gnu.org>

	doc: Describe the frontends and their security implications.
	* doc/pinentry.texi: Describe the frontends and their security
	implications.

	GnuPG-bug-id: 2034

2015-07-28  Andre Heinecke  <aheinecke@intevation.de>

	qt4: Replace the custom, secure entry widget with the standard widget.
	* configure.ac: Remove enable-pinentry-qt4-clipboard option.
	* qt4/qsecurelineedit.cpp, qt4/qsecurelineedit.h,
	  qt4/qsecurelineedit_p.h, qt4/secstring.cpp,
	  qt4/secstring.h: Removed.
	* qt4/Makefile.am: Update accordingly.
	* qt4/main.cpp (qt_cmd_handler): Use QString instead of secqstring.
	* qt4/pinentrydialog.cpp (PinentryDialog::PinentryDialog),
	  (PinEntryDialog::error, PinEntryDialog::pin),
	  (PinEntryDialog::updateQuality): Use QLineEdit and QString
	  instead of secmem variants.
	* qt4/pinentrydialog.cpp (PinentryDialog::PinentryDialog):
	  Set echo mode to password.
	* qt4/pinentrydialog.h: Update accordingly.

2015-07-26  Neal H. Walfield  <neal@gnu.org>

	gtk2: Use gtk_widget_get_window instead of accessing the struct.
	* gtk+-2/pinentry-gtk-2.c (make_transient): Don't directly access the
	window field of WIN.  Use gtk_widget_get_window instead.
	(grab_keyboard): Likewise.
	(ungrab_keyboard): Likewise.

	Patch-by: Dimitri John Ledkov <dimitri.j.ledkov@intel.com>.

	gtk2: Use newer tooltips functions, if available.
	* gtk+-2/pinentry-gtk-2.c (tooltips): Don't declare for Gtk+ >=2.12.0.
	(create_window): Gtk+ >=2.12.0, use gtk_widget_set_tooltip_text
	instead of gtk_tooltips_set_tip.

	Patch-by: Dimitri John Ledkov <dimitri.j.ledkov@intel.com>.

	Don't build the emacs pinentry program by default.

	gtk2: Replace the custom, secure entry widget with the standard widget.
	* gtk+-2/Makefile.am (pinentry_gtk_2_SOURCES): Remove gtksecentry.c,
	gtksecentry.h and gseal-gtk-compat.h.
	* gtk+-2/gseal-gtk-compat.h: Remove file.
	* gtk+-2/gtksecentry.c: Remove file.
	* gtk+-2/gtksecentry.h: Remove file.
	* gtk+-2/pinentry-gtk-2.c: Don't include "gtksecentry.h".
	(button_clicked): Use gtk_entry_get_text instead of
	gtk_secure_entry_get_text.
	(changed_text_handler): Use gtk_entry_get_text instead of
	gtk_secure_entry_get_text and use gtk_entry_set_text instead of
	gtk_secure_entry_set_text.
	(create_window): Use gtk_entry_new instead of gtk_secure_entry_new.
	Disable text visibility on ENTRY and REPEAT_ENTRY.
	(main): Don't override the memory allocation functions.

	gtk2: Simplify focus / default entry management.
	* gtk+-2/pinentry-gtk-2.c (create_window): Don't have ENTRY or
	REPEAT_ENTRY explicitly grab the focus.  The default is fine.  Don't
	add the GDK_ENTER_NOTIFY_MASK and GDK_LEAVE_NOTIFY_MASK events to
	QUALITYBAR.  Only set GTK_CAN_DEFAULT on the ok button.  In pin entry
	mode, make the ok button the default.

	gtk2: Have enter in the text entry, send the focus to the repeat entry.
	* gtk+-2/pinentry-gtk-2.c (enter_callback): Rename anentry to
	next_widget.  If NEXT_WIDGET is not NULL, send the focus to it.
	Otherwise, call button_clicked.
	(create_window): Initialize repeat_entry to NULL.  When connecting the
	enter_callback entry to REPEAT_ENTRY, set the user data paramter to
	NULL.  Connect the entry_callback entry to ENTRY after initializing
	REPEAT_ENTRY (if applicable) and set the user data parameter to
	REPEAT_ENTRY.

	gtk2: Simplify: combine confirm_button_clicked and button_clicked.
	* gtk+-2/pinentry-gtk-2.c (confirm_mode): New global static.
	(confirm_button_clicked): Fold this function...
	(button_clicked): ... into this one.  Update all callers.
	(create_window): Remove argument confirm_mode.
	(gtk_cmd_handler): Set confirm_mode.

2015-07-01  Werner Koch  <wk@gnupg.org>

	Release 0.9.5.

	w32: Adjust for use of standard libassuan.
	* autogen.rc: Add gpg-error and libassuan prefix options.
	* w32/Makefile.am (AM_CPPFLAGS): Use COMMON_FLAGS.
	(pinentry_w32_LDADD): Use COMMON_LIBS.

	Distribute files in m4/

2015-06-24  Gergely Imreh  <imrehg@gmail.com>

	curses: remove hard-wired ncursesw include path.
	* pinentry/pinentry-curses.c: pkg-config finds the correct include
	paths so should not hard-wire the path for the ncursesw header file.

2015-06-23  Neal H. Walfield  <neal@gnu.org>

	emacs: Don't link against ../assuan/libassuan.a.
	* emacs/Makefile.am (LDADD): Don't link against ../assuan/libassuan.a.
	We now use the system libassuan.

	curses: Recognize ASCII DEL as backspace.
	* pinentry/pinentry-curses.c (dialog_input): Recognize ASCII DEL as
	backspace.

2015-06-17  Daiki Ueno  <ueno@gnu.org>

	Add inside-Emacs mode to GUI pinentry programs.
	* configure.ac: Add --enable-pinentry-emacs and
	--enable-inside-emacs option.
	(BUILD_LIBPINENTRY_EMACS): New conditional.
	(BUILD_PINENTRY_EMACS): New conditional.
	(INSIDE_EMACS): New conditional.
	* Makefile.am (pinentry_emacs): New.
	(SUBDIRS): Add "emacs" subdir if PINENTRY_EMACS is set.

	* pinentry/pinentry-emacs.h: New file.
	* pinentry/pinentry-emacs.c: New file.
	* pinentry/Makefile.am: New file.
	* pinentry/pinentry.c (option_handler): Handle the allow-emacs-prompt
	Assuan option.

	* emacs/pinentry-emacs.c: New file.
	* emacs/Makefile.am: New file.

2015-06-16  Neal H. Walfield  <neal@gnu.org>

	If we fail to initialize gtk, fallback to the curses frontend.
	* gnome3/pinentry-gnome3.c (main): Use gtk_init_check instead of
	gtk_init.  If it fails, fallback to the curses frontend.

	Fix comment for pinentry_cmd_handler_t.
	* pinentry/pinentry.h (pinentry_cmd_handler_t): Fix comment.

	Describe default-prompt in the implementation section of the manual.
	* doc/pinentry.texi (Implementation Details): Describe default-prompt.

	Remove internal mini-libassuan implementation and link to libassuan.
	* assuan/ChangeLog-old: Remove file.
	* assuan/Makefile.am: Remove file.
	* assuan/README.1st: Remove file.
	* assuan/assuan-buffer.c: Remove file.
	* assuan/assuan-defs.h: Remove file.
	* assuan/assuan-handler.c: Remove file.
	* assuan/assuan-listen.c: Remove file.
	* assuan/assuan-pipe-server.c: Remove file.
	* assuan/assuan-util.c: Remove file.
	* assuan/assuan.h: Remove file.
	* assuan/mkerrors: Remove file.

	* configure.ac: Check for libgpg-error and libassuan.
	(COMMON_CFLAGS): Add $GPG_ERROR_CFLAGS and $LIBASSUAN_CFLAGS.
	(COMMAND_LIBS): Add $GPG_ERROR_LIBS and $LIBASSUAN_LIBS.
	(GPG_ERR_ENABLE_GETTEXT_MACROS): Define this macro.
	(GPG_ERR_ENABLE_ERRNO_MACROS): Likewise.
	(GNUPG_LIBASSUAN_VERSION): Likewise.
	(AC_CONFIG_FILES): Don't generate assuan/Makefile.
	(config.h): Define GPG_ERR_SOURCE_DEFAULT.
	* Makefile.am (SUBDIRS): Remove assuan.
	* curses/Makefile.am (LDADD): Remove ../assuan/libassuan.a.
	* gnome3/Makefile.am (AM_CPPFLAGS): Remove -I$(top_srcdir)/assuan.
	(LDADD): Remove ../assuan/libassuan.a.
	* gtk+-2/Makefile.am (LDADD): Remove ../assuan/libassuan.a.
	* pinentry/Makefile.am: Remove -I$(top_srcdir)/assuan.
	* qt4/Makefile.am (AM_CPPFLAGS): Remove -I$(top_srcdir)/assuan.
	(pinentry_qt4_LDADD): Remove $(top_builddir)/assuan/libassuan.a.
	* tty/Makefile.am (LDADD): Remove ../assuan/libassuan.a.

	* gnome3/pinentry-gnome3.c: Include <assuan.h>, not "assuan.h".
	Replace ASSUAN_General_Error, etc. with gpg_error or
	gpg_error_from_syserror.
	* pinentry/pinentry-curses.c: Likewise.
	* pinentry/pinentry.c: Likewise.
	(pinentry_assuan_reset_handler): Change return type to gpg_error_t.
	Change type of argument CTX from ASSUAN_CONTEXT to assuan_context_t.
	Return 0.
	(pinentry_inq_quality): Change variable CTX's type from ASSUAN_CONTEXT
	to assuan_context_t.
	(assuan_malloc_hooks): New variable.
	(pinentry_init): Call gpgrt_check_version.  Change use of
	assuan_set_malloc_hooks to match libassuan's semantics.
	(option_handler): Return a gpg_error_t, not an int.  Replace use of
	ASSUAN_Out_Of_Core, etc. with gpg_error or gpg_error_from_syserror.
	(cmd_setdesc): Return a gpg_error_t, not an int.  Change argument
	CTX's type from ASSUAN_CONTEXT to assuan_context_t.  Replace use of
	ASSUAN_Out_Of_Core, etc. with gpg_error or gpg_error_from_syserror.
	GPG_ERR_ENOMEM), etc.
	(cmd_setprompt): Likewise.
	(cmd_setkeyinfo): Likewise.
	(cmd_setrepeat): Likewise.
	(cmd_setrepeaterror): Likewise.
	(cmd_seterror): Likewise.
	(cmd_setok): Likewise.
	(cmd_setnotok): Likewise.
	(cmd_setcancel): Likewise.
	(cmd_settimeout): Likewise.
	(cmd_settitle): Likewise.
	(cmd_setqualitybar): Likewise.
	(cmd_setqualitybar_tt): Likewise.
	(cmd_getpin): Likewise.
	(cmd_confirm): Likewise.
	(cmd_message): Likewise.
	(cmd_getinfo): Likewise.
	(cmd_clear_passphrase): Likewise.
	(register_commands): Likewise.  Change use of assuan_register_command
	to match libassuan's semantics.
	(pinentry_loop2): Change variable RC's type from int to gpg_error_t.
	Change variable CTX's type from ASSUAN_CONTEXT to assuan_context_t.
	Use assuan_new to initialize CTX.  Change use of
	assuan_init_pipe_server to match libassuan's semantics.  Replace use
	of assuan_strerror with gpg_strerror.  Call assuan_release instead of
	assuan_deinit_server.

2015-06-16  Andre Heinecke  <aheinecke@intevation.de>

	Qt4: Fix GCC compile warnings.
	* qt4/qsecurelineedit.cpp (QSecureLineEdit::sizeHint),
	(QSecureLineEdit::minimumSizeHint): Remove unused Q_D macros.
	(QSecureLineEdit::setCursorPosition, QSecureLineEditPrivate::setText),
	(QSecureLineEditPrivate::hasAcceptableInput): Explicitly cast length to int.
	(QSecureLineEditPrivate::maskString): Use unsigned type for strIndex.
	(QSecureLineEditPrivate::maskString): Remove uneccesary casts.
	* qt4/secstring.cpp (toUtf8): Remove unused variable.

2015-06-07  Neal H. Walfield  <neal@gnu.org>

	gnome3: Actually respect the user's choice of using a password manager.
	* gnome3/pinentry-gnome3.c (create_prompt) [HAVE_LIBSECRET]: Only show
	the libsecret prompt in this case.
	(gnome3_cmd_handler) [HAVE_LIBSECRET]: Set PE->MAY_CACHE_PASSWORD
	according to the user's choice.

2015-06-05  Werner Koch  <wk@gnupg.org>

	Release 0.9.4.

2015-06-05  Neal H. Walfield  <neal@gnu.org>

	secmem: When clearing memory, don't clear beyond the end of the buffer.
	* secmem/secmem.c (secmem_malloc): Only clear the user memory; don't
	clear beyond the end of the buffer.

2015-06-04  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>

	Make pinentry_setbufferlen always return the pin buffer.
	* pinentry/pinentry.c (pinentry_setbufferlen): When the pin buffer is
	already large enough, return the buffer instead of NULL.

2015-06-02  Werner Koch  <wk@gnupg.org>

	Fixed compiler warnings - mostly unused parameter.

	Add more GCC warnings flags.
	* configure.ac: Add GCC specific -W flags.

2015-06-02  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>

	use g_debug(format, ...) safely.
	* pinentry/password-cache.c (password_cache_clear): use g_debug safely
	  in case error->message is malformed.

2015-06-01  Werner Koch  <wk@gnupg.org>

	Release 0.9.3.

2015-05-31  Stanislav Ochotnicky  <sochotnicky@redhat.com>

	Fix qt4 pinentry window created in the background.
	This is probably just a workaround. Proper fix is being investigated.
	See:
	https://bugzilla.redhat.com/show_bug.cgi?id=589532
	http://stackoverflow.com/questions/2788518/calling-activatewindow-on-qdia

2015-05-20  Werner Koch  <wk@gnupg.org>

	Improve configure log messages for ncurses/ncursesw.
	* m4/pkg.m4: Print the moule name not the variable name.

	Allow building without ncursesw and other minor fixes.
	* pinentry/password-cache.c (password_cache_clear): s/debug/g_debug/.
	* pinentry/pinentry-curses.c (dialog_input): Actually bail out.
	(dialog_run) [!HAVE_NCURSESW]: Define alt.

2015-05-19  Neal H. Walfield  <neal@gnu.org>

	gtk+-2: Make sure the save-passphrase-externally checkbox is not checked.
	* gtk+-2/pinentry-gtk-2.c (create_window): Make sure the check button
	to save the passphrase externally is not checked by default.

	Provide an Assuan command to clear a cached password.
	* pinentry/password-cache.c (password_cache_clear): New function.
	* pinentry/password-cache.h (password_cache_clear): New declaration.
	* pinentry/pinentry.c (cmd_getinfo): New function.
	(register_commands): Have the Assuan command "CLEARPASSPHRASE" call
	it.

	If there is an error message, show it and don't read from the cache.
	* pinentry/pinentry.c (cmd_getpin): If PINENTRY.ERROR is not NULL,
	don't read the password from the cache.

2015-05-18  Neal H. Walfield  <neal@gnu.org>

	curses: When creating the button text, respect underscores.
	* pinentry/pinentry-curses.c (MAKE_BUTTON): When creating the button
	text, respect underscores.

	curses: Make control-l repaint the screen.
	* pinentry/pinentry-curses.c (dialog_input): Make control-l repaint
	the screen.

	curses: Make control-h an alias for backspace.
	* pinentry/pinentry-curses.c (dialog_input): Add control-h an alias
	for backspace.

	When checking for ncurses, first try using PKG_CHECK_MODULES.
	* m4/curses.m4: When checking for ncurses, first try using
	PKG_CHECK_MODULES.

	Purge dead code enabled by ENABLE_ENHANCED.

2015-05-16  Neal H. Walfield  <neal@gnu.org>

	gtk+-2: If gtk fails to initialize, fallback to the curses backend.
	* gtk+-2/pinentry-gtk-2.c (main): Use gtk_init_check instead of
	gtk_init.  If gtk_init_check fails, fallback to the curses backend.

	curses: Handle control-u, control-w and alt-backspace.
	* pinentry/pinentry-curses.c (dialog_input): Take additional argument,
	alt.  Update callers.  If passed control-u, erase the whole line.  If
	passed alt-backspace or control-w, erase any white space the the
	previous word.
	(dialog_run): Detect when alt is pressed.

	secmem: Clear the buffer before returning it from secmem_malloc.
	* secmem/secmem.c (secmem_malloc): In case wipememory2 gets optimized
	away in secmem_free, clear the buffer before returning it.

	curses: NUL terminate the pin entry buffer.
	* pinentry/pinentry-curses.c (dialog_run): NUL terminate the pin entry
	buffer.

	curses: Make sure the pin entry buffer is larger enough.
	* pinentry/pinentry-curses.c (dialog_input): Make sure the pin entry
	buffer is large enough.

	curses: Avoid aliasing the pin buffer.
	* pinentry/pinentry-curses.c (struct dialog): Remove field pin.  Add
	field pinentry.
	(dialog_create): Don't set DIALOG->PIN to PINENTRY->PIN.  Set
	DIALOG->PINENTRY to PINENTRY and access PIN via
	DIALOG->PINENTRY->PIN.  Update other users.

	gtk+-2: When the dialog is destroyed, remove any pending timers.
	* gtk+-2/pinentry-gtk-2.c (timeout_source): New variable.
	(timeout_cb): Set it to 0.
	(create_window): When setting up the timeout, save the source
	identifier in TIMEOUT_SOURCE.
	(gtk_cmd_handler): If TIMEOUT_SOURCE is not 0, remove the timeout.

	curses: If an error occurs while reading input, cancel the operation.
	* pinentry/pinentry-curses.c (dialog_run) [! HAVE_DOSISH_SYSTEM]: If
	an error occurs while reading input, cancel the operation.

	Patch-by: Julien Cristau and Daniel Kahn Gillmor.

	tty: ok takes precedence over default-ok.  Likewise for cancel.
	* tty/pinentry-tty.c (confirm): When creating the ok button,
	pinentry->ok takes precedence over pinentry->default-ok.  Likewise for
	pinentry->cancel and pinentry->default_cancel.

	Don't use a static initializer to initialize PINENTRY.
	* pinentry/pinentry.c (pinentry): Don't use a static initializer.
	(pinentry_reset): Initialize PINENTRY here.
	(pinentry_parse_opts): Call pinentry_reset here.
	(pinentry_assuan_reset_handler): New function.
	(pinentry_loop2): Register it as the assuan reset handler.

	Don't emit the LC_CTYPE-not-set warning more than once.
	* pinentry/pinentry.c (lc_ctype_unknown_warning): New variable.
	(pinentry_utf8_to_local): Only emit the LC_CTYPE warning if
	lc_ctype_unknown_warning is not set.  After emitted such a warning,
	set lc_ctype_unknown_warning.
	(pinentry_local_to_utf8): Likewise.

	curses: Use default-ok and default-cancel if set.
	* pinentry/pinentry-curses.c (default_notok): New macro.
	(MAKE_BUTTON): Also check if default variant is set.

	curses: Don't show the notok button in pin entry mode.
	* pinentry/pinentry-curses.c (dialog_create): Don't show the notok
	button in pin entry mode.

2015-05-16  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>

	Avoid implicit declaration of function addnwstr.
	* pinentry/pinentry-curses.c [HAVE_NCURSESW]: Include <ncursesw/curses.h>.
	[! HAVE_NCURSESW]: Only include <curses.h> in this case.

2015-05-13  Neal H. Walfield  <neal@gnu.org>

	tty: Handle the case where the user needs to repeat the passphrase.
	* tty/pinentry-tty.c: Include "memory.h".
	(read_password): Break into two functions: read_password and password.
	(read_password): Just read the password from the terminal and return
	it in secure memory (or NULL if the user canceled the entry or there
	was an error).
	(password): Improve output.  Handle the repeat passphrase case (i.e.,
	when pinentry->repeat_passphrase is set).
	* tty/Makefile.am (AM_CPPFLAGS): Add "-I$(top_srcdir)/secmem".

	Add a new helper function, pinentry_setbuffer_use.
	* pinentry/pinentry.c (pinentry_setbuffer_use): New function.
	* pinentry/pinentry.h (pinentry_setbuffer_use): New declaration.

	tty: Always call do_touch_file if we (potentially) touched the screen.
	* tty/pinentry-tty.c (tty_cmd_handler): Always call do_touch_file.

	tty: Improve confirmation mode functionality.
	* tty/pinentry-tty.c: Include <ctype.h>.
	(UNDERLINE_START): Define.
	(ALERT_START): Define.
	(NORMAL_RESTORE): Define.
	(button): New function.
	(confirm): Rewrite to include all confirmation mode functionality.
	(tty_cmd_handler): Don't include any confirmation mode functionality.
	Just call confirm.

	Fix linking order to work when linked with --as-needed.
	* curses/Makefile.am (LDADD): Add $(COMMON_LIBS) after all of the
	local objects and object archives.
	* gnome3/Makefile.am (LDADD): Likewise.
	* gtk+-2/Makefile.am (LDADD): Likewise.
	* qt4/Makefile.am (pinentry_qt4_LDADD): Likewise.
	* tty/Makefile.am (LDADD): Likewise.

	Reported-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>

	Don't interpret the handler's return value as the passphrase's length.
	* pinentry/pinentry.c (cmd_getpin): Don't interpret the return value
	as the passphrase length.  Use strlen instead.

	Make the management of pinentry.pin more explicit.
	* pinentry/pinentry.c: Include <assert.h>.
	(pinentry): Set pin_len to 0.
	(pinentry_setbufferlen): If len is less than 2048, set it to 2048.
	Add an assertion.
	(pinentry_setbuffer_clear): New function that releases the pin buffer.
	(pinentry_setbuffer_init): New function that initializes the pin
	buffer.
	(cmd_getpin): Use pinentry_setbuffer_init and pinentry_setbuffer_clear
	instead of manual memory management.
	(cmd_confirm): Use pinentry_setbuffer_clear instead of manual memory
	management.

	Better document struct pinentry.
	* pinentry/pinentry.h (struct pinentry): Better document the various
	fields.

2015-05-12  Neal H. Walfield  <neal@gnu.org>

	Fix some documentation details.
	* doc/pinentry.texi: Fix some details.

	Add a GNOME3 pinentry based on gcr.
	* configure.ac (--enable-pinentry-gnome3): Option to enable the GNOME3
	pinentry.
	(pinentry_gnome_3): Set to yes if enabled and gcr-3 and gcr-base-3 gcr
	is available.
	(GNOME3CFLAGS): Define and AC_SUBST.
	(GNOME3LIBS): Define and AC_SUBST.
	(GCR_API_SUBJECT_TO_CHANGE): Define.
	(BUILD_PINENTRY_GNOME_3): Define.
	* Makefile.am (pinentry_gnome_3): Define.
	(SUBDIRS): Add ${pinentry_gnome_3}.
	* gnome3/Makefile.am: New file.
	* gnome3/pinentry-gnome3.c: New file.

	Add new chapter to documentation describing implementation details.
	* doc/pinentry.texi: Add new chapter describing some implementation
	details.

	Simplify code.
	* pinentry/pinentry.c (cmd_confirm): Don't use nested ternary
	expressions.

	Implement cmd_confirm in terms of cmd_message.
	* pinentry/pinentry.c (cmd_confirm): Implement cmd_confirm in terms of
	cmd_message.

	Fix memory allocation in pinentry_setbufferlen.
	* pinentry/pinentry.c (pinentry_setbufferlen): Set PIN->PIN to a
	buffer that is LEN bytes large, not 2 * PIN->PIN_LENGTH.

2015-05-11  Werner Koch  <wk@gnupg.org>

	Release 0.9.2.

	Return better error codes.
	* assuan/assuan.h (ASSUAN_Too_Short): New
	(ASSUAN_ENOENT, ASSUAN_ENOTTY): New.
	* pinentry/pinentry-curses.c: Include assuan.h.
	(dialog_create, dialog_run): Set specific error codes.
	* pinentry/pinentry.h (struct pinentry): Add field specific_err.
	* pinentry/pinentry.c (cmd_getpin): Return specific_err.
	(cmd_confirm, cmd_message): Ditto.

	curses: Reset tty state on failed dialog creation.
	* pinentry/pinentry-curses.c (dialog_run): Cleanup on dialog_create
	error.

	gtk: Use a description string from gpg-agent for libsecret.
	* pinentry/pinentry.h (struct pinentry): Add field default_pwmngr.
	* pinentry/pinentry.c (option_handler): Set it.
	* gtk+-2/pinentry-gtk-2.c (create_window) [HAVE_LIBSECRET]: Use new
	string.

	gtk: Silence compiler warning.

2015-05-07  Neal H. Walfield  <neal@gnu.org>

	Don't use asprintf.
	* pinentry/password-cache.c (keygrip_to_label): Don't use asprintf.

	Improve documentation.
	* doc/pinentry.texi: Improve description of SETKEYINFO's format.

	Minor documentation cleanups.

	Add support for saving the passphrase with libsecret.
	* configure.ac (COMMON_CFLAGS): New variable.  AC_SUBST it.
	(COMMON_LIBS): Likewise.  AC_SUBST it.
	(LIBSECRET_CFLAGS): Likewise.
	(LIBSECRET_LIBS): Likewise.
	(--enable-libsecret): Add option to enable support for libsecret.  If
	enabled, check for its presense.
	* pinentry/password-cache.h: New field.
	* pinentry/password-cache.c: New field.
	* pinentry/pinentry.h (struct pinentry): Add fields pin_from_cache,
	allow_external_password_cache, tried_password_cache, keyinfo, and
	may_cache_password.
	* pinentry/pinentry.c: Include "password-cache.h".
	(pinentry): Initialize new fields.
	(option_handler): Handle the "allow-external-password-cache" option.
	(cmd_setkeyinfo): Implement it.
	(cmd_getpin): Read the password from the cache, if appropriate.  Save
	it to the cache, if appropriate.
	* pinentry/Makefile.am (AM_CPPFLAGS): Add $(COMMON_CFLAGS).
	(LDADD): Add $(COMMON_LIBS).
	(libpinentry_a_SOURCES): Add password-cache.h
	password-cache.c.
	* gtk+-2/pinentry-gtk-2.c (may_save_passphrase_toggled): New function.
	(create_window): Take additional parameter, the pinentry's context.
	Update callers.
	[HAVE_LIBSECRET]: Show a checkbox asking whether the passphrase should
	be saved.
	* gtk+-2/Makefile.am (AM_CPPFLAGS): Add $(COMMON_CFLAGS).
	(LDADD): Add $(COMMON_LIBS).
	* curses/Makefile.am (AM_CPPFLAGS): Add $(COMMON_CFLAGS).
	(LDADD): Add $(COMMON_LIBS).
	* tty/Makefile.am (AM_CPPFLAGS): Add $(COMMON_CFLAGS).
	(LDADD): Add $(COMMON_LIBS).
	* doc/pinentry.texi (Protocol): Update documentation.  Describe the
	protocol and provide some justification.

2015-05-07  Werner Koch  <wk@gnupg.org>

	w32: Do not build gtk pinentry by default.
	* autogen.rc: Remove obsolete options.

2015-05-07  Neal H. Walfield  <neal@gnu.org>
