2016-06-16  Werner Koch  <wk@gnupg.org>

	Release 2.1.13.

2016-06-16  Yuri Chornoivan  <yurchor@ukr.net>

	po: Update Ukrainian translation.

2016-06-16  Ineiev  <ineiev@gnu.org>

	po: Update Russian translation.

2016-06-16  Werner Koch  <wk@gnupg.org>

	po: Update German translation.

	Add missing files so that make distcheck works again,
	* tests/openpgp/Makefile.am (CLEANFILES): Add created file
	"passphrases".
	* tools/Makefile.am (EXTRA_DIST): Add no-libgcrypt.c.

	tools: Fix typo in function name of symcryptrun.
	* tools/symcryptrun.c (main): Fix typo.

2016-06-14  Werner Koch  <wk@gnupg.org>

	gpg: Print the subkey's curve and not the primary key curve.
	* g10/keylist.c (list_keyblock_colon): Use PK2 for the subkey's curve.

	ldap: Improve info output for v3 fallback.
	* dirmngr/dirmngr_ldap.c (fetch_ldap): Do not use log_debug in an
	unprotected section.  Replace log_debug by log_info in verbose mode.

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

	dirmngr: Try ldap protocol V3 as fallback.
	* dirmngr/dirmngr_ldap.c (fetch_ldap): Try V3 Protocol in case
	default Protocol gives error.

	dirmngr: Print ldap error if bind fails.
	* dirmngr/dirmngr_ldap.c (fetch_ldap): Use ldap_err2string on bind
	return.

2016-06-14  Werner Koch  <wk@gnupg.org>

	gpgsm: Allow ciphers AES192 and SERPENT256.
	* sm/gpgsm.c (main): Add AES192 cipher.  Allow SERPENT256.

	doc: Add files and envvars to a new index.
	* doc/gnupg.texi: Define new index "ef".
	(Environment Index): New.

	gpg: Avoid endless loop in a tofu error case.
	* g10/tofu.c (get_trust): Do not jump to out.

	gpg: Split tofu's get_trust function into several smaller ones.
	* g10/tofu.c (get_trust): Factor code out to ...
	(format_conflict_msg_part1): new and to ...
	(ask_about_binding): new.

2016-06-13  Werner Koch  <wk@gnupg.org>

	gpg: Un-deprecate option --auto-key-retrieve.
	* g10/gpg.c (main): Remove deprecation warning.

	gpg: New option --disable-signer-uid, create Signer's UID sub-packet.
	* g10/gpg.c (oDisableSignerUID): New.
	(opts): New option '--disable-signer-uid'.
	(main): Set option.
	* g10/options.h (opt): Add field flags.disable_signer_uid.
	* g10/sign.c: Include mbox-util.h.
	(mk_notation_policy_etc): Embed the signer's uid.
	* g10/mainproc.c (check_sig_and_print): Do not use WKD for auto key
	retrieval if --disable-signer-uid is used.

	gpg: Try Signer's User ID sub-packet with --auto-key-retrieve.
	* g10/packet.h (PKT_signature): Add field 'signers_uid'.
	* g10/parse-packet.c (parse_signature): Set this field.
	* g10/free-packet.c (free_seckey_enc): Free field.
	(copy_signature): Copy field.
	* g10/mainproc.c (akl_has_wkd_method): New.
	(check_sig_and_print): Extend NEWSIG status.  If WKD is enabled try to
	locate a missing key via the signature's Signer's User ID sub-packet.
	Do this right before trying a keyserver lookup.

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

	gpg: Remove C-99ism, re-indent, and simplify one function.
	* g10/call-agent.c (struct keyinfo_data): Rename to
	keyinfo_data_parm_s.
	(agent_get_keyinfo): Replace C-99 style init.
	(keyinfo_status_cb): Use new fucntion split_fields.
	* g10/export.c (match_curve_skey_pk): Add missings returns error
	cases.
	(cleartext_secret_key_to_openpgp): Better clear PK->PKEY first.

	common: New function split_fields.
	* common/stringhelp.c (split_fields): New.
	* common/t-stringhelp.c: Include assert.h.
	(test_split_fields): New.
	(main): Call test.

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

	g10: Export cleartext keys as cleartext.
	* g10/export.c (do_export_stream): If a key is stored by the agent in
	cleartext, then try to export it as cleartext.
	* tests/openpgp/export.test: For secret keys that are stored in
	cleartext, test should try to export without pinentry interaction.

	g10: Allow receiving cleartext secret keys from agent.
	* g10/export.c (match_curve_skey_pk): New function, testing whether an
	OpenPGP public key and an S-expression use the same curve.
	* g10/export.c (cleartext_secret_key_to_openpgp): New function,
	filling in the secret key parameters of a PKT_public_key object from
	a corresponding cleartext S-expression.
	* g10/export.c, g10/main.h (receive_seckey_from_agent): Add cleartext
	parameter, enabling retrieval of the secret key, unlocked.
	* g10/export.c (do_export_stream): Send cleartext as 0, keeping current
	behavior.
	* g10/keygen.c (card_store_key_with_backup): Use cleartext=0 to ensure
	that smartcard backups are all passphrase-locked.

	g10: Add openpgp_protected flag to agent secret key export functions.
	* g10/call-agent.c, g10/call-agent.h (agent_export_key): Add
	openpgp_protected flag.
	* g10/export.c (receive_seckey_from_agent): Request openpgp_protected
	secret keys from agent.
	* agent/command.c (hlp_export_key): EXPORT_KEY help text: add a
	brief description of the effect of --openpgp.

	g10: report whether key in agent is passphrase-protected or not.
	* g10/call-agent.c, g10/call-agent.h (agent_get_keyinfo): add
	  r_cleartext parameter to report whether a key is stored without
	  passphrase protection.
	* g10/gpgv.c, g10/test-stubs.c: augment dummy agent_get_keyinfo to
	  match new API.
	* g10/export.c, g10/keyedit.c, g10/keygen.c, g10/keylist.c,
	  g10/sign.c: pass NULL to agent_get_keyinfo since we do not yet
	  need to know whether agent is passphrase-protected.

2016-06-08  Werner Koch  <wk@gnupg.org>

	Explicitly restrict socket permissions.
	* agent/gpg-agent.c (create_server_socket): Call chmod before listen.
	* scd/scdaemon.c (create_server_socket): Ditto.
	* dirmngr/dirmngr.c (main): Ditto.

	w32: Fix recent build regression.
	* common/homedir.c (_gnupg_socketdir_internal) [W32]: Add definition
	for NAME.
	* g10/gpg.c (main) [W32]:  Fix use og gnupg_homedir.

	* agent/gpg-agent.c (remove_socket): Remove unused var P.
	* scd/scdaemon.c (cleanup): Ditto.

	gpgconf: New commands --create-socketdir and --remove-socketdir.
	* tools/gpgconf.c: Include unistd.h.
	(aCreateSocketDir, aRemoveSocketDir): New.
	(opts): Add --create-socketdir and --remove-socketdir.
	(main): Implement them.

	Implement /run/user/UID/gnupg based sockets.
	* common/homedir.c: Include sys/stat.h and zb32.h.
	(w32_portable_app, w32_bin_is_bin): Change type from int to byte.
	(non_default_homedir): New.
	(is_gnupg_default_homedir): New.
	(default_homedir): Set non_default_homedir.
	(gnupg_set_homedir): Set non_default_homedir and make
	the_gnupg_homedir and absolute directory name.
	(gnupg_homedir): Return an absolute directory name.
	(_gnupg_socketdir_internal): New.
	(gnupg_socketdir): Implement /run/user/ based sockets.
	* tools/gpg-connect-agent.c (get_var_ext): Replace now obsolete
	make_filename by xstrdup.
	* tools/gpgconf.c (main): Sue gnupg_homedir for the "homedir:" output.

	gpgconf: Add option --homedir.
	* tools/gpgconf.c (opts): Add --homedir.
	(main): Set homedir.

	Do not use no-libgcrypt dummy for tools.
	* tools/Makefile.am (gpgconf_SOURCES): Remove no-libgcrypt.c.
	(gpgconf_LDADD): Add LIBGCRYPT_LIBS.
	(gpg_connect_agent_LDADD): Ditto.
	(gpgtar_LDADD): Ditto.
	* dirmngr/Makefile.am (dirmngr_client_LDADD): Ditto.
	(t_common_ldadd): Ditto.  Remove no-libgcrypt.o.

	Do not try to remove the enclosing directory of sockets.
	* agent/gpg-agent.c (remove_socket): Do not remove the enclosing
	directory.
	* scd/scdaemon.c (cleanup): Ditto.

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

	common: New function gnupg_socketdir.
	* common/homedir.c (gnupg_socketdir): New.
	* agent/gpg-agent.c (create_socket_name): Use new function instead of
	gnupg_homedir.
	(check_own_socket): Ditto.
	(check_for_running_agent): Ditto.
	* agent/preset-passphrase.c (main): Ditto.
	* common/asshelp.c (start_new_gpg_agent): Ditto.
	* scd/scdaemon.c (create_socket_name): Ditto.
	* tools/gpgconf.c (main): Ditto.
	* tools/symcryptrun.c (main): Ditto.

	common: Remove homedir arg from start_new_{dirmngr,gpg_agent}.
	* common/asshelp.c (start_new_gpg_agent): Remove arg 'homedir' in
	favor of gnupg_homedir ().  Change all callers.
	(start_new_dirmngr): Ditto.
	* common/get-passphrase.c (gnupg_prepare_get_passphrase): Remove arg
	'homedir'.

	Replace use of opt.homedir by accessor functions.
	* common/homedir.c (the_gnupg_homedir): New var.
	(gnupg_set_homedir): New.
	(gnupg_homedir): New.
	* g10/options.h (struct opt): Remove 'homedir' and replace all users
	by the new accessor functions.
	* g13/g13-common.h (struct opt): Ditto.
	* scd/scdaemon.h (struct opt): Ditto.
	* sm/gpgsm.h (struct opt): Ditto.
	* dirmngr/dirmngr.h (struct opt): Ditto.
	* agent/preset-passphrase.c (opt_homedir): Ditto.
	* agent/protect-tool.c (opt_homedir): Ditto.

2016-06-07  NIIBE Yutaka  <gniibe@fsij.org>

	po: Update Japanese translation.

	gpg: Fix command line parsing of --quick-addkey and --quick-gen-key.
	* g10/gpg.c (main): Compose a block by curly braces.

2016-06-06  Werner Koch  <wk@gnupg.org>

	gpg: Use --keyid-format=none by default.
	* g10/gpg.c (main): Init keyid_format to KF_NONE.
	* g10/keyid.c (format_keyid): Ditto.
	(keystrlen): Ditto.

	gpg: Add option --with-subkey-fingerprint.
	* g10/gpg.c (oWithSubkeyFingerprint): New.
	(opts): Add --with-subkey-fingerprint[s].
	(main): Set that option.
	* g10/options.h (struct opt): Add 'with_subkey_fingerprint'.
	* g10/keylist.c (list_keyblock_print): Print subkey fingerprint.
	(print_fingerprint): Tweak printing to use compact format if
	desirable.

	gpg: Implement --keyid-format=none.
	* g10/gpg.c (main): Add option "none" to --keyid-format.
	* g10/options.h (KF_NONE): New.
	* g10/keyid.c (format_keyid): Implement that.
	(keystr): Use format "long" is KF_NONE is in use.
	(keystr_with_sub): Ditto.
	* g10/keylist.c (list_keyblock_print): Adjust indentaion for KF_NONE.
	Factor some code out to ...
	(print_key_line): new.
	(print_fingerprint): Add mode 20.
	* g10/mainproc.c (list_node): Use print_key_line.  Replace MAINKEY by
	flags.primary in the PK.  Fix putting a " revoked..." string into the
	colons format.
	* g10/pkclist.c (do_edit_ownertrust): Use print_key_line.  This
	slightly changes the putput format.
	* g10/revoke.c (gen_standard_revoke): Use print_key_line.  This may
	also put "expires: " into the output.

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

	w32: Require --enable-build-timestamp for the BUILD_HOSTNAME.
	* configure.ac (BUILD_HOSTNAME): Set to "<anon>" bey default.
	* build-aux/speedo.mk (speedo_pkg_gnupg_configure): Add
	  --enable-build-timestamp.

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

	gpg: Add the fingerprint to KEY_CREATED for subkeys.
	* g10/keygen.c (print_status_key_created): Make more robust by
	allowing a NULL for PK.
	(generate_subkeypair): Use print_status_key_created.
	(generate_card_subkeypair): Ditto.

	gpg: Try to use the passphrase from the primary for --quick-addkey.
	* agent/command.c (cmd_genkey): Add option --passwd-nonce.
	(cmd_passwd): Return a PASSWD_NONCE in verify mode.
	* g10/call-agent.c (agent_genkey): Add arg 'passwd_nonce_addr' and do
	not send a RESET if given.
	(agent_passwd): Add arg 'verify'.
	* g10/keygen.c (common_gen): Add optional arg 'passwd_nonce_addr'.
	(gen_elg, gen_dsa, gen_ecc, gen_rsa, do_create): Ditto.
	(generate_subkeypair): Use sepeare hexgrip var for the to be created
	for hexgrip feature.  Verify primary key first.  Make use of the
	passwd nonce.  Allow for a static passphrase.

	gpg: Extend the --quick-gen-key command.
	* g10/keygen.c (quickgen_set_para): Add arg 'use'.
	(quick_generate_keypair): Add args 'algostr', 'usagestr', and
	'expirestr'.  Implement primary only key mode.
	(parse_algo_usage_expire): Set NBITS for the default algo.
	* g10/gpg.c (main): Extend --quick-gen-key command.

	gpg: Improve the new parse_subkey_algostr_usagestr fucntion.
	* g10/keygen.c (parse_usagestr): Allow "cert".
	(generate_subkeypair): Factor expire parsing out to ...
	(parse_subkey_algostr_usagestr): here.  Rename to ...
	(parse_algo_usage_expire): this.  Add arg 'for_subkey'.  Set CERT for
	primary key and check that it is not set for subkeys.

	gpg: New command --quick-addkey.
	* g10/keygen.c (DEFAULT_STD_SUBKEYUSE): New.
	(ask_keysize): Factor code out to ...
	(get_keysize_range, fixup_keysize): new.
	(parse_parameter_usage): Factor parsing out to  ...
	(parse_usagestr): new.  Allow use of "encr" as alias for "encrypt".
	(parse_subkey_algostr_usagestr): New.
	(generate_subkeypair): Add new args.  Implement unattended mode.

	* g10/keyedit.c (keyedit_quick_sign): Factor some code out to ...
	(find_by_primary_fpr): new.
	(keyedit_quick_addkey): New.
	* g10/gpg.c (aQuickAddKey): New.
	(opts): Add --quick-addkey.
	(main): Implement.

	gpg: Do not abort on certain invalid packets.
	* g10/build-packet.c (write_fake_data): Check for non-opaque data.
	* g10/seskey.c (do_encode_md): Return NULL instead of abort.

	common: New function openpgp_is_curve_supported.
	* common/openpgp-oid.c: Include openpgpdefs.h.
	(oidtable): Add field pubkey_algo.
	(openpgp_is_curve_supported): New.

2016-06-01  NIIBE Yutaka  <gniibe@fsij.org>

	g10: Allow User ID length >= 256.
	* build-packet.c (do_user_id): Call write_header2 with HDRLEN not set.

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

	gpg: New status code NOTATION_FLAGS.
	* common/status.h (STATUS_NOTATION_FLAGS: New.
	* g10/packet.h (struct notation): Add flags.human.
	(notation_t): New typedef.
	* g10/build-packet.c (sig_to_notation): Set flags.human.
	* g10/keylist.c (show_notation): Write STATUS_NOTATION_FLAGS.

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

	common: Add a status callback to gnupg_exec_tool_stream.
	* common/exectool.h (exec_tool_status_cb_t): New.
	* common/exectool.c: Include missing exectool.h.
	(read_and_log_buffer_t): Replace array by pointer.
	(gnupg_exec_tool_stream): Add args 'status_cb' and 'status_cb_value'.
	Change all callers to pass NULL for them.  Malloc buffer for
	FDERRSTATE.
	(read_and_log_stderr): Implement status_fd feature.

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

	common: Allow a second input stream for gnupg_exec_tool_stream.
	* common/exechelp-posix.c (do_exec): Add arg 'except' and pass to
	close_all_fds.
	(gnupg_spawn_process): Add arg 'except'.  Change callers to pass NULL
	for it.
	* common/exechelp-w32.c (gnupg_spawn_process): Add dummy arg 'except'.
	* common/exechelp-w32ce.c (gnupg_spawn_process): Ditto.
	* common/exectool.c (copy_buffer_do_copy): Allow NULL for SINK.
	(gnupg_exec_tool_stream): Add arg 'inextra'. Change callers to pass
	NULL for it.  Allow NULL for OUTPUT.

	common: Simplify the fd closing patch 512c56a.
	* common/exechelp-posix.c (get_max_fds): Use /proc/self.

	common: Speedup closing fds before an exec.
	* common/exechelp-posix.c [__linux__]: Include dirent.h.
	(get_max_fds) [__linux__]: Return the actual used highest fd.

	tools: Improve debug output of rfc822parse.
	* tools/rfc822parse.c (show_event): Add missing events.

	build: Remove obsolete tests for funopen and fopencookie.
	* configure.ac (AC_CHECK_FUNCS): Remove tests for funopen.

	common: Extend gnupg_create_inbound_pipe et al.
	* common/exechelp-posix.c (gnupg_create_inbound_pipe): Add args 'r_fp'
	and 'nonblock'.
	(gnupg_create_outbound_pipe): Ditto.
	* common/exechelp-w32.c (gnupg_create_inbound_pipe): Add non yet
	functional args 'r_fp' and 'nonblock'.
	(gnupg_create_outbound_pipe): Ditto.
	* common/exechelp-w32ce.c (gnupg_create_inbound_pipe): Ditto.
	(gnupg_create_outbound_pipe): Ditto.

	common: Make use of default_errsource in exechelp.
	* common/exechelp-posix.c (my_error_from_syserror, my_error): New.
	Use them instead of gpg_error and gpg_error_from_syserror.
	(create_pipe_and_estream): Remove arg ERRSOURCE and fix use of
	OUTBOUND which has a wrong name.  Adjust callers.
	(gnupg_spawn_process): Remove arg ERRSOURCE and replace by use of
	DEFAULT_ERRSOURCE.
	* common/exechelp-w32.c (gnupg_spawn_process): Ditto.
	* common/exechelp-w32ce.c (gnupg_spawn_process): Ditto.
	* common/exectool.c (gnupg_exec_tool_stream):  Do not pass
	GPG_ERROR_FROM_SYSERROR.
	* tools/gpgconf-comp.c (gc_component_check_options): Ditto.
	(retrieve_options_from_program): Ditto.

	gpg: Keep current and total of PROGESS status lines small enough.
	* g10/progress.c (progress_filter): Factor status wrote out to...
	(write_status_progress): New.  Scale values down.

2016-05-27  NIIBE Yutaka  <gniibe@fsij.org>

	configure: Detection of libusb on FreeBSD.
	* configure.ac (LIBUSB_LIBS): Use LIBUSB_NAME for AC_CHECK_LIB.

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

	build: Switch to new URL for swdb.lst.

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

	gpgtar: Simplify code by using ccparray.
	* tools/gpgtar-create.c (gpgtar_create): Use ccparray functions.
	* tools/gpgtar-extract.c (gpgtar_extract): Ditto.
	* tools/gpgtar-list.c (gpgtar_list): Ditto.

	common: Add simple dynamic array function.
	* common/ccparray.c: New.
	* common/ccparray.h: New.
	* common/t-ccparray.c: New.
	* common/Makefile.am (common_sources): Add files.
	(module_tests): Add test file.
	(t_ccparray_LDADD): New.

2016-05-23  Justus Winter  <justus@g10code.com>

	tests: Test the pinentry interactions when exporting keys.
	* tests/openpgp/export.test: Test pinentry interactions.

	tests: Add support for a passphrase queue to fake pinentry.
	* tests/openpgp/fake-pinentry.c (get_passphrase): New function.
	(main): Add option --passphrasefile and read passphrases from it.

	tests: Add logging to fake pinentry.
	* tests/openpgp/fake-pinentry.c (log_stream): New variable.
	(reply): New function.
	(spacep,skip_options,option_value): Copy from common.
	(main): Parse arguments, add --logfile option, write logfile.

	tests: Add export test.
	* tests/openpgp/Makefile.am (TESTS): Add new file.
	* tests/openpgp/export.test: New file.

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

	gpg: Speed up key listing in Tofu mode.
	* g10/tofu.c (get_trust): Add arg PK.  Uses this instead of a an extra
	lookup of the public key by fingerrpint.
	(tofu_register): Pass PK to get_trust.
	(tofu_get_validity): Ditto.

	*g10/tofu.c (tofu_register): Remove unused FINGERPRINT_PP.

	gpg: Avoid name spaces clash with future sqlite versions.
	* g10/sqlite.c: Rename to gpgsql.c.  Change function prefixes to
	gpgsql_.
	* g10/sqlite.h: Rename to gpgsql.h.
	* g10/tofu.c: Adjust for changes.

	gpg: Explicitly close a combined Tofu DB.
	* g10/tofu.c (tofu_closedbs): Close combined DB.

	gpg: Store the Tofu meta handle for databases in CTRL.
	* g10/gpg.h (struct tofu_dbs_s, tofu_dbs_t): New declarations.
	(struct server_control_s): Add field tofu.dbs.
	* g10/tofu.c (struct dbs): Rename to tofu_dbs_s.  Replace all users by
	by tofu_dbs_t.
	(opendbs):  Add arg CTRL.  Cache the DBS in CTRL.
	(closedbs): Rename to tofu_closedbs and make global.  Add arg CTRL.
	(tofu_register): Add arg CTRL.  Change all callers.  Do not call
	closedbs.
	(tofu_get_validity): Ditto.
	(tofu_set_policy): Ditto.
	(tofu_get_policy): Ditto.
	(tofu_set_policy_by_keyid): Add arg CTRL.
	* g10/gpg.c (gpg_deinit_default_ctrl): Call tofu_closedbs.

	gpg: Pass CTRL object down to the trust functions.

	gpg: Fix the TOFU_STATS_LONG status.
	* g10/tofu.c (show_statistics): Print TOFU STATS with formatting
	characters.

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

	gpg: Print "[  never ]" instead of err for validity.
	* g10/trust.c (uid_trust_string_fixed): Handle NEVER.

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

	dirmngr: Adjust the WKD lookup to specs version -01.
	* dirmngr/server.c (cmd_wkd_get): Remove second occurrence of the
	domain part.

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

	gpg: Emit new status line KEY_CONSIDERED.
	* common/status.h (STATUS_KEY_CONSIDERED): New.
	* g10/getkey.c: Include status.h.
	(LOOKUP_NOT_SELECTED, LOOKUP_ALL_SUBKEYS_EXPIRED): New.
	(finish_lookup): Add arg R_FLAGS.  Count expired and revoked keys and
	set flag.  Check a requested usage before checking for expiraion or
	revocation.
	(print_status_key_considered): New.
	(lookup): Print new status.

2016-05-11  NIIBE Yutaka  <gniibe@fsij.org>

	g10: Fix signature checking.
	* g10/sig-check.c (check_signature_over_key_or_uid): Fix call to
	walk_kbnode.

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

	gpg: Allow unattended deletion of secret keys.
	* agent/command.c (cmd_delete_key): Make the --force option depend on
	--disallow-loopback-passphrase.
	* g10/call-agent.c (agent_delete_key): Add arg FORCE.
	* g10/delkey.c (do_delete_key): Pass opt.answer_yes to
	agent_delete_key.

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

	gpg: Fix buglet in the check_all_keysigs function.
	* g10/keyedit.c (sig_comparison): Actually compare the pubkey
	algorithms.

	gpg: Request a "save" after cmd "check" fixed something.
	* g10/keyedit.c (keyedit_menu) <cmdCHECK>: Set modified.

2016-05-09  NIIBE Yutaka  <gniibe@fsij.org>

	po: Update Japanese translation.

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

	Release 2.1.12.

	speedo,w32: Remove the installation directory page.
	* build-aux/speedo/w32/inst.nsi (MUI_PAGE_DIRECTORY): Remove.

	gpg: Fix const char pointer mismatch with gettext.
	* g10/tofu.c (get_trust): Use const char *.

	speedo: Build sqlite with static-libgcc.
	* build-aux/speedo/patches/sqlite.patch: New.
	* Makefile.am (EXTRA_DIST): Add file.

	speedo: Also try patch files w/o version number.
	* build-aux/speedo.mk (SPKG_template): Try such a patch file.

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

	speedo,w32: Install sqlite.
	* build-aux/speedo/w32/inst.nsi (-sqlite, -un.sqlite): New.

	speedo,w32: Fix uninstallation.
	* build-aux/speedo/w32/inst.nsi (-un.gnupg): Delete distsigkey and
	dirmngr-conf.skel

	speedo,w32: Install localisation.
	* build-aux/speedo/w32/inst.nsi (-libgpg-error, GnuPG): Install l10n.
	(-un.libgpg-error, -un.gnupg): Uninstall l10n files.

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

	tests: Disable the migrations tests.
	* tests/Makefile.am (SUBDIRS): Remove migrations.
	* configure.ac (AC_CONFIG_FILES): Remove migrations Makefile.

2016-05-04  Ineiev  <ineiev@gnu.org>

	po: Update Russian translation.

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

	po: Update German translation.

	Some minor string changes and fixed a printf format.
	* g10/build-packet.c (notation_value_to_human_readable_string): Use
	%zu for size_t.

	build: Update config.{guess,sub} to 2016-04-02 and 2016-03-30.
	* build-aux/config.guess: Update.
	* build-aux/config.sub: Update.

	agent: Make --allow-loopback-pinentry the default.
	* agent/gpg-agent.c (oNoAllowLoopbackPinentry): New.
	(opts): Add --no-allow-loopback-pinentry.  Hide
	description of --allow-loopback-pinentry.
	(parse_rereadable_options): Set opt.allow_loopback_pinentry by
	default.
	(main): Replace allow-loopback-pinentry by no-allow-loopback-pinentry
	in the gpgconf list.
	* tools/gpgconf-comp.c (gc_options_gpg_agent): Ditto.

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

	common: Print https URLs in help messages.
	* common/argparse.c (strusage): Print https URLS.

	tests: Silence output of some tests.
	* common/t-exechelp.c (print_open_fds): Silence non-verbose output.
	(test_close_all_fds): Ditto.
	* common/t-session-env.c (show_stdnames): Indent output.
	* g10/test.c (TEST): Silence non-verbose okay output.
	(exit_tests): Ditto.
	* tools/gpg-zip.in (tar_verbose_opt): Add option --quiet.
	* tests/openpgp/gpgtar.test (GPGZIP): Pass option --quiet.
	* tests/openpgp/mds.test: Indent MD5 notice.
	* tests/openpgp/version.test: Indent --version output.

	gpg: Emit status lines TOFU_STATS and TOFU_STATS_LONG.
	* g10/tofu.c (NO_WARNING_THRESHOLD): Rename to BASIC_TRUST_THRESHOLD.
	(FULL_TRUST_THRESHOLD): New.
	(write_stats_status): New.
	(show_statistics): Call new function.  Print TOFU_STATS_LONG.

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

	gpg: Extend TRUST_foo status lines with the trust model.
	* g10/trustdb.h (TRUST_FLAG_TOFU_BASED): New.
	* g10/trustdb.c (trust_model_string): Lowercase the strings.  Add arg
	"model" and change callers to call with OPT.TRUST_MODEL.
	* g10/tofu.c (tofu_wot_trust_combine): Set TRUST_FLAG_TOFU_BASED.
	* g10/pkclist.c (write_trust_status): New.
	(check_signatures_trust): Call new function.

	gpg: Improve line wrapping for a tofu message.
	* g10/tofu.c (time_ago_str): Mark non-breakable spaces.
	(show_statistics): Remove marks.

	gpg: Re-format some tofu messages.
	* common/status.h (STATUS_TOFU_USER, STATUS_TOFU_STATS)
	(STATUS_TOFU_STATS_SHORT, STATUS_TOFU_STATS_LONG): New.
	* g10/tofu.c (NO_WARNING_THRESHOLD): New.
	(record_binding, tofu_register): Take care of --dry-run.
	(show_statistics): Print STATUS_TOFU_USER.  Reformat some messages.
	Fix the ngettext/strcmp thing.  Use log_string instead of log_info.
	Use NO_WARNING_THRESHOLD constant.
	(get_trust): Use format_text and print a compact fingerprint.

2016-05-02  NIIBE Yutaka  <gniibe@fsij.org>

	scd: More fix of error return path.
	* scd/command.c (open_card): Return GPG_ERR_ENODEV on the failure of
	apdu_connect.

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

	common: Extend log_string to indent lines.
	* common/logging.c (do_logv): Add indentation when called via
	log_string.

	gpg: Factor some code code out of tofu.c.
	* g10/tofu.c (string_to_long): New.
	(string_to_ulong): New.
	(get_single_unsigned_long_cb): Replace strtol/strtoul by new function.
	(get_single_long_cb): Ditto.
	(signature_stats_collect_cb):  Ditto.
	(get_policy): Ditto.
	(show_statistics): Ditto.  Uese es_free instead of free.

	gpg: Remove all assert.h and s/assert/log_assert/.

	common: Improve log_assert.
	* common/logging.c (bug_at): Do not i18n the string.
	(_log_assert): New.
	* common/logging.h (log_assert): Use new function and pass line
	information.

2016-04-28  NIIBE Yutaka  <gniibe@fsij.org>

	scd: Fix error return path.
	* scd/ccid-driver.c (bulk_in): Remove EAGAIN handling.
	Handle LIBUSB_ERROR_NO_DEVICE to return CCID_DRIVER_ERR_NO_READER.

2016-04-27  NIIBE Yutaka  <gniibe@fsij.org>

	scd: Fix memory leaks.
	* scd/ccid-driver.c (scan_or_find_usb_device): Return on
	LIBUSB_ERROR_NO_MEM.  Free CONFIG before return except on error.
	(scan_or_find_devices): Free device list.

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

	gpg: Add experimental AKL method "wkd" and option --with-wkd-hash.
	* g10/getkey.c (parse_auto_key_locate): Add method "wkd".
	(get_pubkey_byname): Implement that method.  Also rename a variable.
	* g10/call-dirmngr.c (gpg_dirmngr_wkd_get): New.
	* g10/keyserver.c (keyserver_import_wkd): New.
	* g10/test-stubs.c (keyserver_import_wkd): Add stub.
	* g10/gpgv.c (keyserver_import_wkd): Ditto.
	* g10/options.h (opt):  Add field 'with_wkd_hash'.
	(AKL_WKD): New.

	* g10/gpg.c (oWithWKDHash): New.
	(opts): Add option --with-wkd-hash.
	(main): Set that option.
	* g10/keylist.c (list_keyblock_print): Implement that option.

	dirmngr: Add experimental command WKD_GET.
	* dirmngr/server.c (cmd_wkd_get): New.
	(register_commands): Add command WKD_GET.

	dirmngr: Use system provided root CAs with KS_FETCH.
	* dirmngr/ks-engine-http.c (ks_http_fetch): Use HTTP_FLAG_TRUST_SYS.

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

	http: Allow to request system defined CAs for TLS.
	* dirmngr/http.h (HTTP_FLAG_TRUST_DEF, HTTP_FLAG_TRUST_SYS): New.
	* dirmngr/http.c (http_session_new): Add arg "flags".
	* dirmngr/ks-engine-hkp.c (send_request): Use new flag
	HTTP_FLAG_TRUST_DEF for the new arg of http_session_new.
	* dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
	* dirmngr/t-http.c (main): Ditto.

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

	common: Minor fixes for the new private-keys.c.
	* common/private-keys.c (my_error_from_syserror): New.  Use it in
	place of gpg_error_from_syserror.
	(_pkc_add, pkc_lookup, pke_next_value): Use ascii_strcasecmp.
	(pkc_parse): Use xtrystrdup and append_to_strlist_try as intended.

	(_pkc_add): Add braces around if-statement.

	common: Use new function to print a failure of xtrymalloc.
	* common/miscellaneous.c (xoutofcore): New.
	* common/strlist.c (append_to_strlist): Use instead of abort.
	(append_to_strlist_try): Use xtrymalloc instead of xmalloc.

2016-04-21  Justus Winter  <justus@g10code.com>

	common: Add support for the new extended private key format.
	* agent/findkey.c (write_extended_private_key): New function.
	(agent_write_private_key): Detect if an existing file is in extended
	format and update the key within if it is.
	(read_key_file): Handle the new format.
	* agent/keyformat.txt: Document the new format.
	* common/Makefile.am: Add the new files.
	* common/private-keys.c: New file.
	* common/private-keys.h: Likewise.
	* common/t-private-keys.c: Likewise.
	* common/util.h (alphap, alnump): New macros.
	* tests/migrations: Add test demonstrating that we can cope with the
	new format.

	common: Add 'free_strlist_wipe' which wipes memory.
	* common/strlist.c (free_strlist_wipe): New function.
	* common/strlist.h (free_strlist_wipe): New prototype.

	common: Add 'append_to_strlist_try' which can fail.
	* common/strlist.c (append_to_strlist): Use the new function.
	(append_to_strlist_try): New function.
	* common/strlist.h (append_to_strlist_try): New prototype.

	agent: Convert key format document to org.
	* agent/keyformat.txt: Convert to org mode.

	tests: Make migration test more robust and silent.
	* tests/migrations/from-classic.test: Fix in-tree build, silence test.

	Fixes-commit: defbc70b

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

	w32: Use --enable-gpg2-is-gpg by default.
	* autogen.rc: Add option also for plain Windows.

	w32: Replace libiconv DLL by iconv feature of libgpg-error.
	* configure.ac: Do nor require libiconv for W32.
	* common/utf8conv.c [W32]: Do not incluce iconv.h.  Request
	libgpg-error iconv macros.
	(jnlib_iconv): Use ICONV_CONST macro.
	* build-aux/speedo/w32/inst.nsi [!WITH_GUI]: Do not install libiconv.
	* build-aux/speedo.mk (speedo_spkgs) [!WITH_GUI]: Likewise.

2016-04-20  Justus Winter  <justus@g10code.com>

	agent: Sanitize permissions of the private key directory.
	* agent/gpg-agent.c (create_private_keys_directory): Set permissions.
	* common/sysutils.c (modestr_to_mode): New function.
	(gnupg_mkdir): Use new function.
	(gnupg_chmod): New function.
	* common/sysutils.h (gnupg_chmod): New prototype.
	* tests/migrations/from-classic.test: Test migration with existing
	directory.

	GnuPG-bug-id: 2312

	tests: Test the migration from a classic GnuPG home directory.
	* configure.ac: Add new directory.
	* tests/Makefile.am (SUBDIRS): Likewise.
	* tests/migrations/Makefile.am: New file.
	* tests/migrations/from-classic.gpghome/pubring.gpg.asc: Likewise.
	* tests/migrations/from-classic.gpghome/secring.gpg.asc: Likewise.
	* tests/migrations/from-classic.gpghome/trustdb.gpg.asc: Likewise.
	* tests/migrations/from-classic.test: Likewise.

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

	speedo: Use swdb.lst to define the SQLite version.
	* build-aux/speedo.mk: Change sqlite to use our mirror and the
	swdb.lst file.
	* build-aux/speedo/w32/inst.nsi: gpg is now build and installed as
	gpg.

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

	gpg: Improve UID selction of --quick-sign-key.
	* g10/keyedit.c (keyedit_quick_sign): Improve UID selection and print
	error for non-found userids.

	gpg: Avoid debug like output at start of --edit-key.
	* g10/keyedit.c (check_all_keysigs): Print info only after something
	has been modified.

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

	dirmngr: Fix https never reported in general help.
	* dirmngr/ks-engine-http.c (ks_hkp_help): Also print https
	when supported and no uri provided.

	dirmngr: Fix https incorrectly reported in help.
	* dirmngr/ks-engine-http.c (ks_hkp_help): Only print https if tls
	is supported.

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

	agent: Fix regression due to recent commit 4159567.
	* agent/protect.c (do_encryption): Fix CBC hashing.

	agent: Allow gpg-protect-tool to handle openpgp-native protection.
	* agent/protect-tool.c (read_and_unprotect): Add arg ctrl and pass to
	agent_unprotect.
	(main): Allocate a simple CTRL object and pass it to
	read_and_unprotect.
	(convert_from_openpgp_native): Remove stub.
	(agent_key_available, agent_get_cache): New stubs.
	(agent_askpin): New emulation for the one in call-pinentry.c.
	(agent_write_private_key): New to dump key.
	* agent/Makefile.am (gpg_protect_tool_SOURCES): Add cvt-openpgp.c

	tests: Set fake-pinentry's stdout and stdin to _IOLBF.
	* tests/openpgp/fake-pinentry.c (main): Call setvbuf.  Show passphrase
	at startup.  Increase buffer.

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

	agent: Implement new protection mode openpgp-s2k3-ocb-aes.
	* agent/protect.c (agent_protect): Add arg use_ocb.  Change all caller
	to pass -1 for default.
	* agent/protect-tool.c: New option --debug-use-ocb.
	(oDebugUseOCB): New.
	(opt_debug_use_ocb): New.
	(main): Set option.
	(read_and_protect): Implement option.

	* agent/protect.c (OCB_MODE_SUPPORTED): New macro.
	(PROT_DEFAULT_TO_OCB): New macro.
	(do_encryption): Add args use_ocb, hashbegin, hashlen, timestamp_exp,
	and timestamp_exp_len.  Implement OCB.
	(agent_protect): Change to support OCB.
	(do_decryption): Add new args is_ocb, aadhole_begin, and aadhole_len.
	Implement OCB.
	(merge_lists): Allow NULL for sha1hash.
	(agent_unprotect): Change to support OCB.
	(agent_private_key_type): Remove debug output.

	indent: Help Emacs not to get confused by conditional compilation.
	* agent/protect.c (calibrate_get_time) [W32]: Use separate function
	calls for W32 and W32CE.

2016-04-07  Justus Winter  <justus@g10code.com>

	g10: Fix exporting secret keys of certain sizes.
	* g10/build-packet.c (do_key): Do not use the header length specified
	by the public key packet from the keyring, but let 'write_header2'
	compute the required length.

2016-04-06  Justus Winter  <justus@g10code.com>

	Revert "g10: Support armored keyrings in gpgv."
	This reverts commit abb352de51bc964c06007fce43ed6f6caea87c15.

2016-04-05  Justus Winter  <justus@g10code.com>

	dirmngr: Autodetect PEM format in dirmngr-client.
	* dirmngr/dirmngr-client.c (init_asctobin): New function.
	(main): Move the initialization code to the new function.
	(read_pem_certificate): Initialize base64 table.
	(read_certificate): Try to decode certificates given in files as PEM
	first.

	GnuPG-bug-id: 1844

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

	build: Fix for: Build gpgcompose only in maintainer mode.
	* g10/Makefile.am (noinst_PROGRAMS): Always add module_tests.

	doc: Install gpg and gpgv man pages under the correct name.
	* doc/mkdefsinc.c (main): Add double include guard.  Set variable
	gpgtwohack. Define macros gpgname and gpgvname.
	* doc/gpg.texi: Remove macro definition for gpgname.  Use Texinfo var
	gpgtwohack to prepare the man pages.  Use @gpgname everywhere.
	* doc/gpgv.texi: Likewise.
	* doc/Makefile.am (myman_pages): Remove gpg2.1 and gpgv2.1 but add
	them depending on USE_GPG2_HACK.

	build: Build gpgcompose only in maintainer mode.
	* g10/Makefile.am (noinst_PROGRAMS): Add gpgcompose only in maintainer
	mode.

	gpg: Replace use of "gpg2" by GPG_NAME.

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

	Now build "gpg" binary but install as "gpg2"
	* configure.ac (USE_GPG2_HACK): New ac_define am_conditional.
	* common/homedir.c (gnupg_module_name): Replace use of macro
	NAME_OF_INSTALLED_GPG.
	* g10/keygen.c (generate_keypair): Ditto.
	* g10/Makefile.am (bin_PROGRAMS): Remove.
	(noinst_PROGRAMS): Add gpg or gpg2 and gpgv or gpg2.
	(gpg2_hack_list): New.
	(use_gpg2_hack): New.
	(gpg2_SOURCES): Rename to gpg_SOURCES.
	(gpgv2_SOURCES): Rename to gpgv_SOURCES.
	(gpg2_LDADD): Rename to gpg_LDADD.
	(gpgv2_LDADD): Rename to gpgv_LDADD.
	(gpg2_LDFLAGS): Rename to gpg_LDFLAGS.
	(gpgv2_LDFLAGS): Rename to gpgv2_LDFLAGS.
	(install-exec-hook): Remove WinCE specific rules and add new rules.
	(uninstall-local): Uninstall gpg/gpg2 and gpgv/gpgv2.
	* tests/openpgp/Makefile.am (required_pgms): s/gpg2/gpg/.
	* tests/openpgp/defs.inc: Ditto.
	* tests/openpgp/gpgtar.test: Ditto.
	* tests/openpgp/mkdemodirs: Ditto.
	* tests/openpgp/signdemokey: Ditto.

	* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Remove obsolete
	--enable-mailto, add --enable-gpg2-is-gpg.

	tests: Add missing file.
	* tests/openpgp/Makefile.am (TEST_FILES): Add plain-largeo.asc.

2016-04-04  Justus Winter  <justus@g10code.com>

	g10: Support armored keyrings in gpgv.
	* doc/gpgv.texi: Document the feature.
	* g10/Makefile.am (gpgv2_SOURCES): Add dearmor.c.
	* g10/dearmor.c (dearmor_file): Add sink argument.
	* g10/gpg.c (main): Adapt accordingly.
	* g10/gpgv.c (make_temp_dir): New function.
	(main): De-armor keyrings.
	* g10/main.h (dearmor_file): Adapt prototype.

	GnuPG-bug-id: 2290

	tests: Fix default key test.
	* tests/openpgp/default-key.test: Avoid using the option
	'--trust-model' unconditionally.

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

	build: Check for conflicting trust model options.
	* configure.ac: Disable TOFU if configured without trust models, and
	check for conflicting options.

	g10: Remove option --always-trust if compiled without trust models.
	* g10/gpg.c (opts): Remove option --always-trust if compiled without
	trust models.

2016-03-31  Justus Winter  <justus@g10code.com>

	speedo,w32: Build libsqlite3.
	* build-aux/speedo.mk (speedo_spkgs): Add libsqlite3 on w32.
	(libsqlite3_ver): New variable.
	(speedo_pkg_libsqlite3_tar): Likewise.

	g10: Use gpg-error abstraction of sched_yield.
	* g10/tofu.c (begin_transaction): Use 'gpgrt_yield'.

2016-03-29  Werner Koch  <wk@gnupg.org>

	gpg: Fix NULL-segv for missing tofu DB.
	* g10/tofu.c (opendb): Guard call to timeout function.

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

	gpg: Improve message when asking for key capabilities.
	* g10/keygen.c (ask_key_flags): Improve message.

	gpg: Remove the extra prompt for Curve25519.
	* g10/keygen.c (MY_USE_ECDSADH): New macro local to ask_curve.
	(ask_curve): Use a fixed table of curve names and reserve a slot for
	Curve448.  Simplify CurveNNNN/EdNNNN switching.
	(ask_curve): Remove the Curve25519 is non-standard prompt.

2016-03-19  Werner Koch  <wk@gnupg.org>

	gpg: Silence trustdb computation with --quiet.
	* g10/trustdb.c (validate_keys): Do not print log_info stuff in quiet
	mode.

2016-03-17  Werner Koch  <wk@gnupg.org>

	sm: Always create a keybox header when creating a new keybox.
	* sm/keydb.c (maybe_create_keybox): Create the header blob.

2016-03-17  Neal H. Walfield  <neal@g10code.com>

	doc: Improve documentation of --enable-large-rsa.
	* doc/gpg.texi (--enable-large-rsa): Improve text.

2016-03-17  NIIBE Yutaka  <gniibe@fsij.org>

	agent: allow removal of the shadowed key.
	* agent/findkey.c (agent_delete_key): Remove the key when asked.

2016-03-16  NIIBE Yutaka  <gniibe@fsij.org>

	g10: Add const qualifier.
	* g10/gpgcompose.c (show_help): Those are strings not to be modified.

2016-03-15  Werner Koch  <wk@gnupg.org>

	gpg: Do not rely on a certain evaluation order.
	* g10/keyedit.c (print_and_check_one_sig): Call check_key_signature
	before derefing IS_SELFSIG.

2016-03-14  Werner Koch  <wk@gnupg.org>

	scd: Add manufacturer id 0x000a.
	* g10/card-util.c (get_manufacturer): Add it.

2016-03-10  Kevin J. McCarthy  <kevin@8t8.us>

	g10: Silence message if --quiet is given.
	* g10/getkey.c (parse_def_secret_key): Silence message if --quiet is
	given.

2016-03-08  Neal H. Walfield  <neal@g10code.com>

	gpg: Add a new test.
	* g10/Makefile.am (EXTRA_DIST): Add t-stutter-data.asc.
	(module_tests): Add t-stutter.
	(t_stutter_SOURCES): New variable.
	(t_stutter_LDADD): New variable.

2016-03-07  Justus Winter  <justus@g10code.com>

	sm: Implement pinentry loopback and reading passphrases from fd.
	* doc/gpgsm.texi: Document '--pinentry-mode' and '--passphrase-fd'.
	* sm/Makefile.am (gpgsm_SOURCES): Add new files
	* sm/call-agent.c (struct default_inq_parm_s): New definition.
	(start_agent): Pass in the pinentry mode.
	(default_inq_cb): Handle 'PASSPHRASE' and 'NEW_PASSPHRASE' inquiries.
	Adapt all call sites to the new callback cookie.
	* sm/gpgsm.c (cmd_and_opt_values): Add new values.
	(opts): Add new options.
	(main): Handle new options.
	* sm/gpgsm.h (struct opt): Add field 'pinentry_mode'.
	* sm/passphrase.c: New file.
	* sm/passphrase.h: Likewise.

	GnuPG-bug-id: 1970

	sm: Remove unused argument '--fixed-passphrase'.
	* doc/gpgsm.texi: Drop description.
	* sm/gpgsm.c (cmd_and_opt_values): Drop enum value.
	(opts): Drop argument.
	(main): Drop argument handling.
	* sm/gpgsm.h (struct opt): Drop field 'fixed_passphrase'.

	kbx: Avoid undefined behavior.
	* kbx/keybox-file.c (_keybox_read_blob2): Cast to unsigned int before
	shifting.

2016-03-07  NIIBE Yutaka  <gniibe@fsij.org>

	scd: Bug fix for a device with multiple interfaces.
	* scd/ccid-driver.c (scan_or_find_usb_device): Use IFC_NO when
	accessing interface information.

2016-03-04  Justus Winter  <justus@g10code.com>

	build: Make libusb a hard requirement if the ccid driver is requested.
	* configure.ac: Print an error message and die if the internal ccid
	driver is requested but no suitable libusb is found.

	g10: Drop superfluous declaration.
	* g10/main.h (disable_core_dumps): Drop declaration.

	g10: Guard code against errors.
	* g10/keygen.c (do_generate_keypair): Check for errors, in which case
	'pri_psk' is NULL.

	Fixes-commit: bf9d1248

2016-03-03  Justus Winter  <justus@g10code.com>

	dirmngr: Add more missing CFLAGS.
	* dirmngr/Makefile.am (t_ldap_parse_uri_CFLAGS): Add
	'GCRYPT_CFLAGS'.
	(t_dns_stuff_CFLAGS): Likewise.

	GnuPG-bug-id: 2235

	tests/openpgp: Skip gpgtar test if it has not been built.
	* tests/openpgp/gpgtar.test: Check if executable exists.

	GnuPG-bug-id: 2261

2016-03-02  Neal H. Walfield  <neal@g10code.com>

	gpg: Add new program gpgcompose.
	* g10/packet.h: Include "util.h".
	* g10/encrypt.c (encrypt_seskey): Don't mark as static.
	* g10/gpgcompose.c: New file.
	* g10/Makefile.am (noinst_PROGRAMS): Add gpgcompose.
	(gpg2_SOURCES): Split everything but gpg.c into...
	(gpg_sources): ... this new variable.
	(gpgcompose_SOURCES): New variable.
	(gpgcompose_LDADD): Likewise.
	(gpgcompose_LDFLAGS): Likewise.

	gpg: More robustly detect valid non-armored OpenPGP messages.
	* g10/armor.c (is_armored): More robustly detect valid non-armored
	OpenPGP messages.

	common: Provide a function for mapping packet types to strings.
	* common/openpgpdefs.h (pkttype_str): New function.

	gpg: Rename pop_filter to iobuf_pop_filter and export it.
	* common/iobuf.c (pop_filter): Rename from this...
	(iobuf_pop_filter): ... to this.  Don't mark it as static.

	gpg: Split write_pubkey_enc_from_list.
	* g10/encrypt.c (write_pubkey_enc_from_list): Split the body of this
	function out into...
	(write_pubkey_enc): ... this new function.

	gpg: Allow the caller to write the contents of a plaintext packet.
	* g10/build-packet.c (do_plaintext): Change the semantics such that if
	PT->BUF is NULL, it is the caller's responsibility to write the
	content (and disable partial body length mode, if appropriate).

	gpg: Add a new function for creating binary notations.
	* g10/build-packet.c (blob_to_notation): New function.

	gpg: Refactor the printing of binary notations.
	* g10/build-packet.c (sig_to_notation): Break printing of binary
	notations into...
	(notation_value_to_human_readable_string): ... this new function.
	Provide a small preview of the binary data substituting non-printable
	characters with '?'.

2016-03-02  Uldis Anšmits  <uldis.ansmits@tieto.com>

	tests/openpgp: Make tests more portable.
	* tests/openpgp/default-key.test: Avoid 'grep -q'.
	* tests/openpgp/gpgtar.test: Avoid 'grep -qe' and 'diff -q'.
	* tests/openpgp/use-exact-key.test: Avoid 'grep -q'.

	GnuPG-bug-id: 2262

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

	common: Consolidate Assuan server argument handling.
	* common/Makefile.am (common_sources): Add new files.
	* common/server-help.c: New file.
	* common/server-help.h: Likewise.
	* agent/command.c: Drop argument handling primitives in favor of using
	the consolidated ones.
	* dirmngr/server.c: Likewise.
	* g10/server.c: Likewise.
	* g13/server.c: Likewise.
	* scd/command.c: Likewise.
	* sm/server.c: Likewise.

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

	dirmngr: Add missing CFLAGS.
	* dirmngr/Makefile.am (t_ldap_parse_uri_CFLAGS): Add
	'GPG_ERROR_CFLAGS'.
	(t_dns_stuff_CFLAGS): Likewise.

	tools: Drop superfluous include.
	* tools/gpgtar.c: Do not include unused 'npth.h'.

2016-02-26  Werner Koch  <wk@gnupg.org>

	gpg: Prettify a 2 octet hex output.
	* g10/sig-check.c (check_key_signature2): Wrap line and use %02x.

2016-02-25  Neal H. Walfield  <neal@g10code.com>

	gpg: Show debugging info if a sig with an unsupported sig class is used.
	* g10/sig-check.c (check_key_signature2): If SIG->CLASS is
	unsupported, show some debugging information.  Don't use BUG to fail.
	Just return GPG_ERR_BAD_SIGNATURE.

	gpg: More carefully encode a packet's length.
	* g10/build-packet.c (write_header2): Make sure the length bits are
	cleared.  Fail if HDRLEN is set and the specified length can't be
	encoded in the available space.

	gpg: Avoid directly twiddling bits.
	* g10/build-packet.c (do_plaintext): Use ctb_new_format_p to check the
	packet's format.
	(write_header2): Likewise.

	gpg: Add some asserts.
	* g10/build-packet.c (ctb_new_format_p): New function.
	(ctb_pkttype): New function.
	(do_user_id): Add some asserts.
	(do_key): Likewise.
	(do_symkey_enc): Likewise.
	(do_pubkey_enc): Likewise.
	(do_plaintext): Likewise.
	(do_encrypted): Likewise.
	(do_encrypted_mdc): Likewise.
	(do_compressed): Likewise.
	(do_signature): Likewise.
	(do_signature): Likewise.
	(write_header2): Likewise.

	gpg: Avoid an unnecessary copy.
	* g10/build-packet.c (sig_to_notation): Avoid an unnecessary copy of
	the data: the size of the packet is fixed.

2016-02-23  Neal H. Walfield  <neal@g10code.com>

	common: Reduce buffer size.
	* common/iobuf.c (iobuf_copy): Change buffer size from 1 MB to 32 KB.

	common: Improve a function's documentation and comments.
	* common/iobuf.c (iobuf_set_partial_body_length_mode): Fix
	documentation and comment.  Add an assert.

	common: Add log_assert.
	* common/logging.h (log_assert): New macro.

	gpg: Use higher-level functions.
	* g10/build-packet.c (do_symkey_enc): Use iobuf_write instead of
	iobuf_put in a loop.  Use iobuf_copy instead of iobuf_read and
	iobuf_write in a loop.  Move the memory wiping from here...
	* common/iobuf.c (iobuf_copy): ... to here.

	common: Check for an error before reading.
	* common/iobuf.c (iobuf_copy): If DEST has a pending error, don't
	start copying.

	common: More accurately name function.
	* common/iobuf.c (iobuf_set_partial_block_mode): Rename from this...
	(iobuf_set_partial_body_length_mode): ... to this.  Update callers.

2016-02-23  Werner Koch  <wk@gnupg.org>

	g13: Add commands --suspend and --remove.
	* g13/g13.c (aSuspend, aResume): New.
	(opts): Add commands --suspend and --resume.
	(main): Implement dummy command aUmount.  Implement commands aResume
	and aSuspend.
	* g13/sh-cmd.c (cmd_suspend): New.
	(cmd_resume): New.
	(register_commands): Add commands RESUME and SUSPEND.
	* g13/server.c (cmd_suspend): New.
	(cmd_resume): New.
	(register_commands): Add commands RESUME and SUSPEND.
	* g13/be-dmcrypt.c (be_dmcrypt_suspend_container): New.
	(be_dmcrypt_resume_container): New.
	* g13/backend.c (be_suspend_container): New.
	(be_resume_container): New.
	* g13/suspend.c, g13/suspend.h: New.
	* g13/mount.c (parse_header, read_keyblob_prefix, read_keyblob)
	(decrypt_keyblob, g13_is_container): Move to ...
	* g13/keyblob.c: new file.
	(keyblob_read): Rename to g13_keyblob_read and make global.
	(keyblob_decrypt): Rename to g13_keyblob_decrypt and make global.
	* g13/sh-dmcrypt.c (check_blockdev): Add arg expect_busy.
	(sh_dmcrypt_suspend_container): New.
	(sh_dmcrypt_resume_container): New.
	* g13/call-syshelp.c (call_syshelp_run_suspend): New.
	(call_syshelp_run_resume): New.

	g13: Run mount after dmsetup.
	* g13/g13-syshelp.c (main): Reject userids with a slash.
	* g13/sh-dmcrypt.c (sh_dmcrypt_mount_container): Run mount if a
	mountpoint is known.

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

	tests/openpgp: Qualify executables with extension.
	* tests/openpgp/Makefile.am (required_pgms): Qualify executables with
	'$EXEEXT'.

	tests/openpgp: Reimplement 'pinentry.sh' in c.
	* tests/openpgp/Makefile.am: Build new program.
	* tests/openpgp/defs.inc: Use the new program.
	* tests/openpgp/fake-pinentry.c: New file.

	tests/openpgp: Avoid dependency on source files.
	* tests/openpgp/plain-largeo.asc: New file.
	* tests/openpgp/version.test: Dearmor the new file instead of relying
	on the source being present.

	tests/openpgp: Fix file removal.
	* tests/openpgp/version.test: Fix file removal.

	common/exechelp: Provide a way to wait for multiple processes.
	* common/exechelp-posix.c (gnupg_wait_process): Generalize to
	'gnupg_wait_processes'.
	* common/exechelp-w32.c (gnupg_wait_process): Likewise.
	* common/exechelp-w32ce.c (gnupg_wait_process): New function stub.
	* common/exechelp.h (gnupg_wait_process): New prototype.

	common/exechelp: Add general pipe function.
	* common/exechelp-posix.c (gnupg_create_pipe): New function.
	* common/exechelp-w32.c (INHERIT_{READ,WRITE,BOTH}): New macros.
	(create_inheritable_pipe): Generalize so that both ends can be
	inherited.
	(do_create_pipe): Rename argument accordingly.
	(gnupg_create_{in,out}bound_pipe): Use new flags.
	(gnupg_create_pipe): New function.
	(gnupg_spawn_process): Use new flags.
	* common/exechelp-w32ce.c (gnupg_create_pipe): New stub.
	* common/exechelp.h (gnupg_create_pipe): New prototype.

	common/exechelp: Mute the Windows version.
	* common/exechelp-w32.c (gnupg_wait_process): Do not print an error if
	the exit code can be returned.  This makes the Windows version behave
	like the POSIX version.

	common/exechelp: Avoid magic numbers.
	* common/exechelp-w32.c (do_create_pipe): Use symbolic names.

	common/exechelp: Disable debugging by default.
	* common/exechelp-w32.c (DEBUG_W32_SPAWN): Set to 0.

	common/exechelp: Fix handle leak.
	* common/exechelp-w32.c (gnupg_spawn_process_detached): Close process
	handle.

	common/exechelp: Fix opening the 'nul' device.
	* common/exechelp-w32.c (gnupg_spawn_process): Fix opening the 'nul'
	device.

	common/exechelp: Fix error handling.
	* common/exechelp-w32.c (gnupg_spawn_process): Close the right handle.

	common/exechelp: Fix pipe creation.
	* common/exechelp-w32.c (gnupg_spawn_process): Fix the creation of the
	input pipe.

	tools/mk-tdata: Fix data generation on Windows.
	* tools/mk-tdata.c (main): Set stdout to binary mode to avoid newline
	conversion.

2016-02-19  Neal H. Walfield  <neal@g10code.com>

	gpg: Systematically detect and fix signatures that are out of order.
	* g10/keyedit.c (sig_comparison): New function.
	(fix_key_signature_order): Merge functionality into...
	(check_all_keysigs): ... this function.  Rewrite to eliminate
	duplicates and use a systematic approach to detecting and moving
	signatures that are out of order instead of a heuristic.
	(fix_keyblock): Don't call fix_key_signature_order.  Call
	check_all_keysigs instead after collapsing the uids.

	gpg: Split check_key_signature2.
	* g10/sig-check.c (hash_uid_node): Rename from this...
	(hash_uid_packet): ... to this.  Take a PKT_user_id instead of a
	KBNODE.
	(check_key_signature2): Split the basic signature checking
	functionality into...
	(check_signature_over_key_or_uid): ... this new function.

	gpg: Split print_and_check_one_sig.
	* g10/keyedit.c (print_and_check_one_sig): Split the print
	functionality into...
	(print_one_sig): ... this new function.

	gpg: Split the function check_signature_end.
	* g10/sig-check.c (check_signature_end): Break the basic signature
	check into...
	(check_signature_end_simple): ... this new function.

	gpg: Use format_keyid rather than manually formatting the keyid.
	* g10/keyedit.c (menu_addrevoker): Use format_keyid rather than
	manually formatting the keyid.
	* g10/keygen.c (card_write_key_to_backup_file): Likewise.

	gpg: Initialize the primary key when generating a key.
	* g10/keygen.c (do_generate_keypair): Initialize
	pri_psk->flags.primary, pri_psk->keyid and pri_psk->main_keyid.

	gpg: Add accessor & utility functions for pk->keyid and pk->main_keyid.
	* g10/keydb.h (keyid_cmp): New function.
	* g10/keyid.c (pk_keyid): New function.
	(pk_main_keyid): New function.
	(keyid_copy): New function.
	(pk_keyid_str): New function.
	* g10/packet.h (PKT_public_key): Update comments for main_keyid and
	keyid.

2016-02-18  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>

	gpgparsemail: Allow weirdly-mixed pkcs7 signatures.
	* tools/gpgparsemail.c: Add and check info->signing_protocol_2.

	gpg: Clean up dangling agent_open and agent_closed declarations.
	* g10/keydb.h: Remove agent_open, agent_close declarations/
	* g10/migrate.c: #include <unistd.h> for access()

2016-02-16  Werner Koch  <wk@gnupg.org>

	w32: Make scdaemon build again due to libusb problem.
	* configure.ac: Add hack to disable libusb for Windows.  Also use
	$host instead of $target in the switch
	 --

	The new test for libusb does not support cross-compiling.  As a quick
	workaround we disable libusb for Windows because we can't use it anyway.

	w32: Do not error out if gpgconf is not installed.
	* common/homedir.c (check_portable_app): Remove error message.

2016-02-16  Neal H. Walfield  <neal@g10code.com>

	gpg: Make ASCII armor decoding more robust to encoding errors.
	* g10/armor.c (radix64_read): If the = is followed by the string "3D",
	check if the following four characters are valid radix 64 and are
	followed by a new line.  If so, warn and ignore the '3D'.

2016-02-16  Werner Koch  <wk@gnupg.org>

	doc: Add a gnupg-module-overview picture.
	* doc/gnupg-module-overview.svg: New.
	* doc/debugging.texi (Component interaction): New.
	* doc/Makefile.am (EXTRA_DIST): Add PNG and PDF versions of
	gnupg-module-overview.svg.  Remove two eps files.
	(BUILT_SOURCES): Add gnupg-module-overview.pdf and .png.  Remove
	gnupg-card-architecture.epsl
	(gnupg_TEXINFOS): Add gnupg-module-overview.svg
	(gnupg.dvi): New.
	(DISTCLEANFILES): Remove build eps files.

2016-02-15  NIIBE Yutaka  <gniibe@fsij.org>

	common, g10: Fix indentation to silence GCC-6.
	* common/iobuf.c (iobuf_ioctl): Fix.
	* g10/encrypt.c (encrypt_filter): Likewise.
	* g10/keyring.c (prepare_search): Likewise.

	dirmngr: fix for memory alignment.
	* dirmngr/dns-stuff.c (get_dns_cert): Cast through void *.
	(getsrv, get_dns_cname): Make sure it's aligned for HEADER.

2016-02-14  Werner Koch  <wk@gnupg.org>

	gpg: Add hidden key-edit subcommand "change-usage".
	* g10/keyedit.c (cmdCHANGEUSAGE): New.
	(cmds): Add command "change-usage".
	(keyedit_menu): Handle that command.
	(menu_changeusage): New.
	* g10/keygen.c (keygen_add_key_flags): New.
	(ask_key_flags): Add optional arg current.

2016-02-14  Neal H. Walfield  <neal@g10code.com>

	gpg: Improve API documentation.
	* g10/seskey.c (make_session_key): Improve documentation.
	(encode_session_key): Improve documentation.
	* g10/encrypt.c (encrypt_seskey): Remove gratuitous initialization.
	* g10/dek.h (DEK): Improve documenation.

	gpg: Fix calc_header_length when LEN is 0 and improve documentation.
	* g10/build-packet.c (calc_header_length): Return the correct haeder
	size when LEN is 0.  Fix documentation.

	gpg: Fix format_keyid when dynamically allocating the buffer.
	* g10/keyid.c (format_keyid): Return a char *, not a const char *.  If
	BUFFER is NULL, then set LEN to the static buffer's size.

	common: Fix comment.
	* common/iobuf.c (iobuf_flush_temp): Fix comment.

2016-02-13  Werner Koch  <wk@gnupg.org>

	g13: Require a confirmation before g13 is used for DM-Crypt.
	* g13/g13-syshelp.c (g13_syshelp_i_know_what_i_am_doing):
	* g13/sh-dmcrypt.c (sh_dmcrypt_create_container): Call it.
	(sh_dmcrypt_mount_container): Call it.

	g13: Second chunk of code to support dm-crypt.
	* g13/be-dmcrypt.c, g13/be-dmcrypt.h: New.
	* g13/Makefile.am (g13_SOURCES): Add them.
	* g13/backend.c: Include be-dmcrypt.h and call-syshelp.h.
	(no_such_backend): Rename to _no_such_backend and provide replacement
	macro.
	(be_is_supported_conttype): Support DM-Crypt.
	(be_take_lock_for_create): Call set_segvice for DM-Crypt.
	(be_create_new_keys): Make it a dummy for DM-Crypt.
	(be_create_container): Call be_dmcrypt_create_container.
	(be_mount_container): call be_dmcrypt_mount_container.
	* g13/g13-syshelp.c (main): Enable verbose mode.
	* g13/g13tuple.c (get_tupledesc_data): New.
	* g13/g13tuple.h (unref_tupledesc): New.
	* g13/g13.h (server_control_): Add field "recipients".
	* g13/g13.c (main): Fix setting of recipients via cmdline.
	(g13_deinit_default_ctrl): Release recipients list.
	(g13_request_shutdown): New.  Replace all direct update of
	shutdown_pending by calls this function.
	* g13/server.c (server_local_s): Remove field recipients which is now
	part of CTRL.
	(reset_notify, cmd_recipient, cmd_create): Adjust for this change.
	* g13/create.c (encrypt_keyblob): Rename to g13_encrypt_keyblob.
	(g13_create_container): Support DM-Crypt.
	* g13/mount.c (parse_header): Allow for meta data copies.
	(g13_mount_container): Support DM-Crypt.
	* g13/sh-cmd.c (cmd_create): Make it work.
	(cmd_mount): New.
	* g13/sh-dmcrypt.c (sh_dmcrypt_create_container): Make it work.
	(sh_dmcrypt_mount_container): New.

	g13: Improve dump_keyblob.
	* g13/g13tuple.c: Include keyblob.h.
	(find_tuple_uint): Factor code out to ...
	(convert_uint): new.
	(all_printable): New.
	* g13/mount.c (dump_keyblob: Move and rename to ...
	* g13/g13tuple.c (dump_tupledesc): here.  Revamp and pretyy print uint
	values.

	g13: Define 3 new tags.
	* g13/keyblob.h (KEYBLOB_TAG_CONT_NSEC): New.
	(KEYBLOB_TAG_ENC_NSEC): New.
	(KEYBLOB_TAG_ENC_OFF): New.

	g13: Rename utils.c to g13tuple.c.
	* g13/utils.c: Rename to g13tuple.c.
	* g13/utils.h: Rename to g13tuple.h.  Change all users.
	* g13/Makefile.am: Adjust accordingly

	g13: Add functions to handle uint in a keyblob.
	* g13/utils.c (append_tuple_uint): New.
	(find_tuple_uint): New.
	* g13/t-utils.c: New.
	* g13/Makefile.am (noinst_PROGRAMS, TESTS): New.
	(module_tests, t_common_ldadd): New.
	(t_utils_SOURCES, t_utils_LDADD): New.

	g13: Re-factor high level create code.
	* g13/create.c (g13_create_container): Factor some code out to ...
	* g13/backend.c (be_take_lock_for_create): new.

	g13: Return an error for non-existing device.
	* g13/sh-cmd.c (cmd_device): Set ERR.

	g13: Fix releasing of a syshelp context.
	* g13/call-syshelp.c (call_syshelp_release): Allow a NULL arg.

	g13: Switch over to common/exectool.c.
	* g13/sh-exectool.c: Remove.  It has been replaced by common/exectool.c.
	* g13/Makefile.am (g13_syshelp_SOURCES): Remove sh-exectool.c
	* g13/sh-blockdev.c: Include exectool.h.  Change sh_exec_tool to
	gnupg_exec-tool.
	* g13/sh-dmcrypt.c: Ditto.

	common: Make gnupg_exec_tool conform to spec.
	* common/exectool.c (gnupg_exec_tool): Allocate extra byte.  Allow
	zero length read.  Append hidden byte.  Release memory on error.

	g13: First chunk of code to support dm-crypt.
	* g13/call-syshelp.c, g13/call-syshelp.h: New.
	* g13/g13-syshelp.c, g13/g13-syshelp.h: New.
	* g13/sh-cmd.c: New.
	* g13/sh-blockdev.c: New.
	* g13/sh-exectool.c: New.
	* g13/sh-dmcrypt.c: New.
	* g13/Makefile.am (sbin_PROGRAMS): Add g13-syshelp.c
	(g13_syshelp_SOURCES): New.
	(g13_syshelp_LDADD): New.

	* g13/g13.c (opts): Add option --type.
	(g13_deinit_default_ctrl): New.
	(main): Implement that option.  Call g13_deinit_default_ctrl.
	* g13/g13.h (struct call_syshelp_s): New declaration.
	(server_control_s): Add field syshelp_local.
	* g13/keyblob.h (KEYBLOB_TAG_CREATED): New.
	(KEYBLOB_TAG_ALGOSTR): New.
	(KEYBLOB_TAG_HDRCOPY): New.
	* g13/backend.c (be_parse_conttype_name): New.
	(be_get_detached_name): Add CONTTYPE_DM_CRYPT.

	tests: Remove some harmless warnings in regression tests.
	* tests/openpgp/gpg-agent.conf.tmpl: Remove --use-standard-socket.

2016-02-12  Neal H. Walfield  <neal@g10code.com>

	common: Change simple_query to ignore status messages.
	* common/simple-pwquery.c (simple_query): Ignore status messages.

2016-02-12  NIIBE Yutaka  <gniibe@fsij.org>

	g10: Make sure to have the directory for trustdb.
	* g10/tdbio.c (tdbio_set_dbname): Return earlier if !CREATE.  Check
	the directory and create it if none before calling take_write_lock.

2016-02-02  Neal H. Walfield  <neal@g10code.com>

	doc: Note that rngd can also be used to quickly generate insecure keys.
	* doc/gpg-agent.texi (Agent Options): Add comment to the description
	of --debug-quick-random that rngd can also be used to quickly generate
	key.

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

	scd: Fix size_t/int mismatch in libusb.
	* scd/ccid-driver.c (bulk_in, abort_cmd, ccid_poll): Change msglen to
	int.

	scd: Fix detection of libusb.
	* configure.ac (HAVE_LIBUSB): Clear if no header file was found.
	(LIBUSB_LIBS): Ditto.

	dirmngr: Build fix for FreeBSD (EAI macros)
	* dirmngr/dns-stuff.c (map_eai_to_gpg_error): Map EAI_NODATA and
	EAI_ADDRFAMILY only if defined.

2016-01-27  NIIBE Yutaka  <gniibe@fsij.org>

	scd: Migrate to new API of libusb 1.0.
	* configure.ac (LIBUSB_CPPFLAGS): New.
	* scd/Makefile.am (AM_CPPFLAGS): Add LIBUSB_CPPFLAGS.
	* scd/ccid-driver.c: Use libusb 1.0 API.

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

	Release 2.1.11.

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

	gpgtar,w32: Fix gpgtar 8 bit encoding handling on W32.
	* common/utf8conv.c (wchar_to_utf8): Factor code out to ...
	(wchar_to_cp): new.
	(utf8_to_wchar): Factor code out to ...
	(cp_to_wchar): new.
	(wchar_to_native): New.
	(native_to_wchar): New.
	* tools/gpgtar-create.c (fillup_entry_w32): Use native_to_wchar.
	(scan_directory): Use wchar_to_native.

2016-01-26  NIIBE Yutaka  <gniibe@fsij.org>

	g10: Fix segfault on unsupported curve.
	* g10/call-agent.c (learn_status_cb): Don't use NULL for strcmp.

	sm: small fix for GCC 6.
	* sm/export.c (insert_duptable): Use unsigned 0.

2016-01-25  Werner Koch  <wk@gnupg.org>
	    Daiki Ueno  <ueno@gnu.org>

	gpg: Print PROGRESS status lines during key generation.
	* g10/call-agent.c (cache_nonce_status_cb): Rewrite by using
	has_leading_keyword.  Handle PROGRESS lines.

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

	agent: Send PROGRESS status lines to the client.
	* agent/gpg-agent.c (struct progress_dispatch_s): New.
	(progress_dispatch_list): New.
	(main): Register libgcrypt pogress handler.
	(agent_libgcrypt_progress_cb): New.
	(agent_set_progress_cb): New.
	(unregister_progress_cb): New.
	(agent_deinit_default_ctrl): Call unregister.
	* agent/command.c (progress_cb): New.
	(start_command_handler): Register progress callback.

	speedo: Allow use of SHA-256 checksums.
	* build-aux/getswdb.sh: Add option --find-sha256sum.
	* build-aux/speedo.mk (libgpg_error_sha2): New var.  Also for all
	other packages.
	(SHA2SUM): New.
	(SETVARS, SETVARS_W64): Prefer sha256sum over sha1sum.
	(installer-from-source): Create swdb fragment.

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

	dirmngr: Indicate that serial numbers are hexadecimal.
	* dirmngr/misc.c (hexify_data): Add arg with_prefix.  Adjust all
	callers.
	* dirmngr/crlcache.c (cache_isvalid): Print "0x" in front of the S/N.

	dirmngr: Provide the keyserver pool name even if there is no CNAME.
	* dirmngr/ks-engine-hkp.c (map_host): Fix setting of r_poolname.

2016-01-22  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
	    wk@gnupg.org

	dirmngr: Use sks-keyservers CA by default for the hkps pool.
	* dirmngr/Makefile.am (dist_pkgdata_DATA): Add sks-keyservers.netCA.pem.
	* dirmngr/http.c (http_session_new): Add optional arg
	intended_hostname and set a default cert.
	* dirmngr/ks-engine-hkp.c (send_request): Pass httphost to
	http_session_new.

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

	gpg: Allow new user ids with only the mail address.
	* g10/keygen.c (ask_user_id): Allow empty name.

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

	gpg: Improve header text of the auto-created revocations.
	* g10/revoke.c (gen_standard_revoke): Improve header text for the
	file.  Add info output.

	gpg: Make --auto-key-retrieve work with dirmngr configured server.
	* g10/call-dirmngr.c (gpg_dirmngr_ks_list): Make R_KEYSERVER optional.
	* g10/keyserver.c (keyserver_any_configured): New.
	(keyserver_put): Remove arg keyserver because this will always receive
	opt.keyserver which is anyway used when connecting dirmngr.  Do not
	check opt.keyserver.
	(keyserver_import_cert): Replace opt.keyserver by
	keyserver_any_configured.
	* g10/mainproc.c (check_sig_and_print): Ditto.
	* g10/import.c (revocation_present): Ditto.
	* g10/getkey.c (get_pubkey_byname): Ditto.
	* g10/gpgv.c (keyserver_any_configured): Add stub.
	* g10/test-stubs.c (keyserver_any_configured): Add stub.

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

	gpg: Silence message about ignoring revoked user ids.
	* g10/trustdb.c (tdb_get_validity_core): Print message only in debug
	mode.

	agent: New option --pinentry-timeout.
	* agent/gpg-agent.c (oPinentryTimeout): New.
	(opts): Add new option.
	(parse_rereadable_options): PArse that option.
	(main): Tell gpgconf about this option.
	* agent/call-pinentry.c (start_pinentry): Send option to Pinentry.
	* tools/gpgconf-comp.c (gc_options_gpg_agent): Add Option.

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

	gpg: Streamline use of error messages in tofu.c.
	* g10/tofu.c: Make use of print_further_info to reduce the number of
	different error messages to be translated.  Also streamline some
	messages.

	common: Add substitute code for libgpg-error < 1.22.
	* common/util.h (GPG_ERR_DB_CORRUPTED): New.

	gpg: Add function print_further_info.
	* g10/misc.c (print_further_info): New.

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

	g10: Improve strings printed by tofu.c.
	* g10/tofu.c: Include ttyio.h.  Change many strings to help
	translating.  Make use of ngettext wehere needed.
	(CONTROL_L): New.
	(TIME_AGO_UNIT_SMALL_NAME): Remove this and all similar *_NAME macros.
	(time_ago_unit): Remove.
	(get_trust): Use tty_prints and cpr_get only for the actual prompt.
	Add Ctrl-L hack.
	(show_statistics): Use two English strings for singular and plural.

	* po/POTFILES.in: Add tofu.c.

	gpg: Use "days" in "...newer than..." diagnostics.
	* g10/sig-check.c (check_signature_metadata_validity): Use days if
	useful.

	Use ngettext for some strings.
	* scd/app-openpgp.c (build_enter_admin_pin_prompt): Use ngettext for
	some diagnostics.
	(do_genkey): Ditto.
	* g10/keyedit.c (check_all_keysigs, menu_delsig, menu_clean): Ditto.
	* g10/keylist.c (print_signature_stats): Ditto.
	* g10/keyserver.c (keyserver_refresh): Ditto.
	* g10/sig-check.c (check_signature_metadata_validity): Ditto.
	* g10/sign.c (do_sign): Ditto.
	* g10/trustdb.c (reset_trust_records): Ditto.
	(validate_keys): Use a table like diagnostic output.

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

	kbx,w32: Use shorter retry intervals for keybox_file_rename.
	* kbx/keybox-util.c (keybox_file_rename): Restart retry intervals
	after 800ms.

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

	w32: Fix deadlock introduced by keybox_file_rename.
	* g10/keyring.c (keyring_lock) [W32]: Flush the close cache before
	locking.
	* kbx/keybox-init.c (keybox_lock) [W32]: Close the file before
	locking.

	gpg: Detect race between pubring.gpg and pubring.kbx use.
	* g10/keydb.c (maybe_create_keyring_or_box): Detect race condition.

	kbx: New function keybox_file_rename to replace rename.
	* kbx/keybox-util.c: Include windows.h.
	(keybox_file_rename): New.
	* kbx/keybox-update.c (rename_tmp_file): Replace remove+rename by
	keybox_file_rename.
	* g10/keyring.c (rename_tmp_file): Ditto.

	kbx: Add function keybox_tmp_names to avoid code duplication.
	* kbx/keybox-update.c (create_tmp_file): Move some code to...
	* kbx/keybox-util.c (keybox_tmp_names): new.
	* g10/keyring.c: Include keybox.h.
	(create_tmp_file): Replace parts by keybox_tmp_names.

	gpg: Make --list-options show-usage the default.
	* g10/gpg.c (main): Add LIST_SHOW_USAGE.

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

	kbx: Change return type of search functions to gpg_error_t.
	* kbx/keybox-search.c (keybox_search_reset): Change return type to
	gpg_error_t.
	(keybox_search): Ditto.  Also handle GPG_ERR_EOF.
	* sm/keydb.c (keydb_search_reset): Ditto.

	gpg: Improve error code from lock_all.
	* g10/keydb.c (lock_all): Do not clobber RC during failur cleanup.

	kbx: Improve and fix keybox_lock.
	* kbx/keybox-init.c (keybox_lock): Make sure ERR is initialized.  Get
	error codes from dotlock functions.

	common: Make sure dotlock functions set a proper ERRNO.
	* common/dotlock.c (map_w32_to_errno): New.
	(read_lockfile): Return a proper ERRNO.
	(dotlock_create_unix): Do not let log functions clobber ERRNO.
	(dotlock_take_unix): Ditto.
	(dotlock_release_unix): Ditto.
	(dotlock_create_w32): Set proper ERRNO.
	(dotlock_take_w32): Ditto.
	(dotlock_release_w32): Ditto.

	kbx: Implement keybox_lock for use by gpg.
	* kbx/keybox-defs.h: Include dotlock.h and logging.h.
	(CONST_KB_NAME): Remove.  Replace usage by KB_NAME.
	(struct keybox_name): Add field "lockhd".
	* kbx/keybox-init.c (keybox_register_file): Init LOCKHD.
	(keybox_lock): Chnage to return gpg_error_t.  Implement locking.

	gpg: Make sure to mark a duplicate registered keybox as primary.
	* kbx/keybox-init.c (keybox_register_file): Change interface to return
	the token even if the file has already been registered.
	* g10/keydb.c (primary_keyring): Rename to primary_keydb.
	(maybe_create_keyring_or_box): Change return type to gpg_error_t.
	(keydb_add_resource): Ditto. s/rc/err/.
	(keydb_add_resource): Mark an already registered as primary.
	* sm/keydb.c (maybe_create_keybox): Change return type to gpg_error_t.
	(keydb_add_resource): Ditto. s/rc/err/.
	(keydb_add_resource): Adjust for changed keybox_register_file.

2016-01-13  NIIBE Yutaka  <gniibe@fsij.org>

	Fix to support git worktree.
	* autogen.sh, Makefile.am, doc/Makefile.am: Use -e for testing .git.

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

	ssh: Accept OpenSSH *cert-v01 key variants.
	* agent/command-ssh.c (SPEC_FLAG_WITH_CERT): New.
	(ssh_key_types): Add OpenSSH cert types.
	(stream_read_string): Allow a dummy read.
	(ssh_receive_mpint_list): Pass SPEC by reference.
	(ssh_receive_mpint_list): New arg CERT and use it.
	(ssh_receive_key): Read certificate into an estream object and modify
	parser to make use of that object.

2016-01-12  NIIBE Yutaka  <gniibe@fsij.org>

	common: Fix iobuf API of filter function for alignment.
	* common/iobuf.h: Fix comment.

	common: Fix iobuf API of filter function for alignment.
	* common/iobuf.h (IOBUFCTRL_DESC): Change the call semantics.
	* common/iobuf.c (iobuf_desc): Add the second argument DESC.
	(print_chain, iobuf_close, do_open, iobuf_sockopen, iobuf_ioctl)
	(iobuf_push_filter2, pop_filter, iobuf_write_temp): Change calls
	of iobuf_desc.
	(file_filter, file_es_filter, sock_filter, block_filter): Fill the
	description.
	* common/t-iobuf.c (every_other_filter, double_filter): Likewise.
	* g10/armor.c, g10/cipher.c, g10/compress-bz2.c, g10/compress.c,
	g10/decrypt-data.c, g10/encrypt.c, g10/mdfilter.c, g10/progress.c,
	g10/textfilter.c: Likewise.

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

	gpg: Fix NULL de-ref for ambiguous key check in --export-ssh-keys.
	* g10/getkey.c: Allow arg RET_KEYBLOCK to be NULL.

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

	tools: Remove gpgkey2ssh.
	* tools/gpgkey2ssh.c: Remove.
	* tools/Makefile.am (bin_PROGRAMS): Ditto.

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

	gpg: Support ECDSA keys with --export-ssh-key.
	* g10/export.c (key_to_sshblob): Add hack for ECDSA.

	gpg: New command --export-ssh-key.
	* g10/export.c: Include membuf.h and host2net.h.
	(key_to_sshblob): New.
	(export_ssh_key): New.
	* g10/gpg.c (aExportSshKey): New.
	(opts): Add command.
	(main): Implement that command.

	gpg: Add an exact search flag to the PK struct.
	* g10/getkey.c (merge_selfsigs_subkey): Clear exact flag.
	(finish_lookup): Set exact flag.
	* g10/packet.h (PKT_public_key): Add field flags.exact.

	Print warnings if old daemon versions are used.
	* common/status.h (STATUS_WARNING): New.
	* g10/call-agent.c (warn_version_mismatch): New.
	(start_agent): Call warn function.
	* g10/call-dirmngr.c: Include status.h.
	(warn_version_mismatch): New.
	(create_context): Call warn function.
	* sm/call-agent.c (warn_version_mismatch): New.
	(start_agent): Call warn function.
	(gpgsm_agent_learn): Call warn function.
	* sm/call-dirmngr.c (warn_version_mismatch): New.
	(prepare_dirmngr): Call warn function.

	common: New function compare_version_strings.
	* common/stringhelp.c (parse_version_number): New.
	(parse_version_string): New.
	(compare_version_strings): New.
	* common/t-stringhelp.c (test_compare_version_strings): New.
	(main): Call test.  Return ERRCOUNT instead of 0.

	common: New function get_assuan_server_version.
	* common/asshelp.c: Include membuf.h.
	(get_assuan_server_version): New.
	* g10/call-agent.c (agent_get_version): Use new function.

	common: New put_membuf_cb to replace static membuf_data_cb.
	* common/membuf.c (put_membuf_cb): New.
	* agent/call-scd.c (membuf_data_cb): Remove.  Change callers to use
	put_membuf_cb.
	* common/get-passphrase.c (membuf_data_cb): Ditto.
	* g10/call-agent.c (membuf_data_cb): Ditto.
	* sm/call-agent.c (membuf_data_cb): Ditto.

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

	gpg: Return an error code from keygrip_from_pk.
	* g10/keyid.c (keygrip_from_pk): Return an error code.

	gpg: Avoid warnings about possible NULL deref.
	* g10/getkey.c (cache_public_key): Protect deref of CE which actually
	can't happen.
	* g10/keygen.c (quickgen_set_para): s/sprintf/snprintf/.
	* g10/tofu.c (end_transaction, rollback_transaction): Allow NULL for
	DB.
	* g10/trustdb.c (update_min_ownertrust): Remove useless clearling of
	ERR.

	gpg: Fix warnings about useless assignments.
	* g10/armor.c (parse_hash_header): Remove duplicate var assignment.
	* g10/getkey.c (cache_user_id): Ditto.
	* g10/keygen.c (ask_curve): Ditto.  This also fixes a small memory
	leak.

	* g10/keygen.c (proc_parameter_file): Remove useless assignment or
	pointer increment.
	(generate_keypair): Ditto.
	* g10/getkey.c (finish_lookup, lookup): Ditto.
	* g10/card-util.c (change_pin): Ditto.
	* g10/gpg.c (main) <aVerify>: Ditto.
	* g10/import.c (import): Ditto.
	(print_import_check): Ditto
	* g10/keyring.c (do_copy): Ditto.
	* g10/tdbio.c (tdbio_read_record): Ditto.
	* g10/trustdb.c (tdb_update_ownertrust): Ditto.
	(update_validity): Ditto.

	* g10/server.c (cmd_passwd): Remove useless call to skip_options.

	sm: Avoid warnings about useless assignments.
	* sm/call-dirmngr.c (prepare_dirmngr): Remove setting of ERR.
	(unhexify_fpr): Remove useless computation on N.
	* sm/certchain.c (do_validate_chain): Remove clearing of RC.  Remove
	useless setting of RC.
	* sm/fingerprint.c (gpgsm_get_keygrip): Remove setting of RC.
	* sm/gpgsm.c (build_list): Replace final stpcpy by strcpy.
	* sm/keydb.c (keydb_clear_some_cert_flags): Remove clearing of RC.
	* sm/server.c (cmd_getauditlog): Comment unused skip_options.

	kbx: Avoid warnings about useless assignments.
	* kbx/keybox-dump.c (_keybox_dump_blob): Remove setting of IN_RANGE
	and the last increment of P.

	gpg: Fix DNS cert lookup returning an URL.
	* g10/call-dirmngr.c (dns_cert_status_cb): Store URL status in the URL
	param.  The old code was entirely buggy (c+p error).

2016-01-06  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>

	Fix keystrlen to work when OPT.KEYID_FORMAT is KF_DEFAULT.
	* g10/keyid.c (keystrlen): If opt.keyid_format is KF_DEFAULT unset,
	default to KF_SHORT.
	(format_keyid): Default to KF_SHORT, not KF_0xLONG.

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

	gpg: Silence some regression tests.
	* g10/test.c (TEST): Print diagnostics only in verbose mode.

	gpg: Avoid using an uninitialized SALT on premature EOF.
	* g10/parse-packet.c (parse_key): Check for premature end of salt.

	gpg: Silence warnings found by static analyzer.
	* g10/keyedit.c (change_passphrase): Remove useless init of ANY.
	(keyedit_quick_adduid): Remove useless setting of ERR.
	* g10/parse-packet.c (parse_key): Remove PKTLEN from condition because
	it has been checked before the loop.
	(parse_plaintext): Remove useless init of PKTLEN.

	kbx: Avoid faulty fclose in an error case.
	* kbx/keybox-update.c (blob_filecopy): Do not close an uninitialized
	file pointer after a failure to create a temp file.
	* kbx/keybox-openpgp.c (next_packet): Remove duplicate assignment of
	PKTLEN.

	dirmngr: Silence one regression test.
	* dirmngr/t-dns-stuff.c (main): Do not print info during standard
	"make check".

	common: Avoid warnings about useless assignments.
	* common/b64enc.c (b64enc_finish): Remove var assignment which is not
	used later.
	* common/iobuf.c (file_filter): Ditto.
	* common/tlv.c (do_find_tlv): Ditto.
	* common/userids.c (classify_user_id): Ditto.

	tests: Use info and error instead of a plain echo.
	* tests/openpgp/4gb-packet.test: Use error and info.

	common: Do not deref vars in tests after a fail().
	* common/t-convert.c (test_bin2hex): Turn if conditions into if-else
	chains to avoid accessing unchecked data.
	(test_bin2hexcolon): Ditto.
	* common/t-mapstrings.c (test_map_static_macro_string): Ditto.
	* common/t-stringhelp.c (test_percent_escape): Ditto.
	(test_make_filename_try): Ditto.
	(test_make_absfilename_try): Ditto.
	* common/t-timestuff.c (test_timegm): Ditto.

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

	gpg: Align notes about minimal keysize with actual checks.
	* g10/keygen.c (ask_keysize): Use 768 for the minimal value for DSA in
	export mode.  Improve readability.

2016-01-05  NIIBE Yutaka  <gniibe@fsij.org>

	agent: Fix RSA verification for card.
	* agent/pksign.c (agent_pksign_do): Use S-exp of public key, instead
	of shadowed key.

2016-01-04  Neal H. Walfield  <neal@g10code.com>

	gpg: Fix double free.
	* g10/getkey.c (get_pubkeys): Fix double free.

2015-12-24  NIIBE Yutaka  <gniibe@fsij.org>

	agent: IMPORT_KEY with --force option fix.
	* agent/cvt-openpgp.c (convert_from_openpgp_main): Add an option not
	to check existing key.
	(convert_from_openpgp): Ditto.
	(convert_from_openpgp_native): Call convert_from_openpgp_main with
	dontcare_exist=0.
	* agent/command.c (cmd_import_key): Call with dontcare_exist=force.

	g10: Use --force when importing key for bkuptocard.
	* g10/call-agent.c (agent_import_key): Add an argument FORCE.
	* g10/import.c (transfer_secret_keys): Likewise.
	(import_secret_one): Call transfer_secret_keys with FORCE=0.
	* g10/keyedit.c (keyedit_menu): Call with FORCE=1.

	g10: Remove subcommand checkbkupkey for --key-edit.
	* g10/keyedit.c (keyedit_menu): Remove cmdCHECKBKUPKEY support.

	g10: Allow relative path for specifying the file for bkuptocard.
	* g10/keyedit.c (keyedit_menu): Assume the file is under GNUPGHOME.
	Also support tilda expansion.

	g10: fix regression of bkuptocard subcommand in --edit-key.
	* g10/keyedit.c (keyedit_menu): Call transfer_secret_keys.
	* g10/import.c (transfer_secret_keys): Make it global function.
	Allow stats==NULL.

	agent: Support --force option for IMPORT_KEY.
	* agent/command.c (cmd_keywrap_key): New option --force.

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

	gpg: Rename struct pubkey to pukey_s and add pubkey_t.
	* g10/keydb.h (struct pubkey): Rename to pubkey_s.
	(pubkey_t): New.  Change all struct pubkey_s to use this type.
	* g10/getkey.c (get_pubkeys): Rename arg keys to r_keys.

	gpg: Simplify status message code from commit b30c15bf.
	* g10/keygen.c (card_write_key_to_backup_file): Simplify by using
	hexfingerprint.

	gpg: Add standard free() semantic to pubkey_free.
	* g10/getkey.c (pubkey_free): Check for NULL arg.

	gpg: Fix use of assert from commit dc417bf0.
	* g10/keydb.c (keydb_update_keyblock): De-ref after the assert.  Use
	%zu for size_t.

	gpg: Do not translate debug output.
	* g10/getkey.c (parse_def_secret_key): Do not make strings passed to
	log_debug translatable.

2015-12-23  NIIBE Yutaka  <gniibe@fsij.org>

	scd: Fix commit b30c15bf (again).
	* g10/keygen.c (do_generate_keypair): Clear the variable S.

2015-12-22  Neal H. Walfield  <neal@g10code.com>

	gpg: Fix type.
	* g10/keygen.c (card_write_key_to_backup_file): Change n to a size_t.

	gpg: Fix error message.
	* g10/getkey.c (parse_def_secret_key): Fix error message.

	gpg: Don't check for ambiguous keys.
	* g10/gpg.c (struct result): Move from here...
	* g10/keydb.h (struct pubkey): ... to here.  Update users.
	* g10/gpg.c (check_user_ids): Move from here...
	* g10/getkey.c (get_pubkeys): ... to here.  Update users.  Use
	get_pubkey_byname to look up the keys (this also prunes invalid keys).
	(pubkey_free): New function.
	(pubkeys_free): New function.
	* g10/gpg.c (main): Don't check for ambiguous key specifications.

	gpg: Lazily evaluate --default-key.
	* g10/gpg.c (main): If --encrypt-to-default-key is specified, don't
	add --default-key's value to REMUSR here...
	* g10/pkclist.c (build_pk_list): ... do it here.
	* tests/openpgp/Makefile.am (TESTS): Add default-key.test.
	* tests/openpgp/default-key.test: New file.

	gpg: Remove unused parameter.
	* g10/pkclist.c (build_pk_list): Remove parameter use, which is always
	called set to PUBKEY_USAGE_ENC.  Update callers.

	gpg: Improve check for ambiguous keys.
	* g10/gpg.c (check_user_ids): When checking for ambiguous keys, ignore
	encryption-only keys when a signing key is needed and vice-versa.

	gpg: Fix TOCTTOU when updating keyblocks.
	* g10/keydb.c (keydb_update_keyblock): Don't replace the record at the
	current offset.  After taking the lock, extract the fingerprint from
	the keyblock, find it and then replace it.

	Only add the user supplied CFLAGS after running any autoconf tests.
	* configure.ac: Only add the user supplied CFLAGS after running any
	autoconf tests.

	gpg: Suppress a warning.
	* dirmngr/dns-stuff.c (enable_dns_tormode): Reference new_circuit to
	avoid a warning when ADNS is not available.

	gpg: Remove dead code.
	* kbx/keybox-defs.h (struct keybox_found_s): Remove unused fields
	offset and n_packets.

	gpg: Display the key that is invalid, not the search description.
	* g10/getkey.c (parse_def_secret_key): Display the key that is
	invalid, not the search description.

	gpg: Mark more options as coming from the config file (when this holds)
	* g10/gpg.c (main): When --default-key or --encrypt-to-default-key is
	taken from the config file, note this.

	gpg: Use enums instead of defines.
	* g10/keydb.h (PK_LIST_ENCRYPT_TO): Change from a macro to an enum.
	(PK_LIST_HIDDEN): Likewise.
	(PK_LIST_CONFIG): Likewise.
	(PK_LIST_SHIFT): Likewise.n

2015-12-21  NIIBE Yutaka  <gniibe@fsij.org>

	po: Update Japanese translation.

	g10: clean up of headers for card.
	* g10/main.h (save_unprotected_key_to_card): Remove.
	* g10/options.h (ctapi_driver, pcsc_driver, disable_ccid): Remove.

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

	common: New file fwddecl.h.
	* common/util.h (server_control_s, ctrl_t): Move to ...
	* common/fwddecl.h: New file.
	* common/call-gpg.h: Replace typedef by fwddecl.h.  Change include
	protection macro name.
	* common/Makefile.am (common_sources): Add fwddecl.h.

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

	build: Add required macro for pkg-config.
	* configure.ac (PKG_PROG_PKG_CONFIG): New.

2015-12-18  NIIBE Yutaka  <gniibe@fsij.org>

	g10: Remove deprecated internal functions.
	* g10/keygen.c (do_ask_passphrase, generate_raw_key)
	(gen_card_key_with_backup, save_unprotected_key_to_card): Remove.

	g10: Fix a regression for generating card key with backup.
	* g10/main.h (receive_seckey_from_agent): Declare.
	* g10/keygen.c (card_write_key_to_backup_file): New.
	(card_store_key_with_backup): New.
	(do_generate_keypair): Create a key on host for encryption key when
	backup is requested.  Then, call card_store_key_with_backup.

2015-12-17  NIIBE Yutaka  <gniibe@fsij.org>

	g10: factor out a function for secret key retrieval.
	* g10/export.c (receive_seckey_from_agent): New.
	(do_export_stream): Use it.

2015-12-16  Neal H. Walfield  <neal@g10code.com>

	gpg: When checking for ambiguous keys, ignore invalid keys.
	* g10/gpg.c (check_user_ids): When checking for ambiguous keys, ignore
	disabled, revoked and expired keys (if appropriate for the provided
	option).

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

	common: Use default_errsource for call-gpg and exectool.
	* common/call-gpg.c (my_error_from_syserror, my_error_from_errno): New.
	Use these wrappers.
	* common/exectool.c (my_error_from_syserror): New.  Use these
	wrappers.

	gpg: Reduce number of strings to translate.
	* g10/getkey.c (parse_def_secret_key): Do not make debug messages
	translatable.  Make use of print_reported_error.

	gpg: New function to printed a detailed error code.
	* g10/misc.c (print_reported_error): New.

2015-12-15  Neal H. Walfield  <neal@g10code.com>

	gpg: Improve the keyblock cache's transparency.
	* kbx/keybox-search.c (keybox_seek): New function.
	* g10/keydb.c (keydb_search): When reading from the cache, seek to
	just after the cached record.

	gpg: Improve the keyblock cache's transparency.
	* kbx/keybox-search.c (keybox_offset): New function.
	* g10/keydb.c (struct keyblock_cache): Add fields resource and offset.
	(keyblock_cache_clear): Reset HD->KEYBLOCK_CACHE.RESOURCE and
	HD->KEYBLOCK_CACHE.OFFSET.
	(keydb_search): Don't use the cached result if it comes before the
	current file position.  When caching an entry, also record the
	position at which it was found.

	gpg: Use more descriptive names.
	* g10/keyring.c (KR_NAME): Rename this...
	(KR_RESOURCE): ... to this.  Update users.
	(struct keyring_name): Rename this...
	(struct keyring_resource): ... to this.  Update users.
	(struct off_item): Rename this...
	(struct key_present): ... to this.  Update users.
	(OffsetHashTable): Rename this...
	(key_present_hash_t): ... to this.  Update users.
	(kr_offtbl): Rename this...
	(key_present_hash): ... to this.  Update users.
	(kr_offtbl_ready): Rename this...
	(key_present_hash_ready): ... to this.  Update users.
	(KEY_PRESENT_HASH_BUCKETS): New define.  Replace use of literals
	with this.
	(new_offset_item): Rename this...
	(key_present_value_new): ... to this.  Update users.
	(release_offset_items): Drop dead code.
	(new_offset_hash_table): Rename this...
	(key_present_hash_new): ... to this.  Update users.
	(release_offset_hash_table): Drop dead code.
	(lookup_offset_hash_table): Rename this...
	(key_present_hash_lookup): ... to this.  Update users.
	(update_offset_hash_table): Rename this...
	(key_present_hash_update): ... to this.  Drop unused parameter off.
	Update users.
	(update_offset_hash_table_from_kb): Rename this...
	(key_present_hash_update_from_kb): ... to this.  Drop unused parameter
	off.  Update users.

2015-12-15  NIIBE Yutaka  <gniibe@fsij.org>

	sm: Handle gcry_pk_encrypt return value.
	* sm/encrypt.c (encrypt_dek): Don't ignore failure of gcry_pk_encrypt.

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

	common: Change license of isascii.c to all-premissive,
	* common/isascii.c: Change.

	common: Change license of some modules to LGPLv3+/GPLv2+.
	* common/status.c: Change from GPLv3 to LGPLv3+/GPLv2+.
	* common/status.h: Ditto.
	* common/yesno.c: Ditto.
	* common/common-defs.h: Ditto.
	* common/gettime.h: Ditto.
	* common/keyserver.h: Ditto.

	common: Change license for exectool to LGPLv3+/GPLv2+.
	* common/exectool.c, common/exectool.h: Change license.

	common: Rename sh-exectool to exectool.
	* common/sh-exectool.c: Rename to exectool.c.
	* common/sh-exectool.h: Rename to exectool.h.
	* common/Makefile.am (common_sources): Adjust for rename.
	* common/exectool.c (sh_exec_tool_stream): Rename to
	gnupg_exec-tool-stream.
	(sh_exec_tool): Rename to gnupg_exec_tool.
	* tools/gpgtar-create.c (gpgtar_create): Adjust for changes.
	* tools/gpgtar-extract.c: Adjust for changes.
	* tools/gpgtar-list.c: Adjust for changes.

2015-12-14  Damien Goutte-Gattat  <dgouttegattat@incenp.org>

	gpg: Print ownertrust in TOFU+PGP trust model.
	* g10/keyedit.c: Print ownertrust in TOFU+PGP trust model.

2015-12-14  Neal H. Walfield  <neal@g10code.com>

	gpg: Fix --default-key checks.
	* g10/getkey.c (parse_def_secret_key): Don't just check if a secret
	key is available for the public key, also consider subkeys.  Also
	check that the key has the signing capability, is not revoked, is not
	expired and is not disabled.  Print a warning if there was a least one
	value passed to --default-key and all were ignored.

2015-12-14  NIIBE Yutaka  <gniibe@fsij.org>

	scd: Fix regression for generating RSA keys on card.
	* scd/app-openpgp.c (do_genkey): Strip leading zeros for fingerprint
	computation.

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

	gpg: Use a regular type instead of a void* for import stats.
	* g10/import.c (struct stats_s): Rename to import_stats_s.  Change all
	users.
	* g10/main.h (import_stats_t): New.  Change fucntions to use this
	instead of a void pointer.

	Remove replacements for libgpg-error < 1.21.
	* common/util.h: Remove replacement macros for libgpg-error<1.21.
	* common/types.h: Ditto.
	* common/mischelp.h: Ditto.
	* common/t-mapstrings.c: Include t-support.h before stringhelp.h
	* common/t-stringhelp.c: Ditto.
	* common/t-support.h: Always include gpg-error.h.
	* kbx/keybox-search.c: Do not include stringhelp.h so that keybox-defs
	comes first.

2015-12-11  Neal H. Walfield  <neal@g10code.com>

	gpg: Fix buffer overflow.
	* g10/keydb.c (keydb_search_desc_dump): Fix buffer overflow.

2015-12-11  Justus Winter  <justus@g10code.com>

	agent: Improve error handling.
	* agent/pksign.c (agent_pksign_do): Improve error handling.

	Fix required libgpg-error version.
	* configure.ac (NEED_GPG_ERROR_VERSION): We need version 1.21 for the
	poll interface.

2015-12-11  Neal H. Walfield  <neal@g10code.com>

	gpg: Don't error out if a key occurs multiple times in the keyring.
	* g10/gpg.c (check_user_ids): Don't error out if a key occurs multiple
	times in the keyring.  Instead, print a warning.  When printing out
	fingerprint prints, use format_hexfingerprint to format them.

2015-12-10  Daniel Hoffend  <dh@dotlan.net>

	scd: Fix removal of unplugged usb readers on Windows.
	* scd/apdu.c (pcsc_error_to_sw): map PCSC_E_NO_SERVICE and
	PCSC_E_SERVICE_STOPPED to the internal SW_HOST_NO_READER error code.

2015-12-07  Justus Winter  <justus@g10code.com>

	tests: Add some more gpgtar tests.
	* tests/openpgp/gpgtar.test: Add more tests.

	dirmngr: Initialize http status code.
	* dirmngr/ks-action.c (ks_action_search): Initialize 'http_status' as
	it is unused if LDAP is used to search for keys.

2015-12-04  Daiki Ueno  <ueno@gnu.org>

	gpg: Write ERROR status on delete-key cancellation.
	* g10/delkey.c (do_delete_key): Write ERROR status code with the error
	location "delete_key.secret", when the user cancelled the operation on
	Pinentry.

2015-12-04  Justus Winter  <justus@g10code.com>

	dirmngr: Stricter handling of http error codes.
	* dirmngr/ks-action.c (ks_action_search): Only retry if the keyserver
	responded with a '404 Not Found'.
	* dirmngr/ks-engine-hkp.c (send_request): Return http status code.
	(ks_hkp_search): Likewise.
	(ks_hkp_{get,put}): Adapt call to 'send_request'.
	* dirmngr/ks-engine.h (ks_hkp_search): Update prototype.

	dirmngr: Really search all keyservers for patterns.
	* dirmngr/ks-action.c (ks_action_search): Search all configured
	keyservers for the given patterns.

	GnuPG-bug-id: 1038

	dirmngr: Handle http status '501 Not Implemented'.
	* dirmngr/ks-engine-hkp.c (send_request): Handle status 501 and return
	GPG_ERR_NOT_IMPLEMENTED.

	GnuPG-bug-id: 1221

	tools/gpgtar: Implement symmetric encryption.
	* tests/openpgp/gpgtar.test: Add test case.
	* tools/gpgtar-create.c (gpgtar_create): Pass '--symmetric' flag to
	gpg.
	* tools/gpgtar.c (parse_arguments): We do handle the argument now.

	tools/gpgtar: Implement signing.
	* tests/openpgp/gpgtar.test: Test signing.
	* tools/gpgtar-create.c (gpgtar_create): Add 'sign' option, add the
	appropriate gpg arguments to implement signing and selecting the local
	user.
	* tools/gpgtar.c (parse_options): We do handle '--local-user' now.
	(main): Handle signing, encrypting, and doing both when creating an
	archive.
	* tools/gpgtar.h (gpgtar_create): Update prototype.

	tools/gpgtar: Use the new exectool helper.
	* tools/Makefile.am: gpgtar now requires neither npth nor libassuan.
	* tools/gpgtar-create.c (gpgtar_create): Use the new 'sh-exectool'
	helper.
	* tools/gpgtar-extract.c (gpgtar_extract): Likewise.
	* tools/gpgtar-list.c (gpgtar_list): Likewise.
	* tools/gpgtar.c (main): Set default gpg program.  Drop the
	initialization of npth and libassuan.

	common: Add a stream interface to 'sh-exectool'.
	* common/sh-exectool.c (struct copy_buffer): Add infrastructure for
	copying between streams.
	(copy_buffer_{init,shred,do_copy,flush}): New functions.
	(sh_exec_tool_stream): Rework 'sh_exec_tool' to operate on streams.
	(nop_free): New function.
	(sh_exec_tool): Express this in terms of 'sh_exec_tool_stream'.
	* common/sh-exectool.h (sh_exec_tool_stream): New prototype.

	common: Add header file and build the new code.
	* common/Makefile.am (common_sources): Add new files.
	* common/sh-exectool.h: New file.

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

	common: Add code to execute a helper.
	* common/sh-exectool.c: New file.

	Release 2.1.10.

2015-12-04  NIIBE Yutaka  <gniibe@fsij.org>

	po: Japanese translation.

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

	speedo,w32: Improve installer.
	* build-aux/speedo/w32/inst.nsi (SEC_gnupg): Install dirmngr.conf and
	distsigkey.gpg.
	(un.gnupglast): Stop dirmngr.

	gpg: Do not pre-check keys given on the command line.
	* g10/keydb.h (PK_LIST_ENCRYPT_TO, PK_LIST_HIDDEN, PK_LIST_CONFIG)
	(PK_LIST_SHIFT): New.
	* g10/pkclist.c (build_pk_list): Use them here.
	* g10/gpg.c (check_user_ids, main): Ditto.

	* g10/gpg.c (main): Set PK_LIST_CONFIG for REMUSR and LOCUSR.
	(check_user_ids): Skip check for command line specified options.

	dirmngr: Add command to print the resolver version.
	* dirmngr/server.c (cmd_getinfo): Add sub-command "dnsinfo".

	gpg: Allow "help" as value for --tofu-policy.
	* g10/gpg.c (parse_tofu_policy): Add keyword "help".
	(parse_tofu_db_format): Ditto.

	Do not translate messages printed with log_debug.
	* common/asshelp.c (start_new_gpg_agent): Do not i18n string.
	(start_new_dirmngr): Ditto.
	* g10/mainproc.c (proc_encrypted): Ditto.  Print only if debug is
	enabled.

2015-12-04  NIIBE Yutaka  <gniibe@fsij.org>

	scd: Fix for removing the prefix.
	* scd/app-openopg.c (do_decipher): Fix the condition.

	scd: Simplify saving application context.
	* scd/app.c (lock_table): Remove LAST_APP field.
	(lock_reader, app_dump_state, application_notify_card_reset)
	(release_application): Follow the change.
	(check_conflict): New.
	(check_application_conflict): Lock the slot and call check_conflict.
	(select_application): Call check_conflict and not use LAST_APP.

	scd: More fix for Curve25519 prefix handling.
	* scd/app-openpgp.c (do_decipher): Handle trancated cipher text.
	Also fix xfree bug introduced.

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

	scd: Another fix for Curve25519 prefix handling.
	* scd/app-openpgp.c (do_decipher): Check 0x02 also for 16+1 byte long
	INDATA.
	(do_decipher): Fix integer arithmetic in void pointer.
	(do_decipher): Add missing memcpy.

	build: Avoid dependecy problems in "make distcheck".
	* doc/Makefile.am (gnupg.texi): Depend on defs.inc.

	build: Change how caller provided CFLAGS are used by configure.
	* configure.ac: Append instead of prepend caller provided CFLAGS.

	gpg: Add variant of 'key "%s" not found: %s' error message.
	* g10/gpg.c (check_user_ids): Change error message.
	* g10/delkey.c (do_delete_key): Ditto.

	gpg: Make keyidlist more robust in case of errors.
	* g10/keyserver.c (keyidlist): Clear *KLIST on error.

	gpg: Take care of keydb_new returning NULL.
	* g10/keydb.c (keydb_new): Print an error message if needed.  Also use
	xtrycalloc because we return an error anyway.
	* g10/delkey.c (do_delete_key): Handle error retruned by keydb_new.
	* g10/export.c (do_export_stream): Ditto.
	* g10/getkey.c (get_pubkey): Ditto.
	(get_pubkey_fast): Ditto.
	(get_pubkeyblock): Ditto.
	(get_seckey): Ditto.
	(key_byname): Ditto.
	(get_pubkey_byfprint): Ditto.
	(get_pubkey_byfprint_fast): Ditto.
	(parse_def_secret_key): Ditto.
	(have_secret_key_with_kid): Ditto.
	* g10/import.c (import_one): Ditto.
	(import_revoke_cert): Ditto.
	* g10/keyedit.c (keyedit_quick_adduid): Ditto.
	* g10/keygen.c (quick_generate_keypair): Ditto.
	(do_generate_keypair): Ditto.
	* g10/trustdb.c (validate_keys): Ditto.
	* g10/keyserver.c (keyidlist): Ditto.
	* g10/revoke.c (gen_desig_revoke): Ditto.
	(gen_revoke): Ditto.
	* g10/gpg.c (check_user_ids): Ditto.
	(main): Do not print an error message for keydb_new error.
	* g10/keylist.c (list_all): Use actual error code returned by
	keydb_new.

	* g10/t-keydb-get-keyblock.c (do_test): Abort on keydb_new error.
	* g10/t-keydb.c (do_test): Ditto.

	* g10/keyring.c (keyring_new): Actually return an error so that the
	existing keydb_new error checking makes sense for a keyring resource.
	(keyring_rebuild_cache): Take care of keyring_new returning an error.

	gpg: Change some error messages.
	* g10/getkey.c (parse_def_secret_key): Change error message.  Replace
	log_debug by log_info.
	* g10/gpg.c (check_user_ids): Make function static.  Change error
	messages.
	(main): Change error messages.
	* g10/revoke.c (gen_revoke): Ditto.

2015-12-03  NIIBE Yutaka  <gniibe@fsij.org>

	scd: Fix "Conflicting usage" bug.
	* scd/apdu.c (apdu_close_reader): Call CLOSE_READER method even if we
	  got an error from apdu_disconnect.
	* scd/app-common.h (no_reuse): Remove.
	* scd/app.c (application_notify_card_reset): Deallocate APP here.
	(select_application, release_application): Don't use NO_REUSE.

	scd: Fix for Curve25519 prefix handling.
	* scd/app-openpgp.c (do_decipher): More condition for AES decipher.
	  Handle the prefix in cipher text.  Always add the prefix in result.

2015-12-03  Neal H. Walfield  <neal@g10code.com>

	gpg: Use the matching key if the search description is exact.
	* g10/gpg.c (check_user_ids): If the search description is for an
	exact match (a keyid or fingerprint that ends in '!'), then use the
	matching key, not the primary key.
	* tests/openpgp/Makefile.am (TESTS): Add use-exact-key.test.
	(priv_keys): Add privkeys/00FE67F28A52A8AA08FFAED20AF832DA916D1985.asc,
	privkeys/1DF48228FEFF3EC2481B106E0ACA8C465C662CC5.asc,
	privkeys/A2832820DC9F40751BDCD375BB0945BA33EC6B4C.asc,
	privkeys/ADE710D74409777B7729A7653373D820F67892E0.asc and
	privkeys/CEFC51AF91F68A2904FBFF62C4F075A4785B803F.asc.
	(sample_keys): Add
	samplekeys/E657FB607BB4F21C90BB6651BC067AF28BC90111.asc.
	* tests/openpgp/privkeys/00FE67F28A52A8AA08FFAED20AF832DA916D1985.asc:
	New file.
	* tests/openpgp/privkeys/1DF48228FEFF3EC2481B106E0ACA8C465C662CC5.asc:
	New file.
	* tests/openpgp/privkeys/A2832820DC9F40751BDCD375BB0945BA33EC6B4C.asc:
	New file.
	* tests/openpgp/privkeys/ADE710D74409777B7729A7653373D820F67892E0.asc:
	New file.
	* tests/openpgp/privkeys/CEFC51AF91F68A2904FBFF62C4F075A4785B803F.asc:
	New file.
	* tests/openpgp/samplekeys/E657FB607BB4F21C90BB6651BC067AF28BC90111.asc:
	New file.
	* tests/openpgp/use-exact-key.test: New file.
	* tests/openpgp/version.test: Install the new private keys.

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

	build: Require at least Libassuan 2.4.1.
	* configure.ac (NEED_LIBASSUAN_VERSION): Set to 2.4.1.
	* agent/gpg-agent.c (create_server_socket): Remove check for
	libassuan >= 2.3.0 and >= 2.1.4.
	(main): Remove check for libassuan >= 2.1.4.
	* scd/scdaemon.c (create_server_socket): Remove check for
	libassuan >= 2.1.4.
	* dirmngr/dirmngr.c (set_tor_mode): Remove check for
	libassuan >= 2.3.0.
	* dirmngr/http.c (http_raw_connect, send_request): Remove checks for
	libassuan >= 2.3.0.

2015-12-02  Neal H. Walfield  <neal@g10code.com>

	gpg: Improve documentation.
	* g10/tofu.c (initdb): Improve documentation.

	gpg: Fix type mismatch resulting in a buffer overflow.
	* g10/tofu.c (record_binding): Change policy_old's type from an enum
	tofu_policy to a long: this variable is passed by reference and a long
	is expected.

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

	dirmngr: Switch to an onion address if Tor is running.
	* dirmngr/dirmngr.h (opt): Turn field 'keyserver' into an strlist.
	* dirmngr/dirmngr.c (parse_rereadable_options): Allow multiple
	--keyserver options.
	* dirmngr/server.c (server_local_s): Add field 'tor_state'.
	(release_uri_item_list): New.
	(release_ctrl_keyservers): Use it.
	(start_command_handler): Release list of keyservers.
	(is_tor_running): New.
	(cmd_getinfo): Re-implement "tor" subcommand using new fucntion.
	(ensure_keyserver): Rewrite.
	* g10/dirmngr-conf.skel: Add two keyserver options.

	http: Enhance parser to detect .onion addresses.
	* dirmngr/http.h (parsed_uri_s): Add flag 'onion'.
	* dirmngr/http.c (do_parse_uri): Set that flag.
	* dirmngr/t-http.c (main): Print flags.

2015-12-02  Neal H. Walfield  <neal@g10code.com>

	common,gpg: Fix processing of search descriptions ending in '!'.
	* g10/gpg.c (check_user_ids): If the search description describes a
	keyid or fingerprint and ends in a '!', include the '!' in the
	rewritten description.
	* common/userids.c (classify_user_id): Accept keyids and fingerprints
	ending in '!'.

2015-12-01  Justus Winter  <justus@g10code.com>

	dirmngr: Improve error handling.
	* dirmngr/dns-stuff.c (getsrv): Avoid looking at 'header' before
	checking for errors, but silently ignore errors when looking up SRV
	records.

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

	build: Let configure show the the status of Tor support.
	* configure.ac (show_tor_support): New

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

	doc: Make make distcheck work again.
	* doc/Makefile.am (DISTCLEANFILES): Add gpgkey2ssh.1

	yat2m: Add keyword @url.
	* doc/yat2m.c (proc_texi_cmd): Add keyword @url.

	doc: Build man pages with the same date as the info files.
	* doc/Makefile.am (yat2m-stamp): Use option --date.

	yat2m: New option --date.
	* doc/yat2m.c (opt_date): new.
	(isodatestring): Use it if set.
	(main): New option --date.

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

	gpg: Avoid extra translation strings.
	* g10/keyedit.c (menu_expire): Use only one prompt.

	kbx: Include gpg-error prior to mischelp.h.
	* kbx/keybox-init.c: Change order of includes.

	gpg,w32: Fix a format string error.
	* g10/keyring.c (keyring_search): Fix format string for off_t.

	Silence compiler warnings related to not using assuan_fd_t.
	* common/call-gpg.c (start_gpg): Use assuan_fd_t.  Note that the
	declaration was already fixed by a previous change.
	* dirmngr/server.c (cmd_getinfo): Use assuan_fd_t.

	Avoid incompatible pointer assignment warnings on Windows.
	* common/logging.c (fun_writer): Use gpgrt_ssize_t instead of ssize_t.
	* dirmngr/server.c (data_line_cookie_write): Ditto.
	* sm/certdump.c (format_name_writer): Ditto.
	* sm/server.c (data_line_cookie_write): Ditto.
	* dirmngr/http.c (cookie_read, cookie_write): Ditto.

	dirmngr: Avoid a declarations after statements.
	* tools/gpgtar.c (parse_arguments): Use a block for a local varibale
	definition.

	dirmngr: Avoid casting away a const from an char**.
	* dirmngr/ldap.c (start_cert_fetch_ldap): Do not use pointers from
	global variables.

	dirmngr: Allow testing for a running Tor via "getinfo tor".
	* dirmngr/server.c (cmd_getinfo): Print an S line if Tor is not
	running.

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

	g13: Fix commit 1a045b13.
	* g13/g13.c (main): Use existsing function.

	common: Fix off-by-one access in the new format_text.
	* common/stringhelp.c (format_text): Use existsing fucntion to trim
	trailing spaces.  Fix off-by-one access.

	dirmngr: Improve output of "getinfo tor".
	* dirmngr/server.c (cmd_getinfo): Print a message along with OK.

	dirmngr: Let Libassuan employ nPth wrappers for connect.
	* dirmngr/http.c (my_unprotect, my_protect): Remove.
	(connect_server): Do not use these wrappers.

2015-11-26  Justus Winter  <justus@g10code.com>

	tools/gpgtar: Add '--dry-run'.
	* tools/gpgtar-extract.c (extract_{regular,directory}): Honor
	'--dry-run'.
	* tools/gpgtar.c (enum cmd_and_opt_values): New value.
	(opts): Add '--dry-run'.
	(parse_arguments): Handle '--dry-run'.
	* tools/gpgtar.h (opt): Add field 'dry_run'.

	tools/gpgtar: Handle '--gpg-args'.
	* tools/gpgtar-create.c (gpgtar_create): Use given arguments.
	* tools/gpgtar-extract.c (gpgtar_extract): Likewise.
	* tools/gpgtar-list.c (gpgtar_list): Likewise.
	* tools/gpgtar.c (enum cmd_and_opt_values): New value.
	(opts): Add 'gpg-args'.
	(parse_arguments): Handle arguments.
	* tools/gpgtar.h (opt): Add field 'gpg_arguments'.
	* tests/openpgp/gpgtar.test: Simplify accordingly.

	common: Make the GPG arguments configurable in call-gpg.
	* common/call-gpg.c (start_gpg): Add parameter 'gpg_arguments'.
	(_gpg_encrypt, gpg_encrypt_blob, gpg_encrypt_stream): Likewise.
	(_gpg_decrypt, gpg_decrypt_blob, gpg_decrypt_stream): Likewise.
	* common/call-gpg.h: Adapt prototypes.
	* g13/create.c (encrypt_keyblob): Adapt callsite.
	* g13/g13-common.h (opt): Add field 'gpg_arguments'.
	* g13/g13.c (main): Construct default arguments.
	* g13/mount.c (decrypt_keyblob): Adapt callsite.
	* tools/gpgtar-create.c (gpgtar_create): Likewise.
	* tools/gpgtar-extract.c (gpgtar_extract): Likewise.
	* tools/gpgtar-list.c (gpgtar_list): Likewise.

	tools/gpgtar: Handle '--tar-args' for compatibility with gpg-zip.
	* tools/gpgtar.c (enum cmd_and_opt_values): New value.
	(opts): Add new group for tar options, rearrange a little, add
	'--tar-args'.
	(tar_opts): New variable.
	(shell_parse_stringlist): New function.
	(shell_parse_argv): Likewise.
	(parse_arguments): Add option argument, handle '--tar-args'.
	(main): Fix invokation of 'parse_arguments'.
	* tests/openpgp/gpgtar.test: Simplify decryption.

	tools/gpgtar: Rework argument parsing.
	* tools/gpgtar.c (main): Move argument parsing into its own function.

2015-11-25  Justus Winter  <justus@g10code.com>

	tests: Add tests for gpgtar and gpg-zip.
	* tests/openpgp/Makefile.am (TESTS): Add new file.
	* tests/openpgp/gpgtar.test: New file.

	tools/gpgtar: Handle '--directory' argument.
	* tools/gpgtar-extract.c (gpgtar_extract): Only generate a directory
	name if none is given via arguments.
	* tools/gpgtar.c (enum cmd_and_opt_values): New constant.
	(opts): Add argument.
	(main): Parse argument.
	* tools/gpgtar.h (opt): New field 'directory'.

	tools/gpgtar: Handle '--gpg' argument.
	* tools/gpgtar-create.c (gpgtar_create): Use given gpg program.
	* tools/gpgtar-extract.c (gpgtar_extract): Likewise.
	* tools/gpgtar-list.c (gpgtar_list): Likewise.
	* tools/gpgtar.c (enum cmd_and_opt_values): New constant.
	(opts): Add argument.
	(main): Handle argument.
	* tools/gpgtar.h (opt): Add field 'gpg_program'.

	tools/gpgtar: Improve error handling.
	* tools/gpgtar-create.c (gpgtar_create): Return an error code, fix
	error handling.
	* tools/gpgtar-extract.c (gpgtar_extract): Likewise.
	* tools/gpgtar-list.c (read_header): Return an error code.
	(gpgtar_list): Return an error code, fix error handling.
	(gpgtar_read_header): Return an error code.
	* tools/gpgtar.c: Add missing include.
	(main): Print an generic error message if a command failed and no
	error has been printed yet.
	* tools/gpgtar.h (gpgtar_{create,extract,list,read_header}): Fix the
	prototypes accordingly.

	tools: Add encryption and decryption support to gpgtar.
	* tools/Makefile.am: Amend CFLAGS and LDADD.
	* tools/gpgtar-create.c (gpgtar_create): Add encrypt flag and encrypt
	stream if requested.
	* tools/gpgtar-extract.c (gpgtar_extract): Likewise for decryption.
	* tools/gpgtar-list.c (gpgtar_list): Likewise.
	* tools/gpgtar.c (main): Initialize npth and assuan.  Parse recipient
	and local user, and note which flags are currently ignored.  Adapt
	calls to gpgtar_list and friends.
	(tar_and_encrypt): Drop stub function and prototype.
	(decrypt_and_untar): Likewise.
	(decrypt_and_list): Likewise.
	* tools/gpgtar.h (gpgtar_{create,extract,list}): Add encryption or
	decryption argument.

	common: Add stream interface to call-pgp.
	* common/call-gpg.c (struct writer_thread_parms): Add field 'stream'.
	(writer_thread_main): Support reading from a stream.
	(start_writer): Add stream argument.
	(struct reader_thread_parms): Add field 'stream'.
	(reader_thread_main): Support writing to a stream.
	(start_reader): Add stream argument.
	(_gpg_encrypt): Add stream api.
	(gpg_encrypt_blob): Adapt accordingly.
	(gpg_encrypt_stream): New function.
	(_gpg_decrypt): Add stream api.
	(gpg_decrypt_blob): Adapt accordingly.
	(gpg_decrypt_stream): New function.
	* common/call-gpg.h (gpg_encrypt_stream): New prototype.
	(gpg_decrypt_stream): Likewise.

	common: Refactor the call-gpg code.
	* common/call-gpg.c (gpg_{en,de}crypt_blob): Move most of the code
	into two new functions, _gpg_encrypt and _gpg_decrypt.

	g13: Move 'call-gpg.c' to common.
	* common/Makefile.am (common_sources): Add files.
	* g13/call-gpg.c: Move to 'common' and adapt slightly.  Add a
	parameter to let callees override the gpg program to execute.
	* g13/call-gpg.h: Likewise.
	* g13/Makefile.am (g13_SOURCES): Drop files.
	* g13/create.c (encrypt_keyblob): Hand in the gpg program to execute.
	* g13/mount.c (decrypt_keyblob): Likewise.

2015-11-24  Neal H. Walfield  <neal@g10code.com>

	gpg: When comparing keyids, use the keyid, not the fingerprint's suffix.
	* g10/keyedit.c (menu_select_key): Use spacep and hexdigitp instead of
	inline tests.  Don't compare P to the suffix of the fingerprint.  If P
	appears to be a keyid, do an exact compare against the keyid.  If it
	appears to be a fingerprint, do an exact compare against the
	fingerprint.

2015-11-23  Neal H. Walfield  <neal@g10code.com>

	gpg: Reflow long texts.
	* common/stringhelp.c (format_text): New function.
	* common/t-stringhelp.c (stresc): New function.
	(test_format_text): New function.  Test format_text.
	* g10/tofu.c (get_trust): Use format_text to reflow long texts.
	(show_statistics): Likewise.

	common: Extend utf8_charcount to include the string's length.
	* common/stringhelp.c (utf8_charcount): Take additional parameter,
	len.  Process at most LEN bytes.

2015-11-23  Justus Winter  <justus@g10code.com>

	dirmngr: Fix http lookups when libadns is used.
	* dirmngr/dns-stuff.c (resolve_name_adns): Fill in the port.

	dirmngr: Fix SRV record lookups when using the system resolver.
	* dirmngr/dns-stuff.c (getsrv): Fix error handling.

	dirmngr: Honor ports specified in SRV records.
	* dirmngr/ks-engine-hkp.c (struct hostinfo_s): New field 'port'.
	(create_new_hostinfo): Initialize 'port'.
	(add_host): Add host parameter and update the hosttable entry.
	(map_host): Return port if known, adjust calls to 'add_host'.
	(make_host_part): Let 'map_host' specify the port if known.

	dirmngr: Support hkp server pools using SRV records.
	* dirmngr/ks-engine-hkp.c (map_host): Handle SRV records.

	dirmngr: Refactor 'map_host'.
	* dirmngr/ks-engine-hkp.c (add_host): New function.
	(map_host): Use the new function.

	dirmngr: Fix pool detection.
	* dirmngr/ks-engine-hkp (arecords_is_pool): Fix counting IP addresses.

	dirmngr: Refactor 'map_host'.
	* dirmngr/ks-engine-hkp.c (arecords_is_pool): New function.
	(map_host): Use the new function.

	dirmngr: Start dirmngr on demand.
	* common/asshelp.h: Include 'util.h'.
	* dirmngr/dirmngr-client.c (main): Use 'start_new_dirmngr' to connect
	to the dirmngr.
	(start_dirmngr): Drop now unused declaration and function.

2015-11-23  Neal H. Walfield  <neal@g10code.com>

	gpg: If sqlite is not available, don't build things depending on it.
	* configure.ac: Define the automake conditional SQLITE3.
	* tests/openpgp/Makefile.am (TESTS): Move the sqlite3 dependent tests
	to...
	(sqlite3_dependent_tests): ... this new variable.  If SQLITE3 is not
	defined, then clear this variable.

	gpg: Allow updating the expiration time of multiple subkeys at once.
	* g10/keyedit.c (menu_expire): Allow updating the expiration time of
	multiple subkeys at once.

	gpg: Don't crash if key is not passed an argument.
	* g10/keyedit.c (menu_select_key): Don't crash if P is NULL.

2015-11-20  Neal H. Walfield  <neal@g10code.com>

	gpg: Fail if the search description passed to --gen-revoke is ambiguous.
	* g10/revoke.c (gen_revoke): Error out if the search description is
	ambiguous.

	gpg: Refactor print_seckey_info.
	* g10/keylist.c (print_seckey_info): Break formatting functionality
	into...
	(format_seckey_info): ... this new function.

	gpg: Improve an error message.
	* g10/revoke.c (gen_revoke): Provide a more descriptive error message
	if searching for a key fails.

2015-11-19  Justus Winter  <justus@g10code.com>

	dirmngr: Improve error handling.
	* dirmngr/crlcache.c (crl_cache_cert_isvalid): Add missing break.

	dirmngr: Fix memory leak.
	* dirmngr/ldap.c (start_cert_fetch_ldap): Avoid leaking all malloc'ed
	arguments.

	agent: Improve error handling.
	* agent/trustlist.c (istrusted_internal): Initialize 'err'.

	common: Avoid undefined behavior.
	* common/iobuf.c (iobuf_esopen): Initialize 'len' as 'file_es_filter'
	will make use of it.

	g10: Avoid undefined behavior.
	* g10/trust.c (clean_one_uid): Avoid a computation involving an
	uninitialized value.

	scd: Improve error handling.
	* scd/app-openpgp.c (get_public_key): Improve error handling.

2015-11-18  Justus Winter  <justus@g10code.com>

	dirmngr: Gracefully handle premature termination of TLS streams.
	* dirmngr/http.c (close_tls_session): New function.
	(session_unref): Use the new function to close the TLS stream.
	(cookie_read): If the stream terminated prematurely, close it and
	return a short read.

2015-11-17  Neal H. Walfield  <neal@g10code.com>
	    Michael Mönch  <michael.moench@marktjagd.de>

	tools: Fix option parsing for gpg-zip.
	* tools/gpg-zip.in: Correctly set GPG when --gpg is specified.
	Correctly set TAR when --tar is specified.  Pass TAR_ARGS to tar.

2015-11-17  Neal H. Walfield  <neal@g10code.com>

	gpg: Allow selecting subkeys using a keyid.
	* g10/keyedit.c (menu_select_key): Take an additional argument, p.
	Update callers.  If P is a hex string, then assume that P is a key id
	or fingerprint and select subkeys with matching key ids or
	fingerprints.
	* doc/gpg.texi: Update documentation for the key subcommand.

2015-11-17  Justus Winter  <justus@g10code.com>

	dirmngr: Fix specifying keyservers by IP address.
	* dirmngr/ks-engine-hkp.c (map_host): Update the original 'hosttable'
	entry instead of creating another one.

2015-11-17  Neal H. Walfield  <neal@g10code.com>

	gpg: Change keydb_search to not return legacy keys.
	* g10/keyring.c (keyring_search): Take new argument, ignore_legacy.
	If set, skip any legacy keys.  Update callers.
	* g10/keydb.c (keydb_search): Skip any legacy keys.
	(keydb_search_first): Don't skip legacy keys.  Treat them
	as an error.
	(keydb_search_next): Likewise.
	(keydb_search_fpr): Likewise.
	* g10/export.c (do_export_stream): Likewise.
	* g10/getkey.c (lookup): Likewise.
	(have_secret_key_with_kid): Likewise.
	* g10/keylist.c (list_all): Likewise.
	(keyring_rebuild_cache): Likewise.
	* g10/keyserver.c (keyidlist): Likewise.
	* g10/trustdb.c (validate_key_list): Likewise.

	gpg: Correctly handle an error.
	* g10/keyring.c (keyring_search): If a compare function returns an
	error, treat it as an error.

	gpg: Correctly handle keyblocks followed by legacy keys.
	* g10/keyring.c (keyring_get_keyblock): If we encounter a legacy
	packet after already having some non-legacy packets, then treat the
	legacy packet as a keyblock boundary, not as part of the keyblock.
	* g10/t-keydb-get-keyblock.c: New file.
	* g10/t-keydb-get-keyblock.gpg: New file.
	* g10/Makefile.am (EXTRA_DIST): Add t-keydb-get-keyblock.gpg.
	(module_tests): Add t-keydb-get-keyblock.
	(t_keydb_get_keyblock_SOURCES): New variable.
	(t_keydb_get_keyblock_LDADD): Likewise.

	gpg: Make debugging search descriptors easier.
	* g10/keydb.c (dump_search_desc): Rename from this...
	(keydb_search_desc_dump): ... to this.  Only process a single search
	descriptor.  Improve output.  Don't mark as static.  Update callers.

	gpg: Add function format_keyid.
	* g10/options.h (opt.keyid_format): Add new value KF_DEFAULT.
	* g10/keyid.c (format_keyid): New function.
	(keystr): Use it.

	gpg: Use a more appropriate error code.
	* g10/gpg.c (check_user_ids): Return a more appropriate error code if
	a user id is ambiguous.

2015-11-17  Justus Winter  <justus@g10code.com>

	Fix typos found using codespell.
	* agent/cache.c: Fix typos.
	* agent/call-pinentry.c: Likewise.
	* agent/call-scd.c: Likewise.
	* agent/command-ssh.c: Likewise.
	* agent/command.c: Likewise.
	* agent/divert-scd.c: Likewise.
	* agent/findkey.c: Likewise.
	* agent/gpg-agent.c: Likewise.
	* agent/w32main.c: Likewise.
	* common/argparse.c: Likewise.
	* common/audit.c: Likewise.
	* common/audit.h: Likewise.
	* common/convert.c: Likewise.
	* common/dotlock.c: Likewise.
	* common/exechelp-posix.c: Likewise.
	* common/exechelp-w32.c: Likewise.
	* common/exechelp-w32ce.c: Likewise.
	* common/exechelp.h: Likewise.
	* common/helpfile.c: Likewise.
	* common/i18n.h: Likewise.
	* common/iobuf.c: Likewise.
	* common/iobuf.h: Likewise.
	* common/localename.c: Likewise.
	* common/logging.c: Likewise.
	* common/openpgp-oid.c: Likewise.
	* common/session-env.c: Likewise.
	* common/sexputil.c: Likewise.
	* common/sysutils.c: Likewise.
	* common/t-sexputil.c: Likewise.
	* common/ttyio.c: Likewise.
	* common/util.h: Likewise.
	* dirmngr/cdblib.c: Likewise.
	* dirmngr/certcache.c: Likewise.
	* dirmngr/crlcache.c: Likewise.
	* dirmngr/dirmngr-client.c: Likewise.
	* dirmngr/dirmngr.c: Likewise.
	* dirmngr/dirmngr_ldap.c: Likewise.
	* dirmngr/dns-stuff.c: Likewise.
	* dirmngr/http.c: Likewise.
	* dirmngr/ks-engine-hkp.c: Likewise.
	* dirmngr/ks-engine-ldap.c: Likewise.
	* dirmngr/ldap-wrapper.c: Likewise.
	* dirmngr/ldap.c: Likewise.
	* dirmngr/misc.c: Likewise.
	* dirmngr/ocsp.c: Likewise.
	* dirmngr/validate.c: Likewise.
	* g10/encrypt.c: Likewise.
	* g10/getkey.c: Likewise.
	* g10/gpg.c: Likewise.
	* g10/gpgv.c: Likewise.
	* g10/import.c: Likewise.
	* g10/keydb.c: Likewise.
	* g10/keydb.h: Likewise.
	* g10/keygen.c: Likewise.
	* g10/keyid.c: Likewise.
	* g10/keylist.c: Likewise.
	* g10/keyring.c: Likewise.
	* g10/mainproc.c: Likewise.
	* g10/misc.c: Likewise.
	* g10/options.h: Likewise.
	* g10/packet.h: Likewise.
	* g10/parse-packet.c: Likewise.
	* g10/pkclist.c: Likewise.
	* g10/pkglue.c: Likewise.
	* g10/plaintext.c: Likewise.
	* g10/server.c: Likewise.
	* g10/sig-check.c: Likewise.
	* g10/sqlite.c: Likewise.
	* g10/tdbio.c: Likewise.
	* g10/test-stubs.c: Likewise.
	* g10/tofu.c: Likewise.
	* g10/trust.c: Likewise.
	* g10/trustdb.c: Likewise.
	* g13/create.c: Likewise.
	* g13/mountinfo.c: Likewise.
	* kbx/keybox-blob.c: Likewise.
	* kbx/keybox-file.c: Likewise.
	* kbx/keybox-init.c: Likewise.
	* kbx/keybox-search-desc.h: Likewise.
	* kbx/keybox-search.c: Likewise.
	* kbx/keybox-update.c: Likewise.
	* scd/apdu.c: Likewise.
	* scd/app-openpgp.c: Likewise.
	* scd/app-p15.c: Likewise.
	* scd/app.c: Likewise.
	* scd/ccid-driver.c: Likewise.
	* scd/command.c: Likewise.
	* scd/iso7816.c: Likewise.
	* sm/base64.c: Likewise.
	* sm/call-agent.c: Likewise.
	* sm/call-dirmngr.c: Likewise.
	* sm/certchain.c: Likewise.
	* sm/gpgsm.c: Likewise.
	* sm/import.c: Likewise.
	* sm/keydb.c: Likewise.
	* sm/minip12.c: Likewise.
	* sm/qualified.c: Likewise.
	* sm/server.c: Likewise.
	* tools/gpg-check-pattern.c: Likewise.
	* tools/gpgconf-comp.c: Likewise.
	* tools/gpgkey2ssh.c: Likewise.
	* tools/gpgparsemail.c: Likewise.
	* tools/gpgtar.c: Likewise.
	* tools/rfc822parse.c: Likewise.
	* tools/symcryptrun.c: Likewise.

2015-11-16  Neal H. Walfield  <neal@g10code.com>

	gpg: Fix error checking and improve error reporting.
	* g10/gpg.c (check_user_ids): Differentiate between a second result
	and an error.  If the key specification is ambiguous or an error
	occurs, set RC appropriately.

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

	gpg: Use only one fingerprint formatting function.
	* g10/gpg.h (MAX_FORMATTED_FINGERPRINT_LEN): New.
	* g10/keyid.c (hexfingerprint): Add optional args BUFFER and BUFLEN.
	Change all callers.
	(format_hexfingerprint): New.
	* g10/keylist.c (print_fingerprint): Change to use hexfingerprint.
	* g10/tofu.c (fingerprint_format): Remove.  Replace calls by
	format_hexfingerprint.

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

	gpg: Simplify the tofu interface by using the public key packet.
	* g10/tofu.c (fingerprint_str): Remove.
	(tofu_register): Take a public key instead of a fingerprint as arg.
	Use hexfingerprint() to get a fpr from the PK.
	(tofu_get_validity): Ditto.
	(tofu_set_policy, tofu_get_policy): Simplify by using hexfingerprint.
	* g10/trustdb.c (tdb_get_validity_core): Pass the primary key PK to
	instead of the fingerprint to the tofu functions.

	gpg: Make trusted-key override for Tofu robust against swapped tofu.db.
	* g10/tofu.c (get_trust): For the UTK check lookup the key by
	fingerprint.

	gpg: Fix regression in --locate-keys (in 2.1.9).
	* g10/getkey.c (getkey_ctx_s): Add field "extra_list".
	(get_pubkey_byname): Store strings in the context.
	(getkey_end): Free EXTRA_LIST.

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

	gpg: Print a new EXPORTED status line.
	* common/status.h (STATUS_EXPORTED): New.
	* g10/export.c (print_status_exported): New.
	(do_export_stream): Call that function.

	gpg: Print export statistics to the status-fd.
	* common/status.h (STATUS_EXPORT_RES): New.
	* g10/main.h (export_stats_t): New.
	* g10/export.c (export_stats_s): New.
	(export_new_stats, export_release_stats): New.
	(export_print_stats): New.
	(export_pubkeys, export_seckeys, export_secsubkeys)
	(export_pubkey_buffer, do_export): Add arg "stats".
	(do_export_stream): Add arg stats and update it.
	* g10/gpg.c (main) <aExport, aExportSecret, aExportSecretSub>: Create,
	pass, and print a stats object to the export function calls.

	* g10/export.c (export_pubkeys_stream): Remove unused function.

	dirmngr: Do not block during ADNS calls.
	* dirmngr/dns-stuff.c: Include npth.h
	(my_unprotect, my_protect): New wrapper.
	(resolve_name_adns): Put unprotect/protect around adns calls.
	(get_dns_cert): Ditto.
	(getsrv): Ditto.
	(get_dns_cname): Ditto.

	dirmngr: New option --nameserver.
	* dirmngr/dirmngr.c (oNameServer): New.
	(opts): Add --nameserver.
	(parse_rereadable_options): Act upon oNameServer.
	* dirmngr/dns-stuff.c (DEFAULT_NAMESERVER): New.
	(tor_nameserver): New.
	(set_dns_nameserver): New.
	(my_adns_init): Make name server configurable.

2015-11-11  Neal H. Walfield  <neal@g10code.com>

	gpg: Fix cache consistency problem.
	g10/keyring.c (keyring_search): Only mark the cache as completely
	filled if we start the scan from the beginning of the keyring.

2015-11-10  Neal H. Walfield  <neal@g10code.com>

	gpg: Default to the the PGP trust model.
	* g10/trustdb.c (init_trustdb): If we can't read the trust model from
	the trust DB, default to TM_PGP, not TM_TOFU_PGP.

	gpg: Default to the flat TOFU DB format.
	* g10/tofu.c (opendbs): If the TOFU DB format is set to auto and there
	is no TOFU DB, default to the flat format.

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

	dirmngr: Change to new ADNS Tor mode init scheme.
	* dirmngr/dns-stuff.c (tor_credentials): New.
	(enable_dns_tormode): Add arg new_circuit and update tor_credentials.
	(my_adns_init): Rework to set Tor mode using a config file options and
	always use credentials.
	* dirmngr/server.c (cmd_dns_cert): Improve error message.
	* dirmngr/t-dns-stuff.c (main): Add option --new-circuit.

	dirmngr: Improve detection of ADNS.
	* configure.ac (HAVE_ADNS_FREE): New ac_define.

2015-11-09  NIIBE Yutaka  <gniibe@fsij.org>

	scd: Add reder information to --card-status.
	* g10/call-agent.h, g10/call-agent.c (agent_release_card_info)
	g10/card-util.c (card_status): Add READER.
	* scd/apdu.c (close_ccid_reader, open_ccid_reader): Handle RDRNAME.
	(apdu_get_reader_name): New.
	* scd/ccid-driver.c (ccid_open_reader): Add argument to RDRNAME_P.
	* scd/command.c (cmd_learn): Return READER information.

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

	gpg: Avoid new strings.
	* g10/decrypt-data.c (decrypt_data): Use already translated strings.

	common: Fix commit f99830b.
	* common/userids.c (classify_user_id): Avoid underflow.  Use spacep to
	also trim tabs.

2015-11-06  Neal H. Walfield  <neal@g10code.com>

	gpg: Fix formatting string.
	* g10/decrypt-data.c (decrypt_data): Fix formatting string.

	gpg: Add new option --only-sign-text-ids.
	* g10/options.h (opt): Add field only_sign_text_ids.
	* g10/gpg.c (enum cmd_and_opt_values): Add value oOnlySignTextIDs.
	(opts): Handle oOnlySignTextIDs.
	(main): Likewise.
	* g10/keyedit.c (sign_uids): If OPT.ONLY_SIGN_TEXT_IDS is set, don't
	select non-text based IDs automatically.
	(keyedit_menu): Adapt the prompt asking to sign all user ids according
	to OPT.ONLY_SIGN_TEXT_IDS.
	* doc/gpg.texi: Document the new option --only-sign-text-ids.

	common: When classifying keyids and fingerprints, reject trailing junk.
	* common/userids.c (classify_user_id): Trim any trailing whitespace.
	Before assuming that a hexstring corresponds to a key id or
	fingerprint, make sure that it is NUL terminated.

	gpg: Check for ambiguous or non-matching key specs.
	* g10/gpg.c (check_user_ids): New function.
	(main): Check that any user id specifications passed to --local-user
	and --remote-user correspond to exactly 1 user.  Check that any user
	id specifications passed to --default-key correspond to at most 1
	user.  Warn if any user id specifications passed to --local-user or
	--default-user are possible ambiguous (are not specified by long keyid
	or fingerprint).
	* g10/getkey.c (parse_def_secret_key): Don't warn about possible
	ambiguous key descriptions here.

	common: Add new function strlist_rev.
	* common/strlist.c (strlist_rev): New function.
	* common/t-strlist.c: New file.
	* common/Makefile.am (common_sources): Add strlist.c and strlist.h.
	(module_tests): Add t-strlist.
	(t_strlist_LDADD): New variable.

	common: Include required, but not included headers in t-support.h.
	* common/t-support.h: Include <stdlib.h> and <stdio.h>.

2015-11-05  Neal H. Walfield  <neal@g10code.com>

	gpg: Indicate which characters are invalid.
	* g10/keygen.c (ask_user_id): Indicate which characters are invalid.

	gpg: Add support for unwrapping the outer level of encryption.
	* g10/decrypt-data.c (decrypt_data): If OPT.UNWRAP_ENCRYPTION is set,
	copy the data to the output file instead of continuing to process it.
	* g10/gpg.c (enum cmd_and_opt_values): Add new value oUnwrap.
	(opts): Handle oUnwrap.
	(main): Likewise.
	* g10/options.h (opt): Add field unwrap_encryption.
	* g10/plaintext.c (handle_plaintext): Break the output file selection
	functionality into ...
	(get_output_file): ... this new function.

	common: Add a function for copying data from one iobuf to another.
	* common/iobuf.c (iobuf_copy): New function.

	doc: Note that gpgkey2ssh is deprecated.
	* doc/tools.texi (gpgkey2ssh): Note that gpgkey2ssh is deprecated.

	tools: Fix gpgkey2ssh's most gratuitous errors.  Use gpg2, not gpg.
	* tools/gpgkey2ssh.c (main): Add support for --help.  Replace the most
	gratuitous asserts with error messages.  Invoke gpg2, not gpg.

2015-11-05  Neal H. Walfield  <neal@g10code.com>
	    Daniel Kahn Gillmor  <dkg@fifthhorseman.net>

	doc: Add documentation for gpgkey2ssh.
	* doc/tools.texi: Add documentation for gpgkey2ssh.

2015-11-04  Neal H. Walfield  <neal@g10code.com>

	gpg: Print a better error message for --multifile --sign --encrypt.
	* g10/gpg.c (main): Print a better error message for --multifile
	--sign --encrypt.

	gpg: Add --encrypt-to-default-key.
	* g10/getkey.c (parse_def_secret_key): Drop the static qualifier and
	export the function.
	* g10/gpg.c (enum cmd_and_opt_values): Add value oEncryptToDefaultKey.
	(opts): Handle oEncryptToDefaultKey.
	(main): Likewise.
	* g10/options.h (opt): Add field encrypt_to_default_key.

	gpg: Allow multiple --default-key options.  Take the last available key.
	* g10/getkey.c (parse_def_secret_key): New function.
	(get_seckey_default): Add parameter ctrl.  Update callers.  Use
	parse_def_secret_key to get the default secret key, if any.
	(getkey_byname): Likewise.
	(enum_secret_keys): Likewise.
	* g10/options.h (opt): Change def_secret_key's type from a char * to a
	strlist_t.
	* g10/gpg.c (main): When processing --default-key, add the key to
	OPT.DEF_SECRET_KEY.
	* g10/gpgv.c (get_session_key): Add parameter ctrl.  Update callers.
	* g10/mainproc.c (proc_pubkey_enc): Likewise.
	(do_proc_packets): Likewise.
	* g10/pkclist.c (default_recipient): Likewise.
	* g10/pubkey-enc.c (get_session_key): Likewise.
	* g10/sign.c (clearsign_file): Likewise.
	(sign_symencrypt_file): Likewise.
	* g10/skclist.c (build_sk_list): Likewise.
	* g10/test-stubs.c (get_session_key): Likewise.

2015-11-04  NIIBE Yutaka  <gniibe@fsij.org>

	scd: Fix error handling with libusb-compat library.
	* scd/ccid-driver.c (bulk_out): Use LIBUSB_ERRNO_NO_SUCH_DEVICE.

	scd: fix change_keyattr.
	* scd/app-openpgp.c (change_keyattr_from_string): Fix parsing.

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

	gpg: Change out of core error message.
	* g10/tofu.c (fingerprint_str): Die with the error code returned by
	the failed function.
	(time_ago_str): Ditto.  Do not make a comma translatable.
	(fingerprint_format): Use "%zu" for a size_t.

	gpg: Make translation easier.
	* g10/import.c (import_secret_one): Split info string for easier
	translation.

2015-11-03  Neal H. Walfield  <neal@g10code.com>

	gpg: Also show when the most recently signed message was observed.
	* g10/tofu.c (show_statistics): Also show when the most recently
	signed message was observed.

	gpg: Split a utility function out of a large function.
	* g10/tofu.c (show_statistics): Break the time delta to string code
	into...
	(time_ago_str): ... this new function.

	gpg: Fix message formatting.
	* g10/tofu.c (get_trust): Fix message formatting.

	gpg: Don't store formatting fingerprints in the TOFU DB.
	* g10/tofu.c (fingerprint_pp): Split this function into...
	(fingerprint_str): ... this function...
	(fingerprint_format): ... and this function.
	(record_binding): Store the unformatted fingerprint in the DB.  Only
	use the formatting fingerprint when displaying a message to the user.
	(get_trust): Likewise.
	(show_statistics): Likewise.
	(tofu_register): Likewise.
	(tofu_get_validity): Likewise.
	(tofu_set_policy): Likewise.
	(tofu_get_policy): Likewise.

2015-11-02  NIIBE Yutaka  <gniibe@fsij.org>

	g10: notify a user when importing stub is skipped.
	* g10/import.c (transfer_secret_keys): Return GPG_ERR_NOT_PROCESSED
	when stub_key_skipped.
	(import_secret_one): Notify a user, suggesting --card-status.

2015-10-31  Neal H. Walfield  <neal@g10code.com>

	gpg: Consider newlines to be whitespace in an SQL statement.
	* g10/sqlite.c (sqlite3_stepx): When making sure that there is no
	second SQL statement, ignore newlines.

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

	common: Improve t-zb32 to be used for manual encoding.
	* common/t-support.h (no_exit_on_fail, errcount): New.
	(fail): Bump errcount.
	* common/t-zb32.c (main): Add options to allow manual use.

	common: Add separate header for zb32.c.
	* common/util.h (zb32_encode): Move prototype to ...
	* common/zb32.h: new.  Include this for all callers of zb32_encode.

2015-10-29  Neal H. Walfield  <neal@g10code.com>

	gpg: Display the correct error message.
	* g10/trustdb.c (validate_keys): If tdbio_update_version_record fails,
	RC does not contain the error code.  Save the error code in rc2 and
	use that.

	gpg: Eliminate a memory leak.
	* g10/trustdb.c (validate_key_list): Don't leak the keyblocks on
	failure.

	gpg: Remove unused prototype.
	g10/keyring.h (keyring_locate_writable): Remove unused prototype.

	gpg: Eliminate a memory leak.
	* g10/gpg.c (main): Don't leak OPT.DEF_RECIPIENT.

	gpg: Fix keyring support.
	* g10/keydb.c (keydb_rebuild_caches): Only mark the cached as prepared
	if it is actually prepared, which it only is if the resource is a
	keybox.

	gpg: Change sqlite3_stepx to pass the sqlite3_stmt * to the callback.
	* g10/sqlite.h (enum sqlite_arg_type): Add SQLITE_ARG_BLOB.
	(sqlite3_stepx_callback): New declaration.
	(sqlite3_stepx): Change the callback's type to sqlite3_stepx_callback,
	which passes an additional parameter, the sqlite3_stmt *.  Update
	users.

	gpg: Move sqlite helper functions into their own file.
	* g10/tofu.c (sqlite3_exec_printf): Move from here...
	* g10/sqlite.c (sqlite3_exec_printf): ... to this new file.  Don't
	mark as static.
	* g10/tofu.c (sqlite3_stepx): Move from here...
	* g10/sqlite.c (sqlite3_stepx): ... to this new file.  Don't
	mark as static.
	* g10/tofu.c (enum sqlite_arg_type): Move from here...
	* g10/sqlite.h (enum sqlite_arg_type): ... to this new file.

2015-10-29  NIIBE Yutaka  <gniibe@fsij.org>

	doc: Don't install gpg-zip.1.
	* doc/Makefile.am (myman_pages): Remove gpg-zip.1.
	(DISTCLEANFILES): Add gpg-zip.1.

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

	sm: Allow combination of usage flags --gen-key.
	* sm/certreqgen.c (create_request): Re-implement building of the
	key-usage extension.

2015-10-28  Damien Goutte-Gattat  <dgouttegattat@incenp.org>

	doc: Document some changed default options.
	* doc/gpg.texi: Update the description of some options which are
	  now enabled by default.

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

	dirmngr: Fix NULL-deref while loading a CRL.
	* dirmngr/crlcache.c (crl_parse_insert): Set error before leaping to
	failure.

	dirmngr: Minor cleanup of the SRV RR code.
	* dirmngr/dns-stuff.c: Include unistd.h.
	(getsrv): Run srand only once.
	* dirmngr/t-dns-stuff.c (main): Allow passing another name for --srv
	and change output format.

	dirmngr: Add a getaddrinfo wrapper backend using ADNS.
	* dirmngr/dns-stuff.c: Replace all use of default_errsource.
	(my_adns_init): Move to top.
	(resolve_name_adns): New.
	(resolve_dns_name) [USE_ADNS]: Divert to new func.

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

	gpg: Do not call an extra get_validity if no-show-uid-validity is used.
	* g10/mainproc.c (check_sig_and_print): Do not call the informational
	get_validity if we are not going to use it.

2015-10-26  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>

	gpg: Ensure all weak digest rejection notices are shown.
	* g10/main.h: Add rejection_shown flag to each weakhash struct
	* g10/misc.c (print_digest_algo_note, additional_weak_digest): Do not
	treat MD5 separately; (print_digest_rejected_note): Use
	weakhash.rejection_shown instead of static shown.
	* g10/options.h (opt): Change from additional_weak_digests to
	weak_digests.
	* g10/sig-check.c: Do not treat MD5 separately.
	* g10/gpg.c (main): Explicitly set MD5 as weak.
	* g10/gpgv.c (main): Explicitly set MD5 as weak.

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

	w32: Make it build again if Tofu support is not available.
	* g10/keylist.c (public_key_list) [!USE_TOFU]: Do not call tofu
	functions.

	dirmngr: Support Tor hidden services.
	* dirmngr/dns-stuff.c (is_onion_address): New.
	* dirmngr/ks-engine-hkp.c (hostinfo_s): Add field "onion".
	(map_host): Special case onion addresses.
	(ks_hkp_print_hosttable): Print an 'O' for an onion address.
	* dirmngr/http.c (connect_server): Special case onion addresses.

	dirmngr,w32: Remove gethostbyname hack and make it build again.
	* dirmngr/http.c (connect_server) [W32]: Remove gethostbyname hack;
	we require getaddrinfo anyway.
	* dirmngr/dns-stuff.c (AI_ADDRCONFIG): Add replacement if not defined.
	(map_eai_to_gpg_error) [W32]: Take care of unsupported codes.

2015-10-26  Neal H. Walfield  <neal@g10code.com>

	gpg: Make sure we only have a single SQL statement.
	* g10/tofu.c (sqlite3_stepx): Make sure SQL only contains a single SQL
	statement.

	gpg: When the TOFU DB is in batch mode, periodically drop the locks.
	* g10/tofu.c: Include <sched.h>.
	(batch_update_started): New variable.
	(begin_transaction): If we've been in batch mode for a while, then
	commit any extant batch transactions.
	(tofu_begin_batch_update): If we are not in batch mode, initialize
	batch_update_started.

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

	dirmngr: Add workaround for broken getaddrinfo.
	* dirmngr/dns-stuff.c (resolve_name_standard): On failure retry by
	first resolving the CNAME.
	(get_dns_cname): New.

	* dirmngr/t-dns-stuff.c (main): Add option --cname.

	dirmngr: Better handle systems without IPv6 or IPv4.
	* dirmngr/dns-stuff.c (resolve_name_standard): Use AI_ADDRCONFIG.

	dirmngr: Replace use of getnameinfo by resolve_dns_addr.
	* dirmngr/ks-engine-hkp.c (my_getnameinfo): Remove.
	(map_host): Use resolve_dns_addr.

	dirmngr: Implement a getnameinfo wrapper.
	* dirmngr/dns-stuff.h (DNS_NUMERICHOST): New.
	(DNS_WITHBRACKET): New.
	* dirmngr/dns-stuff.c (resolve_name_standard): Factor code out to...
	(map_eai_to_gpg_error): new.
	(resolve_addr_standard): New.
	(resolve_dns_addr): New.

	* dirmngr/ks-engine-hkp.c (is_ip_address): Move to ...
	* dirmngr/dns-stuff.c (is_ip_address): here.  Add support for non
	bracketed v6 addresses.

	* dirmngr/t-dns-stuff.c: Remove header netdb.h.
	(main): Add option --bracket.  Use resolve_dns_name instead of
	getnameinfo.

2015-10-23  Neal H. Walfield  <neal@g10code.com>

	gpg: Provide an interface to patch TOFU updates.
	* g10/tofu.c (struct db): Rename begin_transaction to savepoint_batch.
	Rename end_transaction to savepoint_batch_commit.  Update users.
	Remove field rollback.  Add fields savepoint_inner and
	savepoint_inner_commit.  Add field batch_update.
	(dump_cache): New function.
	(batch_update): New variable.
	(begin_transaction). New function.
	(end_transaction): New function.
	(rollback_transaction): New function.
	(tofu_begin_batch_update): New function.
	(tofu_end_batch_update): New function.
	(closedb): End any pending batch transaction.
	(closedbs): Assert that none of the DBs have a started batch
	transaction if we not in batch mode.
	(record_binding): Use the begin_transaction, end_transaction and
	rollback_transaction functions instead of including the SQL inline.
	Also start a batch mode transaction if we are using the flat format.
	(tofu_register): Use the begin_transaction, end_transaction and
	rollback_transaction functions instead of including the SQL inline.
	* g10/gpgv.c (tofu_begin_batch_update): New function.
	(tofu_end_batch_update): New function.
	* g10/test-stubs.c (tofu_begin_batch_update): New function.
	(tofu_end_batch_update): New function.

	gpg: Cache prepared SQL queries and open DB connections.
	* g10/tofu.c: Include <stdarg.h>.
	(prepares_saved) [DEBUG_TOFU_CACHE]: New variable.
	(queries) [DEBUG_TOFU_CACHE]: New variable.
	(struct db): Add fields prevp, begin_transaction, end_transaction,
	rollback, record_binding_get_old_policy, record_binding_update,
	record_binding_update2, get_policy_select_policy_and_conflict,
	get_trust_bindings_with_this_email, get_trust_gather_other_user_ids,
	get_trust_gather_other_keys, register_already_seen, and
	register_insert.
	[DEBUG_TOFU_CACHE]: Add field hits.
	(STRINGIFY): New macro.
	(STRINGIFY2): New macro.
	(enum sqlite_arg_type): New enum.
	(sqlite3_stepx): New function.
	(combined_db): Remove variable.
	(opendb): Don't cache the combined db.
	(struct dbs): New struct.  Update users to use this as the head of the
	local DB list rather than overloading struct db.
	(unlink_db): New function.
	(link_db): New function.
	(db_cache): New variable.
	(db_cache_count): New variable.
	(DB_CACHE_ENTRIES): Define.
	(getdb): If the dbs specific cache doesn't include the DB, look at
	DB_CACHE.  Only if that also doesn't include the DB open the
	corresponding DB.
	(closedb): New function.
	(opendbs): Don't open the combined DB.  Just return an initialized
	struct dbs.
	(closedbs): Don't close the dbs specific dbs.  Attach them to the
	front of DB_CACHE.  If DB_CACHE contains more than DB_CACHE_ENTRIES,
	close enough dbs from the end of the DB_CACHE list such that DB_CACHE
	only contains DB_CACHE_ENTRIES.  Don't directly close the dbs, instead
	use the new closedb function.
	[DEBUG_TOFU_CACHE]: Print out some statistics.
	(record_binding): Use sqlite3_stepx instead of sqlite3_exec or
	sqlite3_exec_printf.
	(get_policy): Likewise.
	(get_trust): Likewise.
	(tofu_register): Likewise.

	gpg: Return the DBs meta-handle rather than the sqlite3 handle.
	* g10/tofu.c (getdb): Return a struct db * instead of an sqlite *.
	Update users.

	gpg: Use the proper type.
	* g10/options.h: Include "tofu.h".
	(opt.tofu_default_policy): Change type to enum tofu_policy.
	* g10/gpgv.c (enum tofu_policy): Don't redeclare.
	* g10/test-stubs.c (enum tofu_policy): Likewise.

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

	dirmngr: Implement Tor mode for SRV RRs.
	* dirmngr/dns-stuff.c (get_dns_cert): Factor adns init out to...
	(my_adns_init): new.
	(getsrv)[USE_ADNS]: Use my_adns_init.
	(getsrv)[!USE_ADNS]: Return an error if Tor mode is active.

	* dirmngr/t-dns-stuff.c: Add option --use-tor.

	dirmngr: Do not use MAXDNAME.
	* dirmngr/dns-stuff.c (getsrv): Replace MAXDNAME.
	* dirmngr/dns-stuff.h (MAXDNAME): Remove.
	(struct srventry): Use a fixed value instead of MAXDNAME.
	* dirmngr/http.c (connect_server): Use DIMof instead of MAXDNAME.
	Malloc a helper array.

	Move SRV RR code from common/ to dirmngr/.
	* common/srv.c: Merge into dirmngr/dns-stuff.c.  Delete file.
	* common/srv.h: Merge into dirmngr/dns-stuff.h.  Delete file.
	* common/Makefile.am (common_sources): Remove srv.c and srv.h.
	* g10/keyserver.c: Do not include srv.h.  The code using it is anyway
	disabled.
	* dirmngr/http.c: Remove header srv.h and stubs.
	* dirmngr/t-dns-stuff.c: Add option --srv.

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

	dirmngr: Use the new DNS wrapper for the HTTP module.
	* dirmngr/t-http.c (main): Init assuan sockets.
	* dirmngr/http.c: Include dns-stuff.h.
	(connect_server)[!HAVE_GETADDRINFO]: Remove all code.
	(connect_server): Change to use resolve_dns_name.

	dirmngr: Allow use of http.c if USE_NPTH is not defined.
	* dirmngr/http.c (send_request): Always set the gnutls pull/push
	functions.
	(my_npth_read): Rename to ...
	(my_gnutls_read) .. this.  Use system read if !USE_NPTH.
	(my_npth_write): Rename to ...
	(my_gnutls_write) .. this.  Use system write if !USE_NPTH.

	dirmngr: Check that getaddrinfo is available.
	* dirmngr/Makefile.am (t_http_SOURCES): Add dns-stuff.c.
	(t_ldap_parse_uri_SOURCES): Ditto.
	* dirmngr/dns-stuff.c: Bail out if neither ADNS nor getaddrinfo is
	available.

	dirmngr: Use the new DNS wrapper for the HKP engine.
	* dirmngr/ks-engine-hkp.c (my_getnameinfo): Change arg type to
	dns_addrinfo_t.
	(map_host): Replace getaddrinfo by resolve_dns_name.

	dirmngr: Implement a getaddrinfo wrapper.
	* dirmngr/dns-stuff.h: Include some header files.
	(dns_addinfo_t, dns_addrinfo_s): New.
	* dirmngr/dns-stuff.c: Always include DNS related headers.
	(free_dns_addrinfo): New.
	(resolve_name_standard): New.
	(resolve_dns_name): New.

	* dirmngr/t-dns-stuff.c: Include netdb.h.
	(main): Keep old default mode with no args but else print outout of
	resolve_dns_name.  Revamp option parser.

	common: Add more replacement error codes.
	* common/util.h (GPG_ERR_SERVER_FAILED): New.
	(GPG_ERR_NO_KEY): New.
	(GPG_ERR_NO_NAME): New.

2015-10-21  Neal H. Walfield  <neal@g10code.com>

	gpg: If the saved trust model is unknown, default to tofu+pgp.
	* g10/trustdb.c (init_trustdb): If the saved trust model is unknown,
	default to tofu+pgp instead of pgp.

	gpg: Don't accidentally free UTK_LIST.
	* g10/trustdb.c (validate_keys): Don't free UTK_LIST.

	gpg: When evaluating trust reg exps, treat tofu+pgp like pgp.
	* g10/trustdb.c (validate_one_keyblock): When checking trust regular
	expressions, treat the tofu+pgp trust model the same as the pgp trust
	model.

	gpg: If a key is ultimate trusted, return that in the tofu model.
	* g10/tofu.c (get_trust): If the policy is auto or none, check if the
	key is ultimately trusted.  If so, return that.
	(tofu_register): If the key is ultimately trusted, don't show any
	statistics.
	(tofu_get_validity): Likewise.

	gpg: Keep the trust DB up to date for the tofu and tofu+pgp models.
	* g10/trustdb.c (init_trustdb): Recognize tofu and tofu+pgp as
	possibly saved trust models.  Also register the ultimately trusted
	keys if the trust model is tofu or tofu+pgp.
	(check_trustdb): Don't skip if the trust model is tofu or tofu+pgp.
	(update_trustdb): Likewise.
	(tdb_check_trustdb_stale): Likewise.
	(validate_keys): If the trust model is TOFU, just write out the
	ultimately trusted keys.

	gpg: Factor out code into a standalone function.
	* g10/trustdb.c (tdb_keyid_is_utk): New function.
	(add_utk): Use it.

	dirmngr: Allow building with libassuan < 2.3.
	* dirmngr/http.c (send_request): Use newer assuan function only if
	available.

2015-10-21  Neal H. Walfield  <neal@g10code.com>
	    Andre Heinecke  <aheinecke@intevation.de>

	gpg: Make the tofu DB check and initialization atomic.
	* g10/tofu.c (initdb): Make the version check and the database
	initialization atomic.

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

	build: Make --disable-g13 the default.
	* Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Add --enable-g13.  Remove
	--enable-gpgtar because that is enabled anyway.
	* configure.ac: Do not build g13 by default.

	dirmngr: Rename file dns-cert.c.
	* dirmngr/dns-cert.c: Rename to dirmngr/dns-stuff.c.
	* dirmngr/dns-cert.h: Rename to dirmngr/dns-stuff.h and change
	includers.
	* dirmngr/t-dns-cert.c: Rename to dirmngr/t-dns-stuff.c.
	* dirmngr/Makefile.am: Adjust.

	common: Add status code for use by g13.
	* common/status.h (STATUS_PLAINTEXT_FOLLOWS): New.

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

	dirmngr: Prefer ADNS over system resolver.
	* configure.ac (HAVE_ADNS_IF_TORMODE): New ac_define.
	(USE_DNS_CERT): Prefer ADNS over the system resolver.
	* dirmngr/dns-cert.c (tor_mode): New global var.
	(enable_dns_tormode): New func.
	(get_dns_cert): Use DNS resolver at 8.8.8.8 in tor-mode.
	* dirmngr/server.c (cmd_dns_cert): If supported allow DNS requests.

	w32: Allow building again.
	* dirmngr/http.c (connect_server): Fix called function name.

	build: Allow building without SQLlite support.
	* configure.ac: Add option --dsiable-tofu and --disable-sqlite.
	(NEED_SQLITE_VERSION): New var.
	(USE_TOFU): New ac_define and am_conditional.
	* autogen.sh (build-w32): Add PKG_CONFIG_LIBDIR to configure so that
	pkg-config find the correct .pc file.

	* g10/Makefile.am (tofu_source): New.  Build only if enabled.
	* g10/gpg.c (parse_trust_model)[!USE_TOFU]: Disable tofu models.
	(parse_tofu_policy)[!USE_TOFU]: Disable all.
	(parse_tofu_db_format)[!USE_TOFU]: Disable all.
	(main) <aTOFUPolicy>[!USE_TOFU]: Skip.
	* g10/keyedit.c (show_key_with_all_names_colon)[!USE_TOFU]: Do not
	call tofu functions.
	* g10/keylist.c (list_keyblock_colon)[!USE_TOFU]: Ditto.
	* g10/trustdb.c (tdb_get_validity_core)[!USE_TOFU]: Skip tofu
	processing.

2015-10-20  Neal H. Walfield  <neal@g10code.com>

	gpg: Don't die immediately if the TOFU DB is locked.
	* g10/tofu.c (opendb): Don't die immediately if the DB is locked.

	gpg: Improve output.
	* g10/tofu.c (get_trust): Also show the binding when indicating a
	conflict occurred.

	gpg: Synchronize translation template.
	* g10/tofu.c (show_statistics): Synchronize translation template.

	gpg: When showing conflicts, also show bindings with no recorded sigs.
	* g10/tofu.c (signature_stats_collect_cb): If the time_ago column is
	NULL, then both time_ago and count should be 0.
	(get_trust): Reverse the direction of the join so that we also get
	statistics about bindings without any signatures.

	gpg: Improve text.
	* g10/tofu.c (show_statistics): Improve text.

	gpg: Use the right variable to display the information.
	* g10/tofu.c (get_trust): Use the right variable to display the
	conflicting key.

	gpg: Make failing to create a directory a soft error.
	* g10/tofu.c (getdb): Don't exit if we can't create the directory.
	Just return an error.

	common: Make sure tilde expansion works for the mkdir functions.
	* common/mkdir_p.c (gnupg_amkdir_p): Use make_filename_try on the
	first directory component as well.

	gpg: Remove unused prototype digest_algo_from_sig.
	* g10/packet.h (digest_algo_from_sig): Remove prototype without a
	corresponding implementation.

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

	dirmngr: Allow building with libassuan < 2.3.
	* dirmngr/dirmngr.c (set_tor_mode): Use newer assuan function only if
	available.
	* dirmngr/http.c (http_raw_connect): Ditto.

2015-10-19  Neal H. Walfield  <neal@g10code.com>

	gpg: Fix --desig-revoke.
	* g10/revoke.c (gen_desig_revoke): Add additional parameter ctrl.
	Check that the secret key is available.  If not, display an error
	message.

	gpg: Improve function documentation and some comments.
	* g10/main.h: Improve function documentation.
	* g10/packet.h.h: Improve function documentation.
	* g10/sig-check.c: Improve function documentation and some comments.

	gpg: Improve and regularize naming of signature checking functions.
	* g10/packet.h (signature_check): Rename from this...
	(check_signature): ... to this.  Update users.
	(signature_check2): Rename from this...
	(check_signature2): ... to this.  Update users.
	* g10/sig-check.c (do_check): Rename from this...
	(check_signature_end): ... to this.  Update users.
	(do_check_messages): Rename from this...
	(check_signature_metadata_validity): ... to this.  Update users.

	gpg: Mark local function as static.
	* g10/tdbio.c (put_record_into_cache): Mark as static.

2015-10-19  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>

	gpg: Print warning when rejecting weak digests.
	* g10/misc.c (print_md5_rejected_note): Rename to ..
	(print_digest_rejected_note): this.  Parameterize function to take an
	enum gcry_md_algos.
	* g10/sig-check.c: Use print_digest_rejected_note() when rejecting
	signatures.

	gpg: Add option --weak-digest to gpg and gpgv.
	* g10/options.h: Add additional_weak_digests linked list to opts.
	* g10/main.h: Declare weakhash linked list struct and
	additional_weak_digest() function to insert newly-declared weak
	digests into opts.
	* g10/misc.c: (additional_weak_digest): New function.
	(print_digest_algo_note): Check for deprecated digests; use proper
	gcry_md_algos type.
	* g10/sig-check.c: (do_check): Reject weak digests in addition to MD5.
	* g10/gpg.c: Add --weak-digest option to gpg.
	* doc/gpg.texi: Document gpg --weak-digest option.
	* g10/gpgv.c: Add --weak-digest option to gpgv.
	* doc/gpgv.texi: Document gpgv --weak-digest option.

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

	dirmngr: Make --use-tor work - still leaks DNS.
	* dirmngr/dirmngr.c (set_tor_mode): New.
	(main, reread_configuration): Call it.
	* dirmngr/http.c (http_raw_connect, send_request): Check whether TOR
	mode is enabled if the FORCE_TOR flag is given.

	dirmngr: Use Assuan socket wrappers for http.c.
	* dirmngr/http.c: Include assuan.h.  Changed all code taking a socket
	descriptor from int to assuan_fd_t.
	(my_unprotect, my_protect): New.
	(my_connect): Remove.
	(_my_socket_new, _my_socket_unref): use assuan_sock_close.
	(connect_server): Use assuan_sock_connect, assuan_sock_new, and
	assuan_sock_close.
	* dirmngr/Makefile.am (t_common_ldadd): Add LIBASSUAN_LIBS.

2015-10-19  Neal H. Walfield  <neal@g10code.com>

	gpg: Fix formatting.
	* g10/tofu.c (get_trust): Fix formatting.

	gpg: Don't forget to free some memory.
	* g10/tofu.c (tofu_register): Free SIG_DIGEST before returning.

	gpg: If a conflict occurs in batch mode, record that.
	* g10/tofu.c (get_trust): If a conflict occurs when MAY_ASK is false,
	set conflict to the key.  When prompting the user, don't show the
	conflicting key if the conflicting key is the current key.

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

	gpg: Silence two more warnings.
	* g10/trustdb.c (tdb_get_validity_core): Silence a warning.
	* g10/tofu.c (tofu_register): Move SIG_DIGEST computation to the top
	so that it is not uninitialized in case of an early error.

	gpg: Fix harmless compiler warnings.
	* g10/tofu.h (_tofu_GET_POLICY_ERROR): New.  This avoids warnings
	about undefined enum values in a switch.
	* g10/trustdb.h (_tofu_GET_TRUST_ERROR): New.
	* g10/tofu.c (TIME_AGO_FUTURE_IGNORE): Move to the top.
	(opendbs): Avoid compiler warning (use braces).
	(GET_POLICY_ERROR): Replace define by enum _tofu_GET_POLICY_ERROR.
	(get_policy): Remove assert.
	(GET_TRUST_ERROR): Replace by _tofu_GET_TRUST_ERROR macro.
	(show_statistics): Undef MIN_SECS et al. after use.

	common: Avoid warning about const char ** assignment.
	* common/mkdir_p.c (gnupg_amkdir_p): Also strdup first item.  Return
	an error on malloc failure.
	(gnupg_mkdir_p): Fix type of dirs and tmp_dirs.

	Move http module from common/ to dirmngr/.
	* common/http.c: Move to ../dirmngr/.
	* common/http.h: Move to ../dirmngr/.
	* common/t-http.c: Move to ../dirmngr/.
	* common/tls-ca.pem: Move to ../dirmngr/.
	* common/Makefile.am: Do not build libcommontls.a libcommontlsnpth.a.
	Remove http.c related stuff.
	* po/POTFILES.in: Move http.c to dirmngr/.
	* dirmngr/Makefile.am (EXTRA_DIST): Add tls-ca.pem.
	(module_maint_tests): New.
	(noinst_PROGRAMS): Add module_maint_tests.
	(dirmngr_SOURCES): Add http.c and http.h.
	(dirmngr_LDADD): Remove libcommontlsnpth.
	(t_common_ldadd): Ditto.
	(t_http_SOURCES, t_http_CFLAGS, t_http_LDADD): New.
	(t_ldap_parse_uri_SOURCES): Add http.c.
	(t_ldap_parse_uri_CFLAGS): Build without npth.
	($(PROGRAMS)): Do not require libcommontls.a libcommontlsnpth.a.
	* dirmngr/dirmngr.h, dirmngr/ks-engine.h: Fix include of http.h.

2015-10-18  Neal H. Walfield  <neal@g10code.com>

	g10: Fix assert.
	* g10/tofu.c (get_trust): Fix assert.

	g10: Add TOFU support.
	* configure.ac: Check for sqlite3.
	(SQLITE3_CFLAGS): AC_SUBST it.
	(SQLITE3_LIBS): Likewise.
	* g10/Makefile.am (AM_CFLAGS): Add $(SQLITE3_CFLAGS).
	(gpg2_SOURCES): Add tofu.h and tofu.c.
	(gpg2_LDADD): Add $(SQLITE3_LIBS).
	* g10/tofu.c: New file.
	* g10/tofu.h: New file.
	* g10/options.h (trust_model): Define TM_TOFU and TM_TOFU_PGP.
	(tofu_db_format): Define.
	* g10/packet.h (PKT_signature): Add fields digest and digest_len.
	* g10/gpg.c: Include "tofu.h".
	(cmd_and_opt_values): Declare aTOFUPolicy, oTOFUDefaultPolicy,
	oTOFUDBFormat.
	(opts): Add them.
	(parse_trust_model): Recognize the tofu and tofu+pgp trust models.
	(parse_tofu_policy): New function.
	(parse_tofu_db_format): New function.
	(main): Initialize opt.tofu_default_policy and opt.tofu_db_format.
	Handle aTOFUPolicy, oTOFUDefaultPolicy and oTOFUDBFormat.
	* g10/mainproc.c (do_check_sig): If the signature is good, copy the
	hash to SIG->DIGEST and set SIG->DIGEST_LEN appropriately.
	* g10/trustdb.h (get_validity): Add arguments sig and may_ask.  Update
	callers.
	(tdb_get_validity_core): Add arguments sig and may_ask.  Update
	callers.
	* g10/trust.c (get_validity) Add arguments sig and may_ask.  Pass them
	to tdb_get_validity_core.
	* g10/trustdb.c: Include "tofu.h".
	(trust_model_string): Handle TM_TOFU and TM_TOFU_PGP.
	(tdb_get_validity_core): Add arguments sig and may_ask.  If
	OPT.TRUST_MODEL is TM_TOFU or TM_TOFU_PGP, compute the TOFU trust
	level.  Combine it with the computed PGP trust level, if appropriate.
	* g10/keyedit.c: Include "tofu.h".
	(show_key_with_all_names_colon): If the trust mode is tofu or
	tofu+pgp, then show the trust policy.
	* g10/keylist.c: Include "tofu.h".
	(public_key_list): Also show the PGP stats if the trust model is
	TM_TOFU_PGP.
	(list_keyblock_colon): If the trust mode is tofu or
	tofu+pgp, then show the trust policy.
	* g10/pkclist.c: Include "tofu.h".
	* g10/gpgv.c (get_validity): Add arguments sig and may_ask.
	(enum tofu_policy): Define.
	(tofu_get_policy): New stub.
	(tofu_policy_str): Likewise.
	* g10/test-stubs.c (get_validity): Add arguments sig and may_ask.
	(enum tofu_policy): Define.
	(tofu_get_policy): New stub.
	(tofu_policy_str): Likewise.
	* doc/DETAILS: Describe the TOFU Policy field.
	* doc/gpg.texi: Document --tofu-set-policy, --trust-model=tofu,
	--trust-model=tofu+pgp, --tofu-default-policy and --tofu-db-format.
	* tests/openpgp/Makefile.am (TESTS): Add tofu.test.
	(TEST_FILES): Add tofu-keys.asc, tofu-keys-secret.asc,
	tofu-2183839A-1.txt, tofu-BC15C85A-1.txt and tofu-EE37CF96-1.txt.
	(CLEANFILES): Add tofu.db.
	(clean-local): Add tofu.d.
	* tests/openpgp/tofu.test: New file.
	* tests/openpgp/tofu-2183839A-1.txt: New file.
	* tests/openpgp/tofu-BC15C85A-1.txt: New file.
	* tests/openpgp/tofu-EE37CF96-1.txt: New file.
	* tests/openpgp/tofu-keys.asc: New file.
	* tests/openpgp/tofu-keys-secret.asc: New file.

2015-10-16  Neal H. Walfield  <neal@g10code.com>

	common: Prefix the mkdir functions with gnupg_.  Make args const.
	* common/mkdir_p.h (mkdir_p): Rename from this...
	(gnupg_mkdir_p): ... to this.  Change directory_component's type from
	char * to const char *.
	(amkdir_p): Rename from this...
	(gnupg_amkdir_p): ... to this.  Change directory_component's type from
	char * to const char *.
	* common/mkdir_p.c (mkdir_p): Rename from this...
	(gnupg_mkdir_p): ... to this.  Change directory_component's type from
	char * to const char *.
	(amkdir_p): Rename from this...
	(gnupg_amkdir_p): ... to this.  Change directory_component's type from
	char * to const char *.

2015-10-14  NIIBE Yutaka  <gniibe@fsij.org>

	cleanup: Fix confusion between gpg_error_t and gpg_err_code_t.
	* dirmngr/crlcache.c (hash_dbfile): Use gpg_error_t for ERR.
	* kbx/keybox-update.c (keybox_set_flags): Call
	gpg_err_code_from_syserror.

2015-10-13  NIIBE Yutaka  <gniibe@fsij.org>

	po: Update Japanese translation.

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

	gpg: Try hard to use MDC also for sign+symenc.
	* g10/encrypt.c (use_mdc): Make it a global func.
	* g10/sign.c (sign_symencrypt_file): Use that function to decide
	whether to use an MDC.
	* tests/openpgp/conventional-mdc.test: Add a simple test case.

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

	Release 2.1.9.

2015-10-09  NIIBE Yutaka  <gniibe@fsij.org>

	agent: simplify agent_get_passphrase.
	* agent/call-pinentry.c (agent_get_passphrase): Simplify.

	agent: fix agent_askpin.
	* agent/call-pinentry.c (agent_askpin): Fix off-by-one error.

	agent: Fix function return type for check_cb and agent_askpin.
	* agent/call-pinentry.c (unlock_pinentry): Return gpg_error_t.
	(start_pinentry, setup_qualitybar): Likewise.
	(agent_askpin): Fix return value check of check_cb.
	* agent/command-ssh.c (reenter_compare_cb): Return gpg_error_t.
	(ssh_identity_register): Fix return value check of agent_askpin.
	* agent/cvt-openpgp.c (try_do_unprotect_cb): Return gpg_error_t.
	* agent/findkey.c (try_unprotect_cb): Likewise.
	* agent/genkey.c (reenter_compare_cb): Return gpg_error_t.
	(agent_ask_new_passphrase): Fix return value check of agent_askpin.

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

	dirmngr: Default to http protocol for http-proxy.
	* common/http.c (send_request): Fix handling for hostname:port string.

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

	common: Allow building of mkdir_p.c for Windows.
	* common/mkdir_p.c: Change license and comment debug statements.
	(amkdir_p, mkdir_p): Fail on malloc error and use default_errsource to
	build an error code.  Change return value to gpg_error_t.
	(amkdir_p): Use gnupg_mkdir.

	* common/membuf.c: Include util.h first to avoid redefined macro
	warnings.

	gpg: Add option --print-dane-records.
	* g10/options.h (opt): Add field "print_dane_records".
	* g10/gpg.c (oPrintDANERecords): new.
	(opts): Add --print-dane-records.
	(main): Set that option.
	* g10/export.c (do_export): Remove EXPORT_DANE_FORMAT handling.
	(do_export_stream): Add EXPORT_DANE_FORMAT handling.
	* g10/keylist.c (list_keyblock_pka): Implement DANE record printing.

	* g10/gpgv.c (export_pubkey_buffer): New stub.
	* g10/test-stubs.c (export_pubkey_buffer): New stub.

	gpg: Pass CTRL parameter to all key listing functions.
	* g10/keylist.c (public_key_list): Add arg CTRL.
	(secret_key_list): Ditto.
	(list_all, list_one): Ditto.
	(locate_one): Ditto.
	(list_keyblock_pka): Ditto.
	(list_keyblock): Ditto.
	(list_keyblock_direct): Ditto.
	* g10/keygen.c (proc_parameter_file): Add arg CTRL.
	(read_parameter_file): Ditto.
	(quick_generate_keypair): Ditto.
	(do_generate_keypair): Ditto.
	(generate_keypair): Pass arg CTRL.
	* g10/gpg.c (main): Pass arg CTRL to quick_generate_keypair.

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

	gpg: Remove unfinished experimental code to export as S-expressions.
	* g10/options.h (EXPORT_SEXP_FORMAT): Remove.
	(EXPORT_DANE_FORMAT): New.
	* g10/export.c (parse_export_options): Remove "export-sexp-format".
	(export_seckeys): Adjust for removed option.
	(export_secsubkeys): Ditto.
	(do_export): Prepare for DANE format.
	(build_sexp, build_sexp_seckey): Remove.
	(do_export_stream): Remove use of removed functions.

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

	gpg: Add new --auto-key-locate mechanism "dane".
	* g10/call-dirmngr.c (gpg_dirmngr_dns_cert): Allow fetching via DANE.
	* g10/keyserver.c (keyserver_import_cert): Add arg "dane_mode".
	* g10/options.h (AKL_DANE): New.
	* g10/getkey.c (get_pubkey_byname): Implement AKL_DANE.
	(parse_auto_key_locate): Ditto.

	dirmngr: Addlow fetching keys using OpenPGP DANE.
	* dirmngr/server.c (cmd_dns_cert): Add option --dane.

	dirmngr: Improve DNS code to retrieve arbitrary records.
	* dirmngr/dns-cert.c (get_dns_cert): Add hack to retrieve arbitrary
	resource records.
	* dirmngr/dns-cert.h (DNS_CERTTYPE_RRBASE): New.
	(DNS_CERTTYPE_RR61): New.

	dirmngr: Change DNS code to make additions easier.
	* dirmngr/dns-cert.c (get_dns_cert) [!USE_ADNS]: Change loop to allow
	adding more resource types.

	dirmngr: Make commands RELOADDIRMNGR and KILLDIRMNGR work properly.
	* dirmngr/server.c (cmd_killdirmngr): Set assuan close flag.
	(cmd_reloaddirmngr): Use check_owner_permission.

	dirmngr: Do tilde expansion for --hkp-cacert.
	* dirmngr/dirmngr.c (parse_rereadable_options): Do tilde expansion and
	check for cert file existance in option --hkp-cacert.

	gpg: Fail decryption for AES etc message w/o MDC.
	* g10/mainproc.c (proc_encrypted): Fail for modern messages w/o MDC.

2015-10-06  NIIBE Yutaka  <gniibe@fsij.org>

	agent: Fix verification of signature for smartcard.
	* agent/pksign.c (agent_pksign_do): Use public key smartcard.

	agent: Fix non-allocation for pinentry_loopback.
	* agent/call-pinentry.c (agent_get_passphrase): Don't allocate, it will
	be allocated by pinentry_loopback.

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

	gpg: Install a dirmngr.conf file.
	* g10/dirmngr-conf.skel: New.
	* g10/Makefile.am (EXTRA_DIST): Add file.
	(install-data-local, uninstall-local): Install that file.
	* g10/openfile.c (copy_options_file): Add arg "name", return a value,
	simplify with xstrconcat, and factor warning message out to:
	(try_make_homedir): here.  Also install dirmngr.conf.
	* g10/options.skel: Remove --keyserver entry.

	gpg: Deprecate the --keyserver option.
	* g10/keyserver.c (keyserver_refresh): Change return type to
	gpg_error_t.  Use gpg_dirmngr_ks_list to print the name of the
	keyserver to use.
	(keyserver_search): Do not print the "no keyserver" error
	message.  The same error is anyway returned from dirmngr.
	* g10/call-dirmngr.c (ks_status_parm_s): Add field "keyword".
	(ks_status_cb): Handle other status keywords.
	(gpg_dirmngr_ks_list): New.
	* tools/gpgconf-comp.c (gc_options_gpg): Deprecate "keyserver".
	(gc_options_dirmngr): Add "Keyserver" group and "keyserver".

	dirmngr: Add option --keyserver.
	* dirmngr/dirmngr.c (oKeyServer): New.
	(opts): Add "keyserver".
	(parse_rereadable_options): Parse that options
	(main): Add option to the gpgconf list.
	* dirmngr/dirmngr.h (opt): Add field "keyserver".
	* dirmngr/server.c (ensure_keyserver): New.
	(make_keyserver_item): New.  Factored out from
	(cmd_keyserver): here.  Call ensure_keyserver.
	(cmd_ks_search): Call ensure_keyserver.
	(cmd_ks_get): Ditto.
	(cmd_ks_fetch): Ditto.
	(cmd_ks_put): Ditto.

	dirmngr: Make clear that --use-tor is not yet ready for use.
	* dirmngr/dirmngr.c (main): Print a warning if --use-tor has been
	given.
	* tools/gpgconf-comp.c (gc_options_dirmngr): Make --use-tor invisible.

	gpgconf: Change displayed name of Dirmngr to "Key Acquirer".
	* tools/gpgconf-comp.c (gc_component): Change printed name.

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

	dirmngr: Fix use-after-free due to a realloc shrinking.
	* dirmngr/ks-engine-hkp.c (map_host): Do not use original pointer
	after realloc.

	agent: Fix alignment problem with the second passphrase struct.
	* agent/genkey.c (agent_ask_new_passphrase): Use a separate malloc for
	PI2.  Check return value of the malloc function.
	* agent/command-ssh.c (ssh_identity_register): Use a separate malloc
	for PI2.  Wipe PI2.

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

	gpg: Fix a practical hang after use of --faked-system-time.
	* g10/sign.c (update_keysig_packet): Bail out if we would need to long
	for a new timestamp.

	gpg: Print more info with "check selfsig".
	* g10/keyedit.c (print_and_check_one_sig): Print more Some sigsub
	packets.

	gpg: Add debug helper to --edit-keys's check sub-command.
	* g10/keyedit.c (print_and_check_one_sig): Add arg "extended" and
	print an asterisk for the chosen selfsig.
	(check_all_keysigs): Add arg "only_selfsig"
	(keyedit_menu) <cmdCHECK>: Add optional arg "selfsig".

2015-10-01  NIIBE Yutaka  <gniibe@fsij.org>

	common: Fix strsplit.
	* common/stringhelp.c (strsplit): Fix arguments order.

2015-09-30  Neal H. Walfield  <neal@g10code.com>

	common: Add mkdir_p.
	* common/mkdir_p.c: New file.
	* common/mkdir_p.h: New file.
	* common/Makefile.am (common_sources): Add mkdir_p.c and mkdir_p.h.

	common: Remove unused files.
	* common/xmalloc.c: Remove file.
	* common/xmalloc.h: Remove file.

	common: Include <gpg-error.h>.
	* common/logging.h: Include <gpg-error.h>.

2015-09-29  Neal H. Walfield  <neal@g10code.com>

	g10: Remove unused struct cmp_help_context_s.
	* g10/sig-check.c (struct cmp_help_context_s) Remove unused struct.

	g10: Avoid an unnecessary copy.
	* g10/sig-check.c (signature_check2): Avoid copying PK to RET_PK.
	Instead, directly use the provided storage.  If none is provided
	allocate some.

2015-09-29  NIIBE Yutaka  <gniibe@fsij.org>

	ssh: Fix fingerprint computation for EdDSA key.
	* common/ssh-utils.c (get_fingerprint): Handle the prefix of 0x40.
	* common/t-ssh-utils.c (sample_keys): Add a new key.

	agent: RSA signature verification by gpg-agent.
	* g10/sign.c (do_sign): Let verify signature by gpg-agent.
	* agent/pksign.c (agent_pksign_do): Call gcry_pk_verify for RSA.

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

	common: Provide two new error code replacements.
	* common/util.h (GPG_ERR_FALSE, GPG_ERR_TRUE): Rew replcements.

	common: Change calling convention for gnupg_spawn_process.
	* common/exechelp.h (GNUPG_SPAWN_NONBLOCK): New.
	(GNUPG_SPAWN_RUN_ASFW, GNUPG_SPAWN_DETACHED): Macro to replace the
	numbers.
	* common/exechelp.h (gnupg_spawn_process): Change function to not take
	an optional stream for stdin but to return one.
	* common/exechelp-posix.c (gnupg_spawn_process): Implement change.
	(create_pipe_and_estream): Add args outbound and nonblock.
	* common/exechelp-w32.c (gnupg_spawn_process): Implement change.

2015-09-28  NIIBE Yutaka  <gniibe@fsij.org>

	scd: Handle error correctly.
	* scd/apdu.c (apdu_connect): Initialize variables and check an error
	of apdu_get_status_internal.

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

	ssh: Add 256, 384 and 521 bit test keys for the fingerprint.
	* common/t-ssh-utils.c (sample_keys): Add 3 new keys.

	ssh: Fix fingerprint computation for 384 bit ECDSA keys.
	* common/ssh-utils.c (get_fingerprint): Fix hashed string.

2015-09-19  NIIBE Yutaka  <gniibe@fsij.org>

	agent: Fix importing ECC key.
	* agent/cvt-openpgp.c (convert_from_openpgp_main): Only encrypted
	parameters are stored as opaque.
	(apply_protection): ARRAY members are all normal, non-opaque MPI.
	(extract_private_key): Get public key as normal, non-opaque MPI.
	Remove support of ECC key with '(flags param)'.
	Remove support of "ecdsa" and "ecdh" keys of our experiment.

	scd: Fix KEYTOCARD handling for ECC key.
	* scd/app-openpgp.c (ecc_writekey): Only public key can be native
	format.

2015-09-19  Neal H. Walfield  <neal@g10code.com>

	common: Add new function strlist_length.
	* common/strlist.c (strlist_length): New function.

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

	gpgconf: Change displayed name of Dirmngr to "Network Manager".
	* tools/gpgconf-comp.c (gc_component): Change printed name.

	dirmngr: Add option --use-tor as a stub.
	* dirmngr/dirmngr.h (opt): Add field "use_tor".
	* dirmngr/dirmngr.c (oUseTor): New.
	(opts): Add --use-tor.
	(parse_rereadable_options): Set option.
	(main): Tell gpgconf about that option.

	* dirmngr/crlfetch.c (crl_fetch): Pass TOR flag to the http module and
	return an error if LDAP is used in TOR mode.
	(ca_cert_fetch): Return an error in TOR mode.
	(start_cert_fetch): Ditto.
	* dirmngr/ks-engine-finger.c (ks_finger_fetch): Pass TOR flag to the
	http module.
	* dirmngr/ks-engine-hkp.c (send_request): Ditto.
	* dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
	* dirmngr/ks-engine-ldap.c (ks_ldap_get): Return an error in TOR mode.
	(ks_ldap_search): Ditto.
	(ks_ldap_put): Ditto.
	* dirmngr/ocsp.c (do_ocsp_request): Ditto.  Also pass TOR flag to the
	http module.

	* dirmngr/server.c (option_handler): Add "honor-keyserver-url-used".
	(cmd_dns_cert): Return an error in TOR mode.
	(cmd_getinfo): Add subcommand "tor"
	* tools/gpgconf-comp.c (gc_options_dirmngr): Add TOR group.

	gpg: Report a conflict between honor-keyserver-url and TOR.
	* g10/call-dirmngr.c (create_context): Send option and print a verbose
	error.

	http: Add flag to force use of TOR (part 1)
	* common/http.h (HTTP_FLAG_FORCE_TOR): New.
	* common/http.c (http_raw_connect, send_request): Detect flag and
	return an error for now.

2015-09-17  NIIBE Yutaka  <gniibe@fsij.org>

	po: Update Japanese translation.

	scd: Fix ccid-driver timeout for OpenPGPcard v2.1.
	* scd/ccid-driver.c (CCID_CMD_TIMEOUT): New.
	(ccid_transceive_apdu_level, ccid_transceive): Use.

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

	agent: New option --pinentry-invisible-char.
	* agent/gpg-agent.c (oPinentryInvisibleChar): New.
	(opts): Add option.
	(parse_rereadable_options): Set option.
	* agent/agent.h (opt): Add field pinentry_invisible_char.
	* agent/call-pinentry.c (start_pinentry): Pass option to pinentry.

	g13: Move some code to a separate module.
	* g13/g13-common.c, g13/g13-common.h: New.
	* g13/Makefile.am (g13_SOURCES): Add new files.
	* g13/g13.c (g13_errors_seen): Move to g13-common.c.
	(cmdline_conttype): New.
	(main): Use g13_init_signals and g13_install_emergency_cleanup.
	(emergency_cleanup, g13_exit): Move to g13-common.c.
	* g13/g13.h: Move OPT and some other code to g13-common.h.

	gpg: Fix skip function dummy parameter.
	* g10/trustdb.c (search_skipfnc): Fix dummy argument

	gpg: Change last commit to avoid extra translations.
	* g10/keyedit.c (keyedit_menu): Do not print usage hints in expert
	mode.

2015-09-16  Neal H. Walfield  <neal@g10code.com>

	g10: Improve error message.
	* g10/keyedit.c (keyedit_menu): When complaining that a user ID or key
	must be selected, indicate what command to use to do this.

	g10: Be more careful when merging self-signed data.
	* g10/getkey.c (merge_selfsigs_main): Stop looking for self-signed
	data belonging to the public key when we encounter an attribute packet
	or a subkey packet, not just a user id packet.  When looking for
	self-signed data belonging to a user id packet, stop when we see a
	user attribute packet.

	g10: Simplify some complicated boolean expressions.
	* g10/getkey.c (finish_lookup): Simplify logic.

	g10: Also mark revoked and expired keys as unusable.
	* g10/getkey.c (skip_unusable): Also mark the key as unusable if it
	has been revoked or has expired.

	g10: Release resources when returning an error in get_seckey.
	* g10/getkey.c (get_seckey): If the key doesn't have a secret key,
	release *PK.

	g10: Improve documentation and comments for getkey.c.
	* g10/getkey.c: Improve documentation and comments for most
	functions.  Move documentation for public functions from here...
	* g10/keydb.h: ... to here.

	g10: Remove unused function have_any_secret_key.
	* g10/getkey.c (have_any_secret_key): Remove function.

	g10: Bring cache semantics closer to non-cache semantics.
	* g10/getkey.c (get_pubkey_fast): When reading from the cache, only
	consider primary keys.

	g10: Break out of the loop earlier.
	* g10/getkey.c (have_secret_key_with_kid): Once we find the relevent
	key or subkey, stop searching.

	g10: Don't skip legacy keys if the search mode is KEYDB_SEARCH_MODE_NEXT
	* g10/getkey.c (lookup): Also don't skip legacy keys if the search
	mode is KEYDB_SEARCH_MODE_NEXT.

	g10: Remove unused function get_seckeyblock_byfprint.
	* g10/keydb.h (get_seckeyblock_byfprint): Remove prototype.
	* g10/getkey.c (get_seckeyblock_byfprint): Remove function.

	g10: Remove unused function get_seckey_byfprint.
	* g10/keydb.h (get_seckey_byfprint): Remove prototype.
	* g10/getkey.c (get_seckey_byfprint): Remove function.

	g10: Simplify get_seckey_byname: it was never called with NAME not NULL.
	* g10/keydb.h (get_seckey_byname): Rename from this...
	(get_seckey_default): ... to this.  Drop the parameter name.  Update
	users.
	* g10/getkey.c (get_seckey_byname): Rename from this...
	(get_seckey_default): ... to this.  Drop the parameter name.  Drop the
	code which assumed that NAME is not NULL.

	g10: Eliminate the redundant function get_keyblock_byfprint.
	* g10/keydb.h (get_keyblock_byfprint): Remove prototype.  Replace use
	of this function with get_pubkey_byfprint.
	* g10/getkey.c (get_pubkey_byname): Remove function.

	g10: Simplify semantics of get_pubkey_byname.
	* g10/getkey.c (get_pubkey_byname): If R_KEYBLOCK is not NULL, return
	the keyblock in R_KEYBLOCK independent of whether PK is set or not.

	g10: Eliminate the redundant function get_pubkey_byname.
	* g10/getkey.c (get_pubkey_byname): Remove function.
	(lookup): Replace use of get_pubkey_byname by get_pubkey_byfprint.

	g10: Eliminate the redundant function get_pubkey_end.
	* g10/keydb.h (get_pubkey_end): Remove declaration.  Replace use of
	function with getkey_end.
	* g10/getkey.c (get_pubkey_byname): Remove function.

	g10: Eliminate the redundant function get_pubkey_next.
	* g10/keydb.h (get_pubkey_next): Remove prototype.
	* g10/getkey.c (get_pubkey_next): Remove function.
	* g10/keylist.c (locate_one): Use getkey_next instead of
	get_pubkey_next.

	kbx: Change skipfnc's prototype so that we can provide all information.
	* kbx/keybox-search-desc.h (struct keydb_search_desc.skipfnc): Change
	third parameter to be the index of the user id packet in the keyblock
	rather than the packet itself.  Update users.

	g10: Remove unused prototype (get_pubkey_byfpr).
	* g10/keydb.h (get_pubkey_byfpr): Remove unused prototype.

	g10: Remove unused function (get_pubkey_bynames).
	* g10/keydb.h (get_pubkey_bynames): Remove prototype.
	* g10/getkey.c (get_pubkey_bynames): Remove function.

	g10: Simplify code.  Turn struct getkey_ctx_s.found_key into an argument
	* g10/getkey.c (struct getkey_ctx_s): Remove field found_key.
	(lookup): Add argument ret_found_key.  If not NULL, set it to the
	found key.  Update callers.
	(pk_from_block): Add argument found_key.  Use it instead of
	CTX->FOUND_KEY.  Update callers.
	(finish_lookup): Return a KBNODE (the found key) instead of an int.
	Don't set CTX->FOUND_KEY.  Return the found key instead.

	g10: Remove unused field struct getkey_ctx_s.kbpos.
	* g10/getkey.c (struct getkey_ctx_s): Remove field kbpos.
	(getkey_end): Don't clear CTX->KBPOS.

	g10: Simplify code: remove field struct getkey_ctx_s.keyblock.
	* g10/getkey.c (struct getkey_ctx_s): Remove field keyblock.
	(finish_lookup): Add parameter keyblock.  Update caller to pass this.
	(lookup): Add new local variable keyblock.  Use this instead of
	ctx->keyblock for referencing the keyblock.

2015-09-16  NIIBE Yutaka  <gniibe@fsij.org>

	agent: Fix registering SSH Key of Ed25519.
	* agent/command-ssh.c (stream_read_string): Add the prefix of 0x40.

2015-09-15  NIIBE Yutaka  <gniibe@fsij.org>

	po: Update Japanese translation.

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

	Release 2.1.8.

	tests: Silence the 5gb-packet test.
	* tests/openpgp/4gb-packet.test: Send output to /dev/null.

	g10: Fix make distcheck problem.
	* g10/test.c: Include string.h.
	(prepend_srcdir): New.  Taken from Libgcrypt.
	(test_free): New.
	* g10/t-keydb.c (do_test): Malloc the filename.
	* g10/Makefile.am (AM_CPPFLAGS): Remove -DSOURCE_DIR
	(EXTRA_DIST): Add t-keydb-keyring.kbx.

	g10: Improve portability of the new test driver.
	* g10/test.c: Include stdio.h and stdlib.h.
	(verbose): New.
	(print_results): Rename to exit_tests.
	(main): Remove atexit and call exit_tests.  Set verbose.
	(ASSERT, ABORT): Call exit_tests instead of exit.

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

	dirmngr: Allow sending much larger keyblocks.
	* dirmngr/server.c (MAX_CERT_LENGTH): Increase to 16k.
	(MAX_KEYBLOCK_LENGTH): Increase to 20M.

2015-09-07  NIIBE Yutaka  <gniibe@fsij.org>

	scd: Force key attribute change for writekey.
	* scd/app-openpgp.c (change_rsa_keyattr): New.
	(change_keyattr_from_string): Use change_rsa_keyattr.
	(rsa_writekey): Call change_rsa_keyattr when different size.
	(ecc_writekey): Try to change key attribute.

	scd: KEYNO cleanup.
	* scd/app-openpgp.c (get_public_key, send_keypair_info, do_readkey)
	(change_keyattr, change_keyattr_from_string, ecc_writekey, do_genkey)
	(compare_fingerprint, check_against_given_fingerprint): KEYNO starts
	from 0.

2015-09-02  Neal H. Walfield  <neal@g10code.com>

	g10: Remove unused field req_algo.
	* g10/packet.h (PKT_public_key): Remove unused field req_algo.  Remove
	users.
	* g10/getkey.c (struct getkey_ctx_s): Remove unused field req_algo.
	Remove users.

	g10: Use a symbolic constant instead of a literal.
	* g10/trustdb.c (KEY_HASH_TABLE_SIZE): Define.
	(new_key_hash_table): Use KEY_HASH_TABLE_SIZE instead of a literal.
	(release_key_hash_table): Likewise.
	(test_key_hash_table): Likewise.
	(add_key_hash_table): Likewise.

	g10: Add test for keydb as well as new testing infrastructure.
	* g10/Makefile.am (EXTRA_DIST): Add test.c.
	(AM_CPPFLAGS): Add -DSOURCE_DIR="\"$(srcdir)\"".
	(module_tests): Add t-keydb.
	(t_keydb_SOURCES): New variable.
	(t_keydb_LDADD): Likewise.
	* g10/t-keydb.c: New file.
	* g10/t-keydb-keyring.kbx: New file.
	* g10/test-stubs.c: New file.
	* g10/test.c: New file.

	g10: Make the keyblock cache per-handle rather than global.
	* g10/keydb.c (keyblock_cache): Don't declare this variable.  Instead...
	(struct keyblock_cache): ... turn its type into this first class
	object...
	(struct keydb_handle): ... and instantiate it once per database
	handle.  Update all users.
	(keydb_rebuild_caches): Don't invalidate the keyblock cache.

	g10: If iobuf_seek fails when reading from the cache, do a hard read.
	* g10/keydb.c (keydb_get_keyblock): If the iobuf_seek fails when
	reading from the cache, then simply clear the cache and try reading
	from the database.

	iobuf: Reduce verbosity of test.
	* common/t-iobuf.c (main): Reduce verbosity.

	iobuf: Add the IOBUF_INPUT_TEMP type to improve input temp handling.
	* common/iobuf.h (enum iobuf_use): Add new member, IOBUF_INPUT_TEMP.
	* common/iobuf.c (iobuf_temp_with_content): Create the iobuf as an
	IOBUF_INPUT_TEMP, not an IOBUF_INPUT buffer.  Assert that LENGTH ==
	A->D.SIZE.
	(iobuf_push_filter2): If A is an IOBUF_INPUT_TEMP, then make the new
	filter an IOBUF_INPUT filter and set its buffer size to
	IOBUF_BUFFER_SIZE.
	(underflow): If A is an IOBUF_INPUT_TEMP, then just return EOF; don't
	remove already read data.
	(iobuf_seek): If A is an IOBUF_INPUT_TEMP, don't discard the buffered
	data.
	(iobuf_alloc): Allow USE == IOBUF_INPUT_TEMP.
	(pop_filter): Allow USE == IOBUF_INPUT_TEMP.
	(iobuf_peek): Allow USE == IOBUF_INPUT_TEMP.
	(iobuf_writebyte): Fail if USE == IOBUF_INPUT_TEMP.
	(iobuf_write): Fail if USE == IOBUF_INPUT_TEMP.
	(iobuf_writestr): Fail if USE == IOBUF_INPUT_TEMP.
	(iobuf_flush_temp): Fail if USE == IOBUF_INPUT_TEMP.

	iobuf: Rename IOBUF_TEMP to IOBUF_OUTPUT_TEMP.
	* common/iobuf.h (enum iobuf_use): Rename IOBUF_TEMP to
	IOBUF_OUTPUT_TEMP.  Update users.

	iobuf: Use a first-class enum.
	* common/iobuf.h (enum iobuf_use): Name the IOBUF_OUTPUT, etc. enum.
	(struct iobuf_struct): Change the field use's type to it.

	iobuf: Fix test.
	* common/t-iobuf.c (content_filter): If there is nothing to read,
	don't forget to set *LEN to 0.
	(main): Fix checks.

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

	agent: Protect commit 135b1e3 against misbehaving Libgcrypt.
	* agent/command-ssh.c (ssh_key_to_blob): Check DATALEN.

	gpg: Remove option --no-sig-create-check.
	* g10/gpg.c (opts): Remove --no-sig-create-check.
	* g10/options.h (struct opt): Remove field no_sig_create_check.
	* g10/sign.c (do_sign): Always check unless it is RSA and we are using
	Libgcrypt 1.7.

	common: Assume an utf-8 locale on iconv errors.
	* common/utf8conv.c (handle_iconv_error): Use utf-8 as fallback.

	common: Fix regression in building argpase.c standalone.
	* common/argparse.c (is_native_utf8) [GNUPG_MAJOR_VERSION]: New.

2015-08-31  Neal H. Walfield  <neal@g10code.com>

	g10: Don't leak memory if we fail to initialize a new database handle.
	* g10/keydb.c (keydb_new): If we fail to open a keyring or keybox
	correctly release all resources.

	g10: Improve interface documentation of the keydb API.
	* g10/keydb.c: Improve code comments and documentation of internal
	interfaces.  Improve documentation of public APIs and move that to...
	* g10/keydb.h: ... this file.

	g10: Don't cache search results if the search didn't scan the whole DB.
	* g10/keydb.c (struct keydb_handle): Add new field is_reset.
	(keydb_new): Initialize hd->is_reset to 1.
	(keydb_locate_writable): Set hd->is_reset to 1.
	(keydb_search): Set hd->is_reset to 0.  Don't cache a key not found if
	the search started from the beginning of the database.

	g10: Have keydb_search_first call keydb_search_reset before searching.
	* g10/keydb.c (keydb_search_first): Reset the handle before starting
	the search.

	g10: Remove unused parameter.
	* g10/keydb.h (keydb_locate_writable): Remove unused parameter
	reserved.  Update users.

2015-08-31  NIIBE Yutaka  <gniibe@fsij.org>

	agent: Fix SSH public key for EdDSA.
	* agent/command-ssh.c (ssh_key_to_blob): Remove the prefix 0x40.

2015-08-26  Neal H. Walfield  <neal@g10code.com>

	g10: Simplify cache.  Only include data that is actually used.
	* g10/keydb.c (struct kid_list_s): Rename from this...
	(struct kid_not_found_cache_bucket): ... to this.  Update users.
	Remove field state.
	(kid_list_t): Remove type.
	(KID_NOT_FOUND_CACHE_BUCKETS): Define.  Use this instead of a literal.
	(kid_found_table): Rename from this...
	(kid_not_found_cache_bucket): ... to this.  Update users.
	(kid_found_table_count): Rename from this...
	(kid_not_found_cache_count): ... to this.  Update users.
	(kid_not_found_p): Only return whether a key with the specified key id
	is definitely not in the database.
	(kid_not_found_insert): Remove parameter found.  Update callers.
	(keydb_search): Only insert a key id in the not found cache if it is
	not found.  Rename local variable once_found to already_in_cache.

2015-08-25  Werner Koch  <wk@gnupg.org>

	Add configure option --enable-build-timestamp.
	* configure.ac (BUILD_TIMESTAMP): Set to "<none>" by default.

	gpg: Emit ERROR status for key signing failures.
	* g10/keyedit.c (sign_uids): Write an ERROR status for a signing
	failure.
	(menu_adduid, menu_addrevoker, menu_revsig): Ditto.
	(menu_revuid, menu_revkey, menu_revsubkey): Ditto.

	gpg: Print a new FAILURE status after most commands.
	* common/status.h (STATUS_FAILURE): New.
	* g10/cpr.c (write_status_failure): New.
	* g10/gpg.c (main): Call write_status_failure for all commands which
	print an error message here.
	* g10/call-agent.c (start_agent): Print an STATUS_ERROR if we can't
	set the pinentry mode.

2015-08-24  Neal H. Walfield  <neal@g10code.com>

	agent: Raise the maximum password length.  Don't hard code it.
	* agent/agent.h (MAX_PASSPHRASE_LEN): Define.
	* agent/command-ssh.c (ssh_identity_register): Use it instead of a
	hard-coded literal.
	* agent/cvt-openpgp.c (convert_from_openpgp_main): Likewise.
	* agent/findkey.c (unprotect): Likewise.
	* agent/genkey.c (agent_ask_new_passphrase): Likewise.

2015-08-24  Werner Koch  <wk@gnupg.org>

	sm: Support secret key export via the Assuan interface.
	* sm/server.c (cmd_export): Add options --secret, --raw, and --pkcs12.

2015-08-23  Werner Koch  <wk@gnupg.org>

	dirmngr: Allow sending of Zack's key.
	* dirmngr/server.c (MAX_KEYBLOCK_LENGTH): Increase to 1 MiB.

	gpg: Fix regression in packet parser from Aug 19.
	* g10/parse-packet.c (parse): Use an int to compare to -1.  Use
	buf32_to_ulong.

	gpg: Show not found keys with --locate-key --verbose.
	* g10/keylist.c (locate_one): Print a diagnostic for a not-found key.

2015-08-21  Neal H. Walfield  <neal@g10code.com>

	common: Don't incorrectly reject 4 GB - 1 sized packets.
	* g10/parse-packet.c (parse): Don't reject 4 GB - 1 sized packets.
	Add the constraint that the type must be 63.
	* kbx/keybox-openpgp.c (next_packet): Likewise.
	* tests/openpgp/4gb-packet.asc: New file.
	* tests/openpgp/4gb-packet.test: New file.
	* tests/openpgp/Makefile.am (TESTS): Add 4gb-packet.test.
	(TEST_FILES): Add 4gb-packet.asc.

	common: Don't assume on-disk layout matches in-memory layout.
	* g10/packet.h (PKT_signature): Change revkey's type from a struct
	revocation_key ** to a struct revocation_key *.  Update users.

	common: Don't incorrectly copy packets with partial lengths.
	* g10/parse-packet.c (parse): We don't handle copying packets with a
	partial body length to an output stream.  If this occurs, log an error
	and abort.

	common: Check parameters more rigorously.
	* g10/parse-packet.c (dbg_copy_all_packets): Check that OUT is not
	NULL.
	(copy_all_packets): Likewise.

	common: Don't continuing processing on error.
	* g10/parse-packet.c (dbg_parse_packet): Also return if parse returns
	an error.
	(parse_packet): Likewise.
	(dbg_search_packet): Likewise.
	(search_packet): Likewise.

	common: Better respect the packet's length when reading it.
	* g10/parse-packet.c (parse_signature): Make sure PKTLEN doesn't
	underflow.  Be more careful that a read doesn't read more data than
	PKTLEN says is available.

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

	po: Add lost translation of validity strings.
	* po/POTFILES.in (trust.c): Add missing file.
	* po/de.po: Changed German validity strings.
	* doc/help.de.txt: Ditto.

2015-08-20  Neal H. Walfield  <neal@g10code.com>

	g10/parse-packet.c:parse: Try harder to not ignore an EOF.
	* g10/parse-packet.c (parse): Be more robust: make sure to process any
	EOF.

	g10/parse-packet.c: Replace literal with symbolic expression.
	* g10/parse-packet.c (dump_hex_line): Use sizeof rather than the
	buffer's size.

	Add documentation for g10/parse-packet.c.
	* g10/packet.h: Add documentation for functions defined in
	parse-packet.c.
	* g10/parse-packet.c: Improve comments for many functions.

	g10/packet.h: Remove unused argument from enum_sig_subpkt.
	* g10/packet.h (enum_sig_subpkt): Remove argument RET_N.  Update
	callers.
	* g10/parse-packet.c (enum_sig_subpkt): Remove argument RET_N.

	g10/parse-packet.c:mpi_read: Detect EOF and correct boundary conditions.
	* g10/parse-packet.c (mpi_read): Improve documentation.  Correctly
	handle an EOF.  On overflow, correctly return the number of bytes read
	from the pipeline.

	common/iobuf.c: Make control flow more obvious.
	* common/iobuf.c (iobuf_read): Make control flow more obvious.
	(iobuf_get_filelength): Likewise.
	(iobuf_get_fd): Likewise.
	(iobuf_seek): Likewise.

	common/iobuf.c: Add some sanity checks to catch programmer bugs.
	* common/iobuf.c (iobuf_alloc): Check that BUFSIZE is not 0.
	(iobuf_readbyte): Check that A is an input filter.  Check that the
	amount of read data is at most the amount of buffered data.
	(iobuf_read): Check that A is an input filter.
	(iobuf_writebyte): Check that A is not an input filter.
	(iobuf_writestr): Check that A is not an input filter.
	(iobuf_flush_temp): Check that A is not an input filter.

	common/iobuf.c:iobuf_write_temp: Elide redundant code.
	* common/iobuf.c (iobuf_write_temp): Don't repeat iobuf_flush_temp.
	Use it directly.

	common/iobuf.c: Have iobuf_writestr use iobuf_write, not iobuf_writebyte
	* common/iobuf.c (iobuf_write): Don't write a byte at a time.  Use
	iobuf_write.

	common/iobuf: Improve documentation and code comments.
	common/iobuf.h: Improve documentation and code comments.
	common/iobuf.c: Likewise.

	common/iobuf.c: Adjust buffer size of filters in front of temp filters.
	* common/iobuf.c (iobuf_push_filter2): If the head filter is a temp
	filter, use IOBUF_BUFFER_SIZE for the new filter.

	common/iobuf.c: Buffered data should not be processed by new filters.
	* common/iobuf.c (iobuf_push_filter2): If the pipeline is an output or
	temp pipeline, the new filter shouldn't assume ownership of the old
	head's internal buffer: the data was written before the filter was
	added.
	* common/t-iobuf.c (double_filter): New function.
	(main): Add test cases for the above bug.

	common/iobuf.c: Flush the pipeline in iobuf_temp_to_buffer.
	* common/iobuf.c (iobuf_temp_to_buffer): Flush each filter in the
	pipeline and copy the data from the last (not the first) filter's
	internal buffer.

	common/iobuf.c: Combine iobuf_open, iobuf_create and iobuf_openrw.
	* common/iobuf.c (do_open): New function, which is a generalization of
	iobuf_open, iobuf_Create, iobuf_openrw.
	(iobuf_open): Call do_open.
	(iobuf_create): Likewise.
	(iobuf_openrw): Likewise.

	common/iobuf.h: Remove iobuf_open_fd_or_name.
	* common/iobuf.h (iobuf_open_fd_or_name): Remove prototype.  Replace
	use with either iobuf_open or iobuf_fdopen_nc, as appropriate.
	* common/iobuf.c (iobuf_open): Remove function.

	common/iobuf.c: Rename iobuf_flush and make it a static function.
	* common/iobuf.h (iobuf_flush): Remove prototype.
	* common/iobuf.c (filter_flush): New static prototype.
	(iobuf_flush): Rename...
	(filter_flush): ... to this.  Make static.  Simplify code.  Update
	callers.

	common/iobuf.c: Don't abort freeing a pipeline if freeing a filter fails
	* common/iobuf.c (iobuf_cancel): Don't abort freeing a pipeline if
	freeing a filter fails.  This needs to a memory leak.  Instead, keep
	freeing and return the error code of the first filter that fails.

	common/iobuf.c: Improve iobuf_peek.
	* common/iobuf.c (underflow): Take additional parameter
	clear_pending_eof.  If not set, don't clear a pending eof when
	returning EOF.  Update callers.
	(iobuf_peek): Fill the internal buffer, if needed, to be able to
	better satisfy any request.

	common/iobuf.c: When requested, fill the buffer even if it is not empty.
	* common/iobuf.c (underflow): Don't require that the buffer be empty.
	When called, fill any available space.

	common/t-iobuf.c: Add a test case for multiple EOFs.
	common/t-iobuf.c (main): Add a test case for multiple EOFs in an INPUT
	pipeline.

	common/iobuf.c: Better respect boundary conditions in iobuf_read_line.
	* common/iobuf.c (iobuf_read_line): Be more careful with boundary
	conditions.
	* common/iobuf.h: Include <gpg-error.h>.
	* common/t-iobuf.c: New file.
	* common/Makefile.am (module_tests): Add t-iobuf.
	(t_mbox_util_LDADD): New variable.

	common/iobuf.c: Fix filter type for iobuf_temp_with_content.
	* common/iobuf.c (iobuf_temp_with_content): Set the filter type to
	IOBUF_INPUT, not IOBUF_TEMP, which is only for output filters that
	write into a dynamic buffer.

	common/iobuf.h: Remove unimplemented prototypes.
	* common/iobuf.h (iobuf_unread): Remove unimplemented prototype.
	(iobuf_clear_eof): Likewise.
	(iobuf_append): Likewise.

	common/iobuf.c: Refactor code to not need the desc field.
	* common/iobuf.h (struct iobuf_struct): Remove field desc.
	* common/iobuf.c (iobuf_desc): New function.  When a filter's
	description is needed, use this instead of the filter's desc field.

	common/iobuf.h: Clarify semantics of nofast.  Simplify implementation.
	* common/iobuf.h (struct iobuf_struct): Clarify semantics of nofast.
	Simplify use of nofast to implement just these semantics.

	common/iobuf.c: Remove dead code (directfp).
	* common/iobuf.h (struct iobuf_struct): Remove field directfp.  Remove
	all uses of it.

	common/iobuf.c: Remove dead code (opaque).
	* common/iobuf.h (struct iobuf_struct): Remove field opaque.  Remove
	all uses of it.

	common/iobuf.h: Replace further use of literals with symbolic constants.
	* common/iobuf.c: Move BLOCK_FILTER_INPUT,
	BLOCK_FILTER_OUTPUT_BLOCK_FILTER_TEMP from here...
	* common/iobuf.h: ... to here and rename to IOBUF_INPUT, IOBUF_OUTPUT
	and IOBUF_TEMP, respectively.  Where appropriate, use these macros
	instead of a literal.

2015-08-17  Werner Koch  <wk@gnupg.org>

	gpg: Avoid linking to Libksba.
	* kbx/keybox.h (KEYBOX_WITH_X509): Do not define.
	* sm/Makefile.am (AM_CPPFLAGS): Define it here.
	(common_libs): Change to libkeybox509.a
	* g10/Makefile.am (AM_CFLAGS): remove KSBA_CFLAGS.
	(gpg2_LDADD, gpgv2_LDADD): Remove KSBA_LIBS
	* kbx/Makefile.am (noinst_LIBRARIES): Add libkeybox509.a.
	(libkeybox509_a_SOURCES): New.
	(libkeybox_a_CFLAGS): New.
	(libkeybox509_a_CFLAGS): New.
	(kbxutil_CFLAGS): New.
	* kbx/keybox-search.c (has_keygrip) [!KEYBOX_WITH_X509]: Declare args
	as unused.

2015-08-16  Ben Kibbey  <bjk@luxsci.net>

	Fix pinentry loopback and passphrase contraints.
	* agent/command.c (cmd_get_passphrase): Don't repeat passphrase for
	pinentry loopback mode.
	* agent/genkey.c (check_passphrase_constraints): Immediately return when
	pinentry mode is loopback.

	Fix sending INQUIRE_MAXLEN for symmetric data.
	* g10/passphrase.c (passphrase_to_dek_ext): Write the status message.

2015-08-15  Ben Kibbey  <bjk@luxsci.net>

	Inform a user about inquire length limit.
	* common/status.h (INQUIRE_MAXLEN): New.
	* g10/call-agent.c (default_inquire_cb): Send STATUS_INQUIRE_MAXLEN.
	client when inquiring a passphrase over pinentry-loopback.

	Allow --gen-key to inquire a passphrase.
	* g10/gpg.c (main): test for --command-fd during --gen-key parse.

	When --command-fd is set then imply --batch to let gpg inquire a
	passphrase rather than requiring a pinentry.

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

	Release 2.1.7.

2015-08-10  NIIBE Yutaka  <gniibe@fsij.org>

	agent: fix ECC key handling.
	* agent/cvt-openpgp.c (get_keygrip, convert_secret_key)
	(convert_transfer_key): CURVE is the name of curve.

2015-08-08  Neal H. Walfield  <neal@g10code.com>

	common/iobuf.c: Replace use of literals with symbolic constants.
	* common/iobuf.c (BLOCK_FILTER_INPUT): Define.  Where appropriate, use
	this instead of a literal.
	(BLOCK_FILTER_OUTPUT): Likewise.
	(BLOCK_FILTER_TEMP): Likewise.

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

	gpg: Allow gpgv to work with a trustedkeys.kbx file.
	* g10/keydb.h (KEYDB_RESOURCE_FLAG_GPGVDEF): New.
	* g10/keydb.c (keydb_add_resource): Take care of new flag.
	* g10/gpgv.c (main): Use new flag.

	agent: Add option --force to the DELETE_KEY command.
	* agent/findkey.c (agent_delete_key): Add arg "force".
	* agent/command.c (cmd_delete_key): Add option --force.

	common: Change alias for Curve25519 to "cv25519".
	* common/openpgp-oid.c (oidtable): Change alias.

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

	gpg: Remove duplicated printing of the curve name in "sub" lines.
	* g10/keylist.c (list_keyblock_print): Do not print extra curve name.

	gpg: Add commands "fpr *" and "grip" to --edit-key.
	* g10/keyedit.c (cmdGRIP): New.
	(cmds): Add command "grip".
	(keyedit_menu) <cmdFPR>: Print subkeys with argument "*".
	(keyedit_menu) <cmdGRIP>: Print keygrip.
	(show_key_and_fingerprint): Add arg "with_subkeys".
	(show_key_and_grip): New.
	* g10/keylist.c (print_fingerprint): Add mode 4.

	gpg: Adjust UID line indentation for common key algos.
	* g10/keylist.c (list_keyblock_print): Change UID line indentation
	* g10/mainproc.c (list_node): Ditto.

2015-08-06  NIIBE Yutaka  <gniibe@fsij.org>

	Curve25519 support.
	* agent/cvt-openpgp.c (get_keygrip): Handle Curve25519.
	(convert_secret_key, convert_transfer_key): Ditto.
	* common/openpgp-oid.c (oidtable): Add Curve25519.
	(oid_crv25519, openpgp_oid_is_crv25519): New.
	* common/util.h (openpgp_oid_is_crv25519): New.
	* g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Handle the case
	with Montgomery curve which uses x-only coordinate.
	* g10/keygen.c (gen_ecc): Handle Curve25519.
	(ask_curve): Change the API and second arg is to return subkey algo.
	(generate_keypair, generate_subkeypair): Follow chage of ask_curve.
	* g10/keyid.c (keygrip_from_pk): Handle Curve25519.
	* g10/pkglue.c (pk_encrypt): Handle Curve25519.
	* g10/pubkey-enc.c (get_it): Handle the case with Montgomery curve.
	* scd/app-openpgp.c (ECC_FLAG_DJB_TWEAK): New.
	(send_key_attr): Work with general ECC, Ed25519, and Curve25519.
	(get_public_key): Likewise.
	(ecc_writekey): Handle flag_djb_tweak.

	common: extend API of openpgp_oid_to_curve for canonical name.
	* common/openpgp-oid.c (openpgp_oid_to_curve): Add CANON argument.
	* common/util.h: Update.
	* g10/import.c (transfer_secret_keys): Follow the change.
	* g10/keyid.c (pubkey_string): Likewise.
	* g10/keylist.c (list_keyblock_print, list_keyblock_colon): Likewise.
	* parse-packet.c (parse_key): Likewise.
	* scd/app-openpgp.c (send_key_attr, get_public_key): Likewise.

2015-08-05  NIIBE Yutaka  <gniibe@fsij.org>

	scd: Fix ecc_oid.
	* scd/app-openpgp.c (ecc_oid): Call with OIDBUF.

	scd: Fix ECC support.
	* scd/app-openpgp.c (send_key_attr): Send KEYNO.
	(get_public_key): Fix SEXP composing.
	(ecc_writekey): Fix OID length calculation.
	(ecc_oid): Prepend the length before query.
	(parse_algorithm_attribute): Handle the case the curve is not available.

2015-08-04  Werner Koch  <wk@gnupg.org>

	gpg: Fix duplicate key import due to legacy key in keyring.
	* g10/keydb.c (keydb_search_fpr): Skip legacy keys.

	gpg: Properly handle legacy keys while looking for a secret key.
	* g10/getkey.c (have_secret_key_with_kid): Skip legacy keys.

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

	gpg: Fix endless loop for expired keys given by fpr.
	* g10/getkey.c (lookup): Disable keydb caching when continuing a
	search.

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

	gpg: Do not return "Legacy Key" from lookup if a key is expired.
	* g10/getkey.c (lookup): Map GPG_ERR_LEGACY_KEY.

	gpg: Indicate secret keys and cards in a key-edit listing.
	* g10/keyedit.c (sign_uids): Add arg "ctrl".
	(show_key_with_all_names_colon): Ditto.
	(show_key_with_all_names): Ditto.

	* g10/keyedit.c (show_key_with_all_names): Print key record
	indicators by checking with gpg-agent.
	(show_key_with_all_names): Ditto.  May now also print sec/sbb.

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

	gpg: Remove the edit-key toggle command.
	* g10/keyedit.c (cmds): Remove helptext from "toggle".
	(keyedit_menu): Remove "toggle" var and remove the sub/pub check
	against toggle.

	common,w32: Avoid unused var warning about msgcache.
	* common/i18n.c (USE_MSGCACHE): New.
	(msgcache) [!USE_MSGCACHE]: Do not define.
	(i18n_localegettext): Repalce #if conditions by USE_MSGCACHE.

	w32: Try more places to find an installed Pinentry.
	* common/homedir.c (get_default_pinentry_name): Re-implement to
	support several choices for Windows.

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

	scd: Fix size_t/unsigned int mismatch.
	* scd/app-openpgp.c (ecc_writekey): Use extra var n.

	Replace GNUPG_GCC_A_ macros by GPGRT_ATTR_ macros.
	* common/util.h: Provide replacement for GPGRT_ATTR_ macros when using
	libgpg-error < 1.20.
	* common/mischelp.h: Ditto.
	* common/types.h: Ditto.

2015-07-25  NIIBE Yutaka  <gniibe@fsij.org>

	scd: support any curves defined by libgcrypt.
	* g10/call-agent.h (struct agent_card_info_s): Add curve field.
	* g10/call-agent.c (learn_status_cb): Use curve name.
	* g10/card-util.c (card_status): Show pubkey name.
	* scd/app-openpgp.c (struct app_local_s): Record OID and flags.
	(store_fpr): Use ALGO instead of key type.
	(send_key_attr): Use curve name instead of OID.
	(get_public_key): Clean up by OID to curve name.
	(ecc_writekey): Support any curves in libgcrypt.
	(do_genkey, do_auth, ): Follow the change.
	(ecc_oid): New.
	(parse_algorithm_attribute): Show OID here.

2015-07-23  Peter Wu  <peter@lekensteyn.nl>

	build: ignore scissor line for the commit-msg hook.
	* build-aux/git-hooks/commit-msg: Stop processing more lines when the
	  scissor line is encountered.

2015-07-23  NIIBE Yutaka  <gniibe@fsij.org>

	scd: Format change to specify "rsa2048" for KEY-ATTR.
	* g10/card-util.c (do_change_keysize): Put "rsa".
	* scd/app-openpgp.c (change_keyattr, change_keyattr_from_string):
	Change the command format.
	(rsa_writekey): Check key type.
	(do_writekey): Remove "ecdh" and "ecdsa" support which was available
	in experimental libgcrypt before 1.6.0.

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

	Avoid a leading double slash in make_filename.
	* common/stringhelp.c (do_make_filename): Special case leading '/'.

2015-07-21  NIIBE Yutaka  <gniibe@fsij.org>

	scd: change_keyattr_from_string for ECC.
	* scd/app-openpgp.c (change_keyattr, change_keyattr_from_string):
	Support ECC.
	(rsa_writekey): Don't change key attribute.

2015-07-17  NIIBE Yutaka  <gniibe@fsij.org>

	scd: Use openpgpdefs.h for constants.
	* scd/app-openpgp.c: Include openpgpdefs.h.

2015-07-16  Neal H. Walfield  <neal@g10code.com>

	Don't segfault if the first 'auto-key-locate' option is 'clear'.
	* g10/getkey.c (free_akl): If AKL is NULL, just return.

2015-07-10  NIIBE Yutaka  <gniibe@fsij.org>

	agent: Support non-NLS build.
	* agent/agent.h: Use ENABLE_NLS and define L_() macro.

2015-07-09  NIIBE Yutaka  <gniibe@fsij.org>

	scd: Remove unused files.
	* scd/Makefile.am (sc_copykeys_*): Remove.
	* scd/sc-copykeys.c: Remove.
	* scd/pcsc-wrapper.c: Remove.
	* scd/{card-common.h,card-dinsig.c,card-p15.c,card.c}: Remove.

2015-07-08  NIIBE Yutaka  <gniibe@fsij.org>

	g10: Use canonical name for curve.
	* g10/import.c (transfer_secret_keys): Use canonical name.
	* common/openpgp-oid.c (openpgp_curve_to_oid): Return NULL on error.
	* g10/keyid.c (pubkey_string): Follow change of openpgp_curve_to_oid.
	* g10/keylist.c (list_keyblock_print, list_keyblock_colon): Ditto.
	* g10/parse-packet.c (parse_key): Ditto.

2015-07-03  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>

	drop long-deprecated gpgsm-gencert.sh.
	 * tools/gpgsm-gencert.sh: remove deprecated script entirely.  It is
	   fully replaced by gpgsm --gen-key
	 * doc/tools.texi: remove gpgsm-gencert.sh documentation
	 * .gitignore: no longer ignore gpgsm-gencert.sh manpage
	 * doc/Makefile.am: quit making the manpage
	 * tools/Makefile.am: quit distributing the script
	 * doc/howto-create-a-server-cert.texi: overhaul documentation to use
	   gpgsm --gen-key and tweak explanations

2015-07-02  NIIBE Yutaka  <gniibe@fsij.org>

	po: Update Japanese translation.

	scd: Support AES decryption for OpenPGPcard v3.0.
	* scd/app-openpgp.c (do_decipher): Support AES decryption.

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

	Release 2.1.6.

2015-07-01  Daiki Ueno  <ueno@gnu.org>

	agent: Unset INSIDE_EMACS on gpg-agent startup.
	* agent/gpg-agent.c (main): Unset INSIDE_EMACS envvar.

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

	common: Implement i18n_localegettext.
	* common/i18n.c (msg_cache_s, msg_cache_head_s): New.
	(msgcache): New.
	(i18n_localegettext): Implement locale dependent lookup.

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

	Pass DBUS_SESSION_BUS_ADDRESS for gnome3.
	* common/session-env.c (stdenvnames): Add DBUS_SESSION_BUS_ADDRESS.

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

	Flag the L_() function with attribute format_arg.
	* agent/agent.h (LunderscorePROTO): New.
	* common/util.h (GNUPG_GCC_ATTR_FORMAT_ARG): New.
	* common/i18n.h (GNUPG_GCC_ATTR_FORMAT_ARG): New. Use for
	i18n_localegettext.  Expand LunderscorePROTO.
	* agent/genkey.c (check_passphrase_constraints): Use xtryasprintf
	again to keep the old translations.

	agent: Use different translation func for Pinentry strings.
	* po/Makevars (XGETTEXT_OPTIONS): Add keyword "L_".
	* common/i18n.c (i18n_localegettext): New stub.
	* common/i18n.h: Expand the LunderscoreIMPL macro.
	* agent/agent.h (L_): New.
	(LunderscoreIMPL): New.
	* agent/call-pinentry.c (setup_qualitybar): Add arg ctrl anc change
	caller.
	* agent/findkey.c (try_unprotect_cb): Add local var ctrl.
	* agent/genkey.c (check_passphrase_constraints): Replace xtryasprintf
	by xtrystrdup to avoid gcc warning.  Unfortinately this changes the
	string.
	(agent_ask_new_passphrase): Cleanup the use of initial_errtext.

	gpg: Make show-sig-subpackets work again.
	* g10/gpg.c (parse_list_options): Fix offset for subpackets.

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

	agent: Prepare for Libassuan with Cygwin support.
	* agent/gpg-agent.c (create_server_socket): Add arg "cygwin".  Call
	assuan_sock_set_flag if Assuan version is recent enough.
	(main): Create ssh server socket with Cygwin flag set.

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

	Show passphrase constraints errors as password prompt errors.
	* agent/agent.h (check_passphrase_constraints): Add parameter
	failed_constraint and remove parameter silent.  Update callers.
	* agent/genkey.c (check_passphrase_constraints): Add parameter
	failed_constraint and remove parameter silent.  If FAILED_CONSTRAINT
	is not NULL and OPT.ENFORCE_PASSPHRASE_CONSTRAINTS is FALSE, save the
	error text in *FAILED_CONSTRAINT and don't call take_this_one_anyway
	or take_this_one_anyway2.  If FAILED_CONSTRAINT is NULL, act as if
	SILENT was set.
	(agent_ask_new_passphrase): Change initial_errtext's type from a const
	char * to a char *.  Pass it to check_passphrase_constraints.  If it
	contains malloc's memory, free it.

2015-06-29  Neal H. Walfield  <neal@g10code.com>

	Improve documentation for default-cache-ttl and default-cache-ttl-ssh.
	* doc/gpg-agent.texi (Agent Options): Improve documentation for
	default-cache-ttl and default-cache-ttl-ssh.

	Don't raise max-cache-ttl to default-cache-ttl.
	* agent/gpg-agent.c (finalize_rereadable_options): Don't raise
	max-cache-ttl to default-cache-ttl.  Likewise for max-cache-ttl-ssh
	and default-cache-ttl-ssh.

	Improve the description of old packets with an indeterminate length.
	* g10/parse-packet.c (parse): Make the description more accurate when
	listing packets: old format packets don't support partial lengths,
	only indeterminate lengths (RFC 4880, Section 4.2).

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

	agent: Add --verify to the PASSWD command.
	* agent/command.c (cmd_passwd): Add option --verify.

	agent,w32: Do not create a useless socket with --enable-putty-support.
	* agent/agent.h (opt): Remove field ssh_support.
	* agent/gpg-agent.c (ssh_support): New.  Replace all opt.ssh_support
	by this.
	(main): Do not set ssh_support along with setting putty_support.

	gpgsm: Add command option "offline".
	* sm/server.c (option_handler): Add "offline".
	(cmd_getinfo): Ditto.
	* sm/certchain.c (is_cert_still_valid):
	(do_validate_chain):
	* sm/gpgsm.c (gpgsm_init_default_ctrl): Default "offline" to the value
	of --disable-dirmngr.
	* sm/call-dirmngr.c (start_dirmngr_ext): Better also check for
	ctrl->offline.

2015-06-26  NIIBE Yutaka  <gniibe@fsij.org>

	scd: Support button flag and AES key data for OpenPGPcard v3.0.
	* scd/app-openpgp.c (do_getattr, show_caps, app_select_openpgp):
	Support button and symmetric decryption.
	(do_setattr): Support setting AESKEY.

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

	sm: Fix cert storage for ephemeral certs.
	* sm/keydb.c (keydb_store_cert): Clear ephemeral flag for
	existing certs if store should not be ephemeral.

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

	Allow use of debug flag names for all tools.
	* g13/g13.c: Make use of debug_parse_flag.
	* scd/scdaemon.c: Ditto.
	* sm/gpgsm.c: Ditto
	* agent/gpg-agent.c: Ditto.  But do not terminate on "help"
	* dirmngr/dirmngr.c: Ditto.

	common: Improve fucntion parse_debug_flag.
	* common/miscellaneous.c (parse_debug_flag): Add hack not to call
	exit.  Add "none" and "all" flags.

2015-06-23  NIIBE Yutaka  <gniibe@fsij.org>

	scd: pinpad workaround for PC/SC implementations.
	* scd/adpu.c (pcsc_pinpad_verify, pcsc_pinpad_modify): Bigger buffer
	for TPDU card reader.

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

	gpg: Allow debug flag names for --debug.
	* g10/gpg.c (opts): Change arg for oDebug to a string.
	(debug_flags): New; factored out from set_debug.
	(set_debug): Remove "--debug-level help".  Use parse_debug_flag to
	print the used flags.
	(main): Use parse_debug_flag for oDebug.

	common: Add function parse_debug_flag.
	* common/miscellaneous.c (parse_debug_flag): New.
	* common/util.h (struct debug_flags_s): New.

	common: Add function strtokenize.
	* common/stringhelp.c: Include assert.h.
	(strtokenize): New.
	* common/t-stringhelp.c (test_strtokenize): New.

	gpg: Fix regression due to recent commit 6500f33.
	* g10/keydb.c (kid_list_s): Keep a state in the table.
	(kid_not_found_table): Rename to kid_found_table.
	(n_kid_not_found_table): Rename to kid_found_table_count.
	(kid_not_found_p): Return found state.
	(kid_not_found_insert): Add arg found.
	(keydb_search): Store found state in the table.

2015-06-22  NIIBE Yutaka  <gniibe@fsij.org>

	scd: Fix Cherry ST-2000 support for pinpad input.
	* scd/apdu.c (pcsc_vendor_specific_init): Set pinmax to 15.
	* scd/ccid-driver.c (ccid_transceive_secure): Add zero for the
	template of APDU.

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

	gpg: Print number of good signatures with --check-sigs.
	* g10/keylist.c (keylist_context): Add field good_sigs.
	(list_keyblock_print): Updated good_sigs.
	(print_signature_stats): Print number of good signatures and use
	log_info instead of tty_printf.

	gpg: Improve speed of --check-sigs and --lish-sigs.
	* g10/keydb.c (kid_list_t): New.
	(kid_not_found_table, n_kid_not_found_table): New.
	(kid_not_found_p, kid_not_found_insert, kid_not_found_flush): New.
	(keydb_insert_keyblock): Flush the new cache.
	(keydb_delete_keyblock): Ditto.
	(keydb_update_keyblock): Ditto.
	(keydb_search): Use the new cache.
	(keydb_dump_stats): New.
	* g10/gpg.c (g10_exit): Dump keydb stats.

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

	gpg: Add more log_clock calls to keydb.c.
	* g10/keydb.c (keydb_get_keyblock): Add log_clock calls.

	gpg: Print available debug flags using "--debug-level help".
	* g10/gpg.c (set_debug): Add "help" option and use a table for the
	flags.

	gpg: Fix export problem in case an old keyring has PGP-2 keys.
	* g10/export.c (do_export_stream): Skip legacy keys.

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

	dirmngr: Fix the cleanup zombies fix (685b782).
	* dirmngr/ldap-wrapper.c (ldap_wrapper_thread): Do not close the
	stdout reader after EOF from read_log_data.
	* dirmngr/crlcache.c (crl_cache_reload_crl): Close the reader before
	the next iteration.

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

	agent: Print a warning for obsolete options.
	* g10/misc.c (obsolete_scdaemon_option): Move to
	* common/miscellaneous.c (obsolete_option): ... here.
	* agent/gpg-agent.c (main): Use obsolete_option for the 3 obsolete
	options.

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

	dirmngr: Cleanup zombies and fix hang on shutdown.
	* dirmngr/ldap-wrapper.c (ldap_wrapper_thread): Move nfds computation
	into the loop.  Check the queue also on timeout.  Close log_fd and
	reader context on EOF or error.

	dirmngr: Avoid accessing uninitialized memory in log callback.
	* dirmngr/dirmngr.c (pid_suffix_callback): Clear int_and_ptr_u before
	use.
	(start_connection_thread): Ditto.
	(handle_connections): Ditto.

2015-06-16  Neal H. Walfield  <neal@g10code.com>

	Don't prompt for the password multiple times in pinentry loopback mode.
	* g10/gpg.c (main): If OPT.PINENTRY_MODE is PINENTRY_MODE_LOOPBACK,
	clear OPT.PASSPHRASE_REPEAT.

2015-06-16  NIIBE Yutaka  <gniibe@fsij.org>

	po: Update Japanese Translation.

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

	doc: Add defs.inc to BUILT_SOURCES.

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

	Release 2.1.5.

	agent: Fix --extra-socket on Windows.
	* agent/gpg-agent.c (start_connection_thread): Rename to ...
	(do_start_connection_thread): this.  Factor nonce checking out to ...
	(start_connection_thread_std): this,
	(start_connection_thread_extra): this,
	(start_connection_thread_browser): and this.

	agent: Add experimental option --browser-socket.
	* agent/agent.h (opt): Add field "browser_socket".
	* agent/command.c (cmd_setkeydesc): Use a different message for
	restricted==2.
	* agent/gpg-agent.c (oBrowserSocket): New.
	(opts): Add --browser-socket.
	(socket_name_browser, redir_socket_name_browser): New.
	(socket_nonce_browser): New.
	(cleanup): Cleanup browser socket.
	(main): Implement option.
	(start_connection_thread_browser): New.
	(handle_connections): Add arg listen_fd_browser and use it.

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

	agent: Add option --allow-emacs-pinentry.
	* agent/agent.h (opt): Add field allow_emacs_pinentry.
	* agent/call-pinentry.c (start_pinentry): Act upon new var.
	* agent/gpg-agent.c (oAllowEmacsPinentry): New.
	(opts): Add option --allow-emacs-pinentry.
	(parse_rereadable_options): Set this option.
	* tools/gpgconf-comp.c (gc_options_gpg_agent): Add new option.

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

	doc: Do not used fixed file names in the manuals.
	* doc/mkdefsinc.c: New.
	* doc/Makefile.am: Include cmacros.am.
	(EXTRA_DIST): Add mkdefsinc.c defsincdate.
	(BUILT_SOURCES): Add defsincdate
	(CLEANFILES): Add mkdefsinc and defs.inc.
	(mkdefsinc): New rule.
	(yat2m-stamp): Depend on defs.inc.
	($(myman_pages) gnupg.7): Ditto.
	(gnupg.texi): Remove rule to touch itself.
	(dist-hook): New.
	(defsincdate): New.
	(defs.inc): New.
	* doc/gnupg.texi: Remove inclusion of version.texi.  Include defs.inc.
	Also include defs.inc in all files used to build man files.  Change
	fixed directory names to those from defs.inc.

	dirmngr: Avoid crash due to an empty crls.d/DIR.txt.
	* dirmngr/crlcache.c (check_dir_version): Avoid segv.

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

	doc: Change the manual source to be only for GnuPG 2.1.

	Convey envvar INSIDE_EMACS to the pinentry.
	* common/session-env.c (stdenvnames): Add it.

	agent: Add command "getinfo std_env_names".
	* agent/command.c (cmd_getinfo): Add new sub-command.

2015-06-05  NIIBE Yutaka  <gniibe@fsij.org>

	scd: do_decipher change for OpenPGPcard v3.0.
	* scd/app-openpgp.c (do_decipher): Add a header for ECDH.

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

	gpg: Replace -1 by GPG_ERR_NOT_FOUND in tdbio.c.
	* g10/tdbio.c (lookup_hashtable): Return GPG_ERR_NOT_FOUND.
	* g10/tdbdump.c (import_ownertrust): Test for GPG_ERR_NOT_FOUND.
	* g10/trustdb.c (read_trust_record): Ditto.
	(tdb_get_ownertrust, tdb_get_min_ownertrust): Ditto.
	(tdb_update_ownertrust, update_min_ownertrust): Ditto.
	(tdb_clear_ownertrusts, update_validity): Ditto.
	(tdb_cache_disabled_value): Ditto.

	gpg: Cleanup error code path in case of a bad trustdb.
	* g10/tdbio.c (tdbio_read_record): Fix returning of the error.

	gpg: Fix output in case of a corrupted trustdb.
	* g10/tdbdump.c (list_trustdb): Add arg FP and change callers to pass
	es_stdout.
	* g10/tdbio.c (upd_hashtable): On a corrupted trustdb call
	list_trustdb only in verbose > 1 mode and let it dump to stderr.

2015-05-29  NIIBE Yutaka  <gniibe@fsij.org>

	scd: Fix key template of ECC.
	* scd/app-openpgp.c (build_ecc_privkey_template): Use correct value.

2015-05-28  NIIBE Yutaka  <gniibe@fsij.org>

	g10: Fix a race condition initially creating trustdb.
	* g10/tdbio.c (take_write_lock, release_write_lock): New.
	(put_record_into_cache, tdbio_sync, tdbio_end_transaction): Use
	new lock functions.
	(tdbio_set_dbname): Fix the race.
	(open_db): Don't call dotlock_create.

2015-05-27  NIIBE Yutaka  <gniibe@fsij.org>

	g10: Remove g10/signal.c.
	* g10/signal.c: Remove.
	* g10/main.h: Remove old function API.
	* g10/tdbio.c: Use new API, even in the dead code.

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

	agent: Cleanup caching code for command GET_PASSPHRASE.
	* agent/command.c (cmd_get_passphrase): Read from the user cache.

2015-05-19  Neal H. Walfield  <neal@g10code.com>

	agent: When the password cache is cleared, also clear the ext. cache.
	* agent/agent.h (agent_clear_passphrase): New declaration.
	* agent/call-pinentry.c (agent_clear_passphrase): New function.
	* agent/command.c (cmd_clear_passphrase): Call agent_clear_passphrase.

	agent: Modify agent_clear_passphrase to support an ext. password cache.
	* agent/agent.h (agent_get_passphrase): Add arguments keyinfo and
	cache_mode.  Update callers.
	* agent/call-pinentry.c (agent_get_passphrase): Add arguments keyinfo
	and cache_mode.  If KEYINFO and CACHE_MODE describe a cachable key,
	then send SETKEYINFO to the pinentry.

2015-05-19  NIIBE Yutaka  <gniibe@fsij.org>

	g10: detects public key encryption packet error properly.
	g10/mainproc.c (proc_pubkey_enc): Only allow relevant algorithms for
	encryption.

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

	build: Make --disable-gpgsm work.
	* Makefile.am: Always build kbx/
	* g10/Makefile.am (AM_CFLAGS): Include KSBA_CFLAGS.

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

	Release 2.1.4.

	speedo: Add make option SELFCHECK=0 to build a new release.
	* build-aux/getswdb.sh: Add option --skip-selfcheck.
	* build-aux/speedo.mk: Add option SELFCHECK.

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

	common: Cope with AIX problem on number of open files.
	* common/exechelp-posix.c: Limit returned value for too hight values.

	gpg-connect-agent: Fix quoting of internal percent+ function.
	* tools/gpg-connect-agent.c (get_var_ext) <percent, percent+): Also
	escape '+'.

	agent: Add option --no-allow-external-cache.
	* agent/agent.h (opt): Add field allow_external_cache.
	* agent/call-pinentry.c (start_pinentry): Act upon new var.
	* agent/gpg-agent.c (oNoAllowExternalCache): New.
	(opts): Add option --no-allow-external-cache.
	(parse_rereadable_options): Set this option.

	agent: Add strings for use by future Pinentry versions.
	* agent/call-pinentry.c (start_pinentry): Add more strings.

	agent: Add option --debug-pinentry.
	* agent/gpg-agent.c (oDebugPinentry): New.
	(opts): Add --debug-pinentry.
	(parse_rereadable_options): Set that option.
	* agent/call-pinentry.c (start_pinentry): Pass option to
	assuan_set_flag.

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

	gpg: Avoid cluttering stdout with trustdb info in verbose mode.
	* g10/trustdb.c (validate_keys): Call dump_key_array only in debug
	mode.

	gpg: Fix wrong output in list mode.
	* g10/parse-packet.c (parse_gpg_control): Replace puts by es_fputs to
	LISTFP.

	gpg: New command --quick-adduid.
	* g10/keygen.c (ask_user_id): Factor some code out to ...
	(uid_already_in_keyblock): new.
	(generate_user_id): Add arg UIDSTR.  Fix leaked P.
	* g10/keyedit.c (menu_adduid): Add new arg uidstring.  Adjust caller.
	(keyedit_quick_adduid): New.
	* g10/gpg.c (aQuickAddUid): New.
	(opts):  Add command --quick-adduid.
	(main): Implement that.

	gpg: Add push/pop found state feature to keydb.
	* g10/keydb.c (keydb_handle): Add field saved_found.
	(keydb_new): Init new field.
	(keydb_push_found_state, keydb_pop_found_state): New.
	* g10/keyring.c (kyring_handle): Add field saved_found.
	(keyring_push_found_state, keyring_pop_found_state): New.

	gpg: Minor code merging in keyedit.
	* g10/keyedit.c (fix_keyblock): Rename to fix_key_signature_order.
	(fix_keyblock): New.  Call fix_key_signature_order and other fix
	functions.
	(keyedit_menu): Factor code out to new fix_keyblock.
	(keyedit_quick_sign): Ditto.  Check for primary fpr before calling
	fix_keyblock.

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

	agent: Minor change for 56b5c9f.
	* agent/call-pinentry.c (agent_askpin): Move option setting to ...
	(start_pinentry): here.  Fix error code check.

2015-05-07  Kristian Fiskerstrand  <kf@sumptuouscapital.com>

	dirmngr: Fix segfault in ldap engine.
	(ks-engine-ldap.c) Fix segfault caused by missing check whether uri is
	initialized

2015-05-07  Neal H. Walfield  <neal@g10code.com>

	agent: Improve support for externally cached passwords.
	* agent/call-pinentry.c (PINENTRY_STATUS_PASSWORD_FROM_CACHE): New
	constant.
	(pinentry_status_cb): Add it to *FLAGS if PASSWORD_FROM_CACHE was
	provided.
	(agent_askpin): Pass "OPTION allow-external-password-cache" to the
	pinentry.  Always pass SETKEYINFO to the pinentry.  If there is no
	stable identifier, then use "--clear".  If the password is incorrect
	and PINENTRY_STATUS_PASSWORD_FROM_CACHE is set in *PINENTRY_STATUS,
	then decrement PININFO->FAILED_TRIES.

	agent: Or in the value; don't overwrite the variable.
	* agent/call-pinentry.c (pinentry_status_cb): Or in
	PINENTRY_STATUS_CLOSE_BUTTON; don't overwrite *FLAG.

	agent: Avoid magic numbers.  Use more accurate names.
	* agent/call-pinentry.c (PINENTRY_STATUS_CLOSE_BUTTON): New constant.
	(PINENTRY_STATUS_PIN_REPEATED): Likewise.
	(close_button_status_cb): Rename from this...
	(pinentry_status_cb): ... to this.  Use the constants.
	(agent_askpin): Rename local variable from close_button to
	pinentry_status.  Use symbolic constants rather than magic numbers.

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

	gpg: Improve 'General key info' line of --card-status.
	* g10/keylist.c (print_pubkey_info): Print either "pub" or "sub".

	* g10/getkey.c (get_pubkey_byfprint): Add optional arg R_KEYBLOCK.
	* g10/keyid.c (keyid_from_fingerprint): Adjust for change.
	* g10/revoke.c (gen_desig_revoke): Adjust for change.
	* g10/card-util.c (card_status): Simplify by using new arg.  Align
	card-no string.

	* g10/card-util.c (card_status): Remove not used GnuPG-1 code.

	gpg: Fix regression not displaying the card serial number.
	* g10/call-agent.c (keyinfo_status_cb): Detect KEYINFO.

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

	speedo,w32: Install a native pinentry.
	* build-aux/speedo.mk: Always build pinentry for w32.
	(speedo_pkg_pinentry_configure): Adjust to modern pinentry.
	* build-aux/speedo/w32/inst.nsi: Install native pinentry under the
	name pinentry-basic.exe.

2015-05-01  NIIBE Yutaka  <gniibe@fsij.org>

	g10: fix cmp_public_key.
	* g10/free-packet.c (cmp_public_keys): Compare opaque
	data at the first entry of the array when it's unknown algo.

2015-04-30  NIIBE Yutaka  <gniibe@fsij.org>

	scd: PC/SC reader selection by partial string match.
	* scd/apdu.c (open_pcsc_reader_direct): Partial string match.

2015-04-24  Werner Koch  <wk@gnupg.org>

	common: Remove JNLIB from boiler plate (jnlib merge).
	* common/README.jnlib: Remove.

	common: Rename log and gcc attribute macros (jnlib merge).
	* common/logging.h: Rename JNLIB_LOG_* to GPGRT_LOG_*.
	* common/mischelp.h: Rename JNLIB_GCC_* to GPGRT_GCC_*.

	common: Remove two JNLIB_ macros (jnlib merge).
	* configure.ac: Merge seperate jnlib checks.
	(HAVE_JNLIB_LOGGING): Remove.
	* common/logging.c, common/simple-pwquery.c (JNLIB_NEED_AFLOCAL):
	Rename to GNUPG_COMMON_NEED_AFLOCAL.  Change all tests.

	common: Remove libjnlib-config.h (jnlib merge).
	* common/libjnlib-config.h: Remove.
	* common/common-defs.h (getenv) [HAVE_GETENV]: New.  From removed
	header.
	(getpid) [HAVE_W32CE_SYSTEM]: New.  From removed header.
	* common/argparse.c: Include util.h and common-defs.h.  Replace
	jnlib_ macro names for non-GNUPG builds by x* names.
	* common/dotlock.c: Ditto.
	* common/logging.c: Include util.h and common-defs.h.  Replace jnlib_
	symbol names by x* names.
	* common/strlist.c: Ditto.
	* common/utf8conv.c: Ditto.
	* common/w32-reg.c: Ditto.
	* common/mischelp.c: Ditto.  Also remove _jnlib_free.
	* common/stringhelp.c: Ditto.
	(JNLIB_LOG_WITH_PREFIX): Do not depend on this macro.
	* common/logging.h (JNLIB_LOG_WITH_PREFIX): Do not depend on this
	macro.

2015-04-23  Werner Koch  <wk@gnupg.org>

	gpg: Move all DNS access to Dirmngr.
	* common/dns-cert.h: Move to ../dirmngr/.
	* common/dns-cert.c: Move to ../dirmngr/.  Change args to return the
	key as a buffer.
	* common/t-dns-cert.c: Move to ../dirmngr/.
	* common/pka.c, common/pka.h, common/t-pka.c: Remove.

	* dirmngr/server.c (data_line_cookie_write): Factor code out to
	data_line_write and make it a wrapper for that.
	(data_line_write): New.
	(cmd_dns_cert): New.
	(register_commands): Register new command.

	* g10/Makefile.am (LDADD): Remove DNSLIBS.
	* g10/call-dirmngr.c (dns_cert_parm_s): New.
	(dns_cert_data_cb, dns_cert_status_cb): New.
	(gpg_dirmngr_dns_cert): New.
	(gpg_dirmngr_get_pka): New.
	* g10/gpgv.c (gpg_dirmngr_get_pka): New dummy function.
	* g10/keyserver.c (keyserver_import_cert): Replace get_dns_cert by
	gpg_dirmngr_dns_cert.
	(keyserver_import_pka): Replace get_pka_info by gpg_dirmngr_get_pka.
	* g10/mainproc.c: Include call-dirmngr.h.
	(pka_uri_from_sig): Add CTX arg. Replace get_pka_info by
	gpg_dirmngr_get_pka.

	common: Minor change of hex2str to allow for embedded nul.
	* common/convert.c (hex2str): Set ERRNO.  Return adjusted COUNT.

2015-04-23  NIIBE Yutaka  <gniibe@fsij.org>

	common: removal of t-support.c from t_jnlib_src.
	* common/Makefile.am (t_jnlib_src): Remove t-support.c.

2015-04-21  Werner Koch  <wk@gnupg.org>

	gpg: Make keyserver-option http_proxy work.
	* g10/options.h (opt): Add field keyserver_options.http_proxy.
	* g10/keyserver.c (warn_kshelper_option): Add arg noisy.
	(parse_keyserver_options): Parse into new http_proxy field.
	* g10/call-dirmngr.c (create_context): Send the http-proxy option.

	common: Make proper use of http proxy parameter.
	* common/http.c (is_hostname_port): New.
	(send_request): Fix proxy name parsing.

	dirmngr: Add http proxy support for keyservers.
	* dirmngr/dirmngr.h (server_control_s): Add field http_proxy.
	* dirmngr/dirmngr.c (dirmngr_init_default_ctrl): Copy http_proxy value
	from OPT.
	(dirmngr_deinit_default_ctrl): New.
	(main): Call dirmngr_deinit_default_ctrl.
	* dirmngr/server.c (start_command_handler): Ditto.
	(option_handler): Add option "http-proxy".
	* dirmngr/crlfetch.c (crl_fetch): Take http_proxy from CTRL.
	* dirmngr/ocsp.c (do_ocsp_request): Ditto.
	* dirmngr/ks-engine-hkp.c (send_request): Add proxy support.
	* dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.

	gpg: Do not use honor-keyserver-url sub-option by default.

	gpg: Make preferred keyservers work.
	* g10/call-dirmngr.c (dirmngr_local_s): Add field set_keyservers_done.
	(create_context): Move keyserver setting to ...
	(open_context): here.
	(clear_context_flags): New.
	(gpg_dirmngr_ks_get): Add arg override_keyserver.
	* g10/keyserver.c (keyserver_refresh): Improve diagnostics.
	(keyserver_get_chunk): Ditto.  Pass OVERRIDE_KEYSERVER to ks_get.

	gpg: Update sub-options of --keyserver-options.
	* g10/options.h (KEYSERVER_HTTP_PROXY): New.
	(KEYSERVER_USE_TEMP_FILES, KEYSERVER_KEEP_TEMP_FILES): Remove.
	(KEYSERVER_TIMEOUT): New.
	* common/keyserver.h (KEYSERVER_TIMEOUT): Remove.
	* g10/keyserver.c (keyserver_opts): Remove obsolete "use-temp-files"
	and "keep-temp-files". Add "http-proxy" and "timeout".
	(parse_keyserver_options): Remove 1.2 compatibility option
	"honor-http_proxy".  Remove "use-temp-files" and "keep-temp-files"
	code.

2015-04-14  Werner Koch  <wk@gnupg.org>

	agent: Send the new SETKEYINFO command to the Pinentry.
	* agent/call-pinentry.c (agent_askpin): Add args keyinfo and
	cache_mode.  Change all callers to pass (NULL,0) for them.  Send
	SETKEYINFO command.
	* agent/findkey.c (unprotect): Pass the keygrip and the cache_mode for
	the new args.

2015-04-14  NIIBE Yutaka  <gniibe@fsij.org>

	scd: better handling of extended APDU.
	* scd/apdu.c (send_le): Bug fix for not append Z when lc<0&&le<0.
	* scd/app-common.h (struct app_ctx_s): Use bit fields for flags.
	* scd/ccid-driver.c (CCID_MAX_BUF): New.  Only for OpenPGPcard.
	(struct ccid_driver_s): New field of max_ccid_msglen.
	 Remove ifsd field.
	(parse_ccid_descriptor): Initialize max_ccid_msglen.
	(ccid_transceive_apdu_level): Implement sending extended APDU in
	chain of CCID message.

2015-04-13  Werner Koch  <wk@gnupg.org>

	gpg: Fix NULL-segv due to invalid imported data.
	* g10/free-packet.c (my_mpi_copy): New.
	(copy_public_key, copy_signature): Use instead of mpi_copy.

2015-04-13  Neal H. Walfield  <neal@g10code.com>

	dirmngr: If LDAP is not enable, don't build the LDAP bits.
	* dirmngr/Makefile.am (dirmngr_SOURCES): Only include
	ks-engine-ldap.c, ldap-parse-uri.c and ldap-parse-uri.h if USE_LDAP
	is TRUE.
	(module_tests): Only add t-ldap-parse-uri if USE_LDAP is TRUE.
	* dirmngr/ks-action.c: Only include "ldap-parse-uri.h" if USE_LDAP is
	TRUE.
	(ks_action_help): Don't invoke LDAP functionality if USE_LDAP is not
	TRUE.
	(ks_action_search): Likewise.
	(ks_action_get): Likewise.
	(ks_action_put): Likewise.
	* dirmngr/server.c: Only include "ldap-parse-uri.h" if USE_LDAP is
	TRUE.
	(cmd_keyserver): Don't invoke LDAP functionality if USE_LDAP is not
	TRUE.

2015-04-13  Werner Koch  <wk@gnupg.org>

	common: Do without nested fucntions to support non-gcc.
	* common/t-stringhelp.c (test_strsplit): Remove nested function.

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

	Release 2.1.3.

2015-04-11  Yuri Chornoivan  <yurchor@ukr.net>

	po: Update Ukrainian translation.

2015-04-11  Ineiev  <ineiev@gnu.org>

	po: Update and review Russian translation.

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

	dirmngr,w32: Make it build for Windows.
	* dirmngr/Makefile.am (t_common_ldadd): Add missing libs.

	Remove obsolete directories from AM_CPPFLAGS.

	dirmngr,w32: Replace functions not available under Windows.
	* dirmngr/ks-engine-ldap.c (extract_attributes): Replace isoptime and
	gmtime_r.

	common: Add new function gnupg_gmtime.
	* common/gettime.c (gnupg_gmtime): New.
	(gnupg_get_isotime): Use it.  Also take care of an gmtime_t returning
	an error.

	common: Add new function isodate_human_to_tm.
	* common/gettime.c (isotime_human_p): Add arg date_only.
	(isodate_human_to_tm): New.
	* common/t-gettime.c (test_isodate_human_to_tm): New.
	(main): Call new test.

	dirmngr,w32: Avoid name clash with existing function.
	* dirmngr/ks-engine-ldap.c (ldap_connect): Rename to my_ldap_connect.

	gpgparsemail: Fix last commit (3f2bdac)
	* tools/rfc822parse.c (parse_field): Replace break by goto.

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

	gpgparsemail: Fix case of zero length continuation lines.
	* tools/rfc822parse.c (parse_field): Loop after continuation line.

2015-04-08  Werner Koch  <wk@gnupg.org>

	sm: Fix certificate lookup in dirmngr cache.
	* sm/call-dirmngr.c (get_cached_cert): Fix typo in LOOKUP command.

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

	gpg: Print the user id in --fast-list-mode.
	* g10/keylist.c (list_keyblock_print, list_keyblock_colon): Change.

	gpg: Prepare to pass additional context to the list functions.
	* g10/keylist.c (struct sig_stats): Rename to keylist_context and add
	field check_sigs.
	(keylist_context_release): New.
	(list_all): Set listctx.check_sigs and call release func.
	(list_one): Ditto.
	(locate_one): Ditto.
	(list_keyblock_print): Use .check_sigs field.  Repalce arg opaque by
	listctx.
	(list_keyblock): Ditto.  Make static.
	(list_keyblock_direct): New.
	* g10/keygen.c (do_generate_keypair): Replace list_keyblock by
	list_keyblock_direct.

	gpg: Merge duplicated code for get_user_id et al.
	* g10/getkey.c (get_user_id_string): Add args mode and r_LEN.
	(get_user_id_string_native): Add new args.
	(get_long_user_id_string, get_user_id): Rewrite using
	get_user_id_string.

	gpg: Add new option --debug-iolbf.
	* g10/gpg.c (oDebugIOLBF): new.
	(opts): Add --debug-iolbf.
	(main): Set option.

	Rename DBG_ASSUAN to DBG_IPC and add separate DBG_EXTPROG.
	* g10/options.h (DBG_EXTPROG_VALUE): Separate from DBG_IPC_VALUE.

	Fix use of DBG_CACHE and DBG_LOOKUP.
	* dirmngr/dirmngr.h (DBG_LOOKUP_VALUE): Change to 8192.
	* g10/options.h (DBG_LOOKUP_VALUE, DBG_LOOKUP): New.
	* g10/getkey.c: Use DBG_LOOKUP instead of DBG_CACHE at most places.

	gpg: Rename a debug macro.
	* g10/options.h (DBG_CIPHER_VALUE): Rename to DBG_CRYPTO_VALUE.
	(DBG_CIPHER): Rename to DBG_CRYPTO.

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

	gpg: Fix DoS while parsing mangled secret key packets.
	* g10/parse-packet.c (parse_key): Check PKTLEN before calling mpi_read
	et al.

2015-04-03  NIIBE Yutaka  <gniibe@fsij.org>

	g10: Fix keytocard.
	g10/call-agent.h (agent_scd_learn): Add FORCE option.
	g10/call-agent.c (agent_scd_learn): Implement FORCE option.
	g10/keygen.c (gen_card_key): Follow the change of option.
	g10/card-util.c (change_pin, card_status, factory_reset): Likewise.
	g10/keyedit.c (keyedit_menu): Update private key storage by
	agent_scd_learn.

	agent: Add --force option for LEARN.
	* agent/command.c (cmd_learn): Handle --force option.
	(cmd_keytocard): Don't update key storage file.
	* agent/agent.h (agent_handle_learn): Add FORCE.
	* agent/learncard.c (agent_handle_learn): Implement FORCE to update
	key stroage file.

2015-03-31  Neal H. Walfield  <neal@g10code.com>

	dirmngr: Don't use alloca.
	* dirmngr/ks-engine-ldap.c (ks_ldap_put): Replace use of alloca with
	xmalloc and xfree.

	dirmngr: Simplify truncation of long strings in debug code.
	* dirmngr/ks-engine-ldap.c (modlist_dump): Simplify truncation of long
	strings.

	dirmngr: Use a better error code.
	* dirmngr/ldap-parse-uri.c (ldap_parse_uri): On error, return
	GPG_ERR_GENERAL, not GPG_ERR_ASS_GENERAL.

	dirmngr: Better encapsulate the keyservers variable.
	* dirmngr/dirmngr.h (struct server_control_s): Move field keyservers
	from here...
	* dirmngr/server.c (struct server_local_s): ... to here.  Update
	users.
	* dirmngr/ks-action.h (ks_action_resolve): Add argument keyservers.
	(ks_action_search): Likewise.
	(ks_action_get): Likewise.
	(ks_action_put): Likewise.
	* dirmngr/ks-action.c (ks_action_resolve): Add argument keyservers.
	Use it instead of ctrl->keyservers.
	(ks_action_search): Likewise.
	(ks_action_get): Likewise.
	(ks_action_put): Likewise.

2015-03-28  Neal H. Walfield  <neal@g10code.de>

	gpg: Only use the last specified keyserver.
	* g10/gpg.c (main): Only use the last specified keyserver.

2015-03-25  Werner Koch  <wk@gnupg.org>

	dirmngr: Fix resource leaks and check rare errors.
	* dirmngr/ks-engine-ldap.c (keyspec_to_ldap_filter): Fix resource
	leak.
	(ks_ldap_search): Check error from es_fopenmem.  Use LDAP_ERR where
	required.
	(modlist_dump): Check error from es_fopenmem.
	(uncescape): s/int/size_t/.  Use existing macros.
	(extract_attributes): Use existing trim function.
	(ks_ldap_put): Do not segv on error from modlist_dump.

	dirmngr: Minor cleanups.
	* dirmngr/ks-engine-ldap.c [__riscos__]: Remove doubled util.h.
	(ldap_to_gpg_err): s/GPG_ERR_GENERAL/GPG_ERR_INTERNAL/.
	(tm2ldaptime): Use snprintf.
	(ldap_connect): Get error code prior to log_error and and use modern
	function.   Use xfree, xtrustrdup etc.
	(modlist_lookup): Use GNUPG_GCC_A_USED.
	(modlist_free): Use xfree.

	common: Add macro GNUPG_GCC_A_USED.
	* common/util.h (GNUPG_GCC_A_USED): New.

	sm: Change default algos to SHA256 (CSR) and AES128 (bulk encryption).
	* sm/certreqgen.c (create_request): Change default hash algo.
	* sm/gpgsm.c (DEFAULT_CIPHER_ALGO): Change default bulk cipher algo.

2015-03-24  Werner Koch  <wk@gnupg.org>

	gpg,w32: Handle forward slash in --keyring option.
	* g10/keydb.c (keydb_add_resource): Allow forward slash under Windows.

2015-03-23  Neal H. Walfield  <neal@g10code.de>

	Improve documentation for ks_hkp_get.
	* dirmngr/ks-engine-hkp.c (ks_hkp_get): Improvement documentation.

	Improve documenation of http_parse_uri.
	* common/http.c (http_parse_uri): Improve documentation.

	Add support to talking to LDAP key servers.
	* g10/call-dirmngr.c (record_output): New function.
	(ks_put_inq_cb): Use it here to generate a --with-colons like output
	instead of a custom format.
	* dirmngr/ks-action.c: Include "ldap-parse-uri.h".
	(ks_action_help): If the provided URI is an LDAP URI, then use
	ldap_parse_uri to parse.  Call ks_ldap_help.
	(ks_action_search): If passed an LDAP URI, then call ks_ldap_search.
	(ks_action_get): Likewise.
	(ks_action_put): Likewise.  Also, change data from a 'const void *' to
	a 'void *' and add info and infolen parameters.  Add note that
	function may modify DATA.
	* dirmngr/ks-action.h (ks_action_put): Update declaration accordingly.
	* dirmngr/server.c: Include "ldap-parse-uri.h".
	(cmd_keyserver): If ITEM->URI is an LDAP URI, parse it using
	ldap_parse_uri.
	(hlp_ks_put): Improve documentation.
	(cmd_ks_put): Also pass info and infolen to ks_action_put.  Improve
	documentation.
	* dirmngr/ks-engine.h (ks_ldap_help): New declaration.
	(ks_ldap_search): Likewise.
	(ks_ldap_get): Likewise.
	(ks_ldap_put): Likewise.
	* dirmngr/ks-engine-ldap.c: New file.
	* dirmngr/Makefile.am (dirmngr_SOURCES): Add ks-engine-ldap.c,
	ldap-parse-uri.c and ldap-parse-uri.h.
	(dirmngr_LDADD) [USE_LDAP]: Add $(ldaplibs).

	Import _gpgme_parse_timestamp from gpgme as parse_timestamp.
	* common/gettime.h (parse_timestamp): New declaration.
	* common/gettime.c (_win32_timegm): New function imported from
	gpgme/src/conversion.c:_gpgme_timegm.
	(parse_timestamp): New function imported from
	gpgme/src/conversion.c:_gpgme_parse_timestamp.

	Move copy_stream function to misc.c.
	* dirmngr/ks-action.c (copy_stream): Move function from here...
	* dirmngr/misc.c (copy_stream): ... to here and drop the static
	qualifier.
	* dirmngr/misc.h (copy_stream): Add declaration.

	Move armor_data to misc.c.
	* dirmngr/ks-engine-hkp.c (armor_data): Move function from here...
	* dirmngr/misc.c (armor_data): ... to here and drop static qualifier.
	* dirmngr/misc.h: New declaration.

	Add new LDAP utility functions.
	* dirmngr/Makefile.am (module_tests): New variable.
	(noinst_PROGRAMS): New primary.  Set it to $(module_tests).
	(TESTS): New variable.  Set it to $(module_tests).
	(t_common_src): New variable.
	(t_common_ldadd): Likewise.
	(t_ldap_parse_uri_SOURCES): New primary.
	(t_ldap_parse_uri_LDADD): Likewise.
	* dirmngr/ldap-parse-uri.c: New file.
	* dirmngr/ldap-parse-uri.h: Likewise.
	* dirmngr/t-ldap-parse-uri.c: Likewise.
	* dirmngr/t-support.h: Likewise.

	Add new function uri_query_lookup.
	* common/http.h (uri_query_lookup): New declaration.
	* common/http.c (uri_query_lookup): The corresponding implementation.

	Add new function strlist_find.
	* common/strlist.h (strlist_find): New declaration.
	* common/strlist.c (strlist_find): New function.

	common: Add new helper function, strsplit.
	* common/stringhelp.h (strsplit): New declaration.
	* common/stringhelp.c (strsplit): New function.
	* common/t-stringhelp.c (test_strsplit): New function.
	(main): Call it here.

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

	gpg: Consider a mailbox only userid in mail search mode.
	* kbx/keybox-search.c: Include mbox-util.h.
	(blob_cmp_mail): Improve OpenPGP uid parsing.

	common: Add function is_valid_mailbox_mem.
	* common/mbox-util.c (mem_count_chr): New.
	(my_memstr): New.
	(has_invalid_email_chars): Change args to work on a buffer.
	(is_valid_mailbox_mem): New.
	(is_valid_mailbox): Rewrite to use is_valid_mailbox_mem.

	gpg: Find keys using mail addresses with garbage after the '>'
	* kbx/keybox-search.c (blob_cmp_mail): Stop comparing at the '>'.

	common: Fix syntax error when building with gnutls.
	* common/http.c (send_request): Add missing comma.

2015-03-19  Werner Koch  <wk@gnupg.org>

	gpg: Emit status line NEWSIG before signature verification starts.
	* g10/mainproc.c (check_sig_and_print): Emit STATUS_NEWSIG.

	agent: Compute correct MPI length header for protected ECC keys.
	* agent/cvt-openpgp.c (apply_protection): Strip leading zeroes from
	opaque MPIs to comply with the OpenPGP spec.

	hkps: Fix host name verification when using pools.
	* common/http.c (send_request): Set the requested for SNI.
	* dirmngr/ks-engine-hkp.c (map_host): Return the poolname and not
	the selecting a host.

	Define replacement error codes from libgpg-error 1.19.
	* common/util.h: Add GPG_ERR_LDAP codes for libgpg-error < 1.19.

2015-03-17  Andre Heinecke  <aheinecke@intevation.de>

	gpgtar: Fix extracting files with !(size % 512)
	* tools/gpgtar-extract.c (extract_regular): Handle size multiples
	  of RECORDSIZE.

2015-03-17  Werner Koch  <wk@gnupg.org>

	common: Add feature to ease using argparse's usage().
	* common/argparse.c (show_help): Take care of flag value
	(usage): Ditto.

	common: Allow standalone build of argparse.c.
	* common/argparse.h: Remove types.h - not required.
	* common/argparse.c: Change to allow standalone use.

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

	gpg: Create all MPIs with RFC-4880 correct length headers.
	* g10/build-packet.c (gpg_mpi_write): Strip leading zeroes.

	gpg: Allow printing of MPI values in --list-mode.
	* g10/parse-packet.c (set_packet_list_mode): Set mpi_print_mode.
	* g10/misc.c (mpi_print): Do not print an extra leading zero.

	gpg: Fix broken write of opaque MPI length header.
	* g10/build-packet.c (gpg_mpi_write): Use a char array for the length.

2015-03-15  Werner Koch  <wk@gnupg.org>

	gpg: Fix possible dead code elimination.
	* g10/encrypt.c: Change condition for detecting a real file.

	g13: Fix pointer wrap check.
	* g13/utils.c (find_tuple, next_tuple): Cast pointer to size_t before
	doing an overflow check.

	agent: Remove useless conditions in command.c.
	* agent/command.c (cmd_setkeydesc): Remove NULL check.
	(cmd_get_passphrase): Ditto.
	(cmd_clear_passphrase): Ditto.
	(cmd_get_confirmation): Ditto.
	(cmd_getval): Ditto.
	(cmd_putval): Ditto.

	agent: Fix length test in sshcontrol parser.
	* agent/command-ssh.c (ssh_search_control_file): Check S before
	upcasing it.

	agent: Remove useless conditions.
	* agent/genkey.c (agent_ask_new_passphrase): Remove useless condition.
	* agent/command-ssh.c (ssh_identity_register): Ditto.

	gpg: Remove useless condition.
	* g10/keylist.c (list_keyblock_colon): Remove useless condition (PK).
	(list_keyblock_print):  Likewise.

	scd: Fix possible NULL deref in apdu.c.
	* scd/apdu.c (control_pcsc_direct): Take care of BUFLEN being NULL.
	(control_pcsc_wrapped): Ditto.

	common: Make openpgp_oid_to_str more robust.
	* common/openpgp-oid.c (openpgp_oid_to_str): Take care of
	gcry_mpi_get_opaque returning NULL.  Remove useless condition !BUF.

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

	agent: Improve error reporting from Pinentry.
	* agent/call-pinentry.c (unlock_pinentry): Add error logging.  Map
	error source of uncommon errors to Pinentry.

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

	gpg: Change --print-pka-records into an option.
	* g10/gpg.c (aPrintPKARecords): Rename to oPrintPKARecords and do not
	use it as a command.
	* g10/keylist.c (list_keyblock): List PKA rceords also for secret
	keys.

	gpg: Add --list-gcrypt-config and "curve" item for --list-config.
	* common/openpgp-oid.c (curve_supported_p): New.
	(openpgp_enum_curves): New.
	* common/t-openpgp-oid.c (test_openpgp_enum_curves): New.
	(main): Add option --verbose.
	* g10/gpg.c (opts): Add --list-gcrypt-config.
	(list_config): Add items "curve" and "curveoid".  Remove unused code.

2015-03-09  NIIBE Yutaka  <gniibe@fsij.org>

	scd: fix for 64-bit arch.
	* agent/pksign.c (agent_pksign_do): Use int.
	* scd/app-openpgp.c (get_public_key): Likewise.

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

	gpg: avoid chatter about trustdb when --quiet.
	* g10/trustdb.c (tdb_check_trustdb_stale): avoid log_info() when
	  opt.quiet

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

	gpg: Lowercase mailbox for PKA lookups.
	* common/stringhelp.c (ascii_strlwr): New.
	* common/mbox-util.c (mailbox_from_userid): Downcase result.

	gpg: Fix memory leak due to PKA lookup.
	* g10/keyserver.c (keyserver_import_pka): Move the xfree.

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

	gpg: Switch to a hash and CERT record based PKA system.
	* common/dns-cert.c (get_dns_cert): Make r_key optional.
	* common/pka.c: Rewrite for the new hash based lookup.
	* common/t-pka.c: New.
	* configure.ac: Remove option --disable-dns-pka.
	(USE_DNS_PKA): Remove ac_define.
	* g10/getkey.c (parse_auto_key_locate): Always include PKA.

	common: Allow requesting a specific certtype with get_dns_cert()
	* common/dns-cert.c (get_dns_cert): Add arg want_certtype.  Change all
	callers.
	(CERTTYPE_): Move constants to ...
	* common/dns-cert.h: here as DNS_CERTTYPE_.

	Move new mailbox.c source file to common/.
	* g10/mailbox.c: Move to ...
	* common/mbox-util.c: new file.
	* common/mbox-util.h: New. Include where needed.
	* g10/t-mailbox.c: Move to ...
	* common/t-mbox-util.c: new file.

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

	gpg: Add command --print-pka-records.
	* g10/gpg.c (main): Add command --print-pka-records.
	* g10/options.h (struct opt): Add field "print_pka_records".
	* g10/keylist.c (list_keyblock_pka): New.
	(list_keyblock): Call it if new option is set.
	(print_fingerprint): Add mode 10.

	gpg: Add function to extract the mailbox.
	* g10/misc.c (has_invalid_email_chars, is_valid_mailbox)
	(is_valid_user_id): Move to ...
	* g10/mailbox.c: new file.
	(string_has_ctrl_or_space, has_dotdot_after_at): New.
	(has_invalid_email_chars): New.

	* g10/t-mailbox.c: New.
	* g10/Makefile.am (module_tests): Add t-mailbox.
	(t_mailbox_SOURCES, t_mailbox_LDADD): New.

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

	gpg: Add option to print fingerprints in ICAO spelling.
	* g10/gpg.c: Add option --with-icao-spelling.
	* g10/options.h (struct opt): Add with_icao_spelling.
	* g10/keylist.c (print_icao_hexdigit): New.
	(print_fingerprint): Print ICAO spelling.

	gpg: Skip legacy keys while searching keyrings.
	* g10/getkey.c (search_modes_are_fingerprint): New.
	(lookup): Skip over legacy keys.

	common: Fix regression due to commit 2183683b.
	* common/dns-cert.c (get_dns_cert): Remove cruft.

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

	gpg: Replace remaining uses of stdio by estream.
	* g10/sign.c (sign_file):  Use log_printf instead of stderr.
	* g10/tdbdump.c (export_ownertrust): Use estream fucntions.
	(import_ownertrust): Ditto.
	* g10/tdbio.c (tdbio_dump_record): Ditto.  Change arg to estream_t.

	gpg: Fix segv due to NULL value stored as opaque MPI.
	* g10/build-packet.c (gpg_mpi_write): Check for NULL return from
	gcry_mpi_get_opaque.
	(gpg_mpi_write_nohdr, do_key): Ditto.
	* g10/keyid.c (hash_public_key): Ditto.

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

	scd: Fix regression in 2.1.2 (due to commit 2183683)
	* scd/apdu.c (pcsc_vendor_specific_init): Replace use of
	bufNN_to_uint by direct code.

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

	dirmngr: Initialize cache from sysconfig dir.
	* dirmngr/certcache.c (cert_cache_init): Load certificates
	from sysconfig dir instead of the homeidr.
	* dirmngr/dirmngr.c (main): Removed parsing of obsolete
	homedir_data option.
	* dirmngr/dirmngr.h (opt): Removed homedir_data.
	* doc/dirmngr.texi: Update and clarify certs directory doc.

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

	Release 2.1.2.

	dirmngr: Avoid warning about unused function.
	* dirmngr/dirmngr.c (my_gnutls_log): Build only if gnutls is used.

	build: Update standard build-aux files.

	Use inline functions to convert buffer data to scalars.
	* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
	(buf16_to_ushort, buf16_to_u16): New.
	(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.

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

	gpg: Prevent an invalid memory read using a garbled keyring.
	* g10/keyring.c (keyring_get_keyblock): Whitelist allowed packet
	types.
	* g10/keydb.c (parse_keyblock_image): Ditto.

	gpg: Fix a NULL-deref in export due to invalid packet lengths.
	* g10/build-packet.c (write_fake_data): Take care of a NULL stored as
	opaque MPI.

	gpg: Fix a NULL-deref due to empty ring trust packets.
	* g10/parse-packet.c (parse_trust): Always allocate a packet.

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

	gpg-agent: Use "pinentry-basic" as fallback.
	* common/homedir.c (get_default_pinentry_name): New.
	(gnupg_module_name): Use that for the default pinentry.
	(gnupg_module_name_flush_some): New.
	* agent/gpg-agent.c (agent_sighup_action): Flush some module names.
	* agent/call-pinentry.c (start_pinentry): Do not modify
	opt.pinentry_program.

	w32: Add manifest to gpg.
	* g10/gpg.w32-manifest.in: New.
	* g10/gpg-w32info.rc: Add manifest.
	* g10/Makefile.am (EXTRA_DIST): Add manifest.
	(gpg-w32info.o): Depend on manifest.
	* configure.ac (BUILD_VERSION): New.
	(AC_CONFIG_FILES): Add manifest.

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

	Update copyright years.
	* common/w32info-rc.h.in (W32INFO_COMPANYNAME): Change to "The GnuPG
	Project".

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

	w32: Change default Windows install dir and add bin to PATH.
	* build-aux/speedo.mk (WITH_GUI): New macro.  The Windows installer is
	now build by default without any GUI stuff.
	* build-aux/speedo/w32/inst.nsi: Change standard installation
	directory.
	(AddToPath, un.RemoveFromPath): New.
	(gnupginst): Add bin directory to the PATH.

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

	w32: Allow for Unicocde installation directory.
	* common/homedir.c (w32_rootdir): Use Unicode fucntion not only for
	WinCE.

2015-01-30  Joshua Rogers  <git@internot.info>

	kbx: Fix resource leak.
	* kbx/keybox-update.c (blob_filecopy): Fix resource leak.  On error
	return, 'fp' and 'newfp' was never closed.

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

	agent: Fix use of imported but unprotected openpgp keys.
	* agent/agent.h (PRIVATE_KEY_OPENPGP_NONE): New.
	* agent/command.c (do_one_keyinfo): Implement it.
	* agent/findkey.c (agent_key_from_file): Ditto.
	(agent_key_info_from_file): Ditto.
	(agent_delete_key): Ditto.
	* agent/protect.c (agent_private_key_type): Add detection for openpgp
	"none" method.

2015-01-29  NIIBE Yutaka  <gniibe@fsij.org>

	po: Update Japanese Translation.

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

	gpg: Limit the size of key packets to a sensible value.
	* g10/parse-packet.c (MAX_KEY_PACKET_LENGTH): New.
	(MAX_UID_PACKET_LENGTH): New.
	(MAX_COMMENT_PACKET_LENGTH): New.
	(MAX_ATTR_PACKET_LENGTH): New.
	(parse_key): Limit the size of a key packet to 256k.
	(parse_user_id): Use macro for the packet size limit.
	(parse_attribute): Ditto.
	(parse_comment): Ditto.

	gpg: Fix buffering problem in --list-config.
	* g10/gpg.c (list_config): Replace print_sanitized_string2 by
	es_write_sanitized.

	* common/stringhelp.c (print_sanitized_buffer2): Remove.
	(print_sanitized_buffer, print_sanitized_utf8_buffer): Remove.
	(print_sanitized_utf8_buffer, print_sanitized_utf8_string): Remove.
	(print_sanitized_string): Remove.

	* sm/certdump.c (print_dn_part, print_dn_parts): Remove arg FP.
	(pretty_print_sexp, gpgsm_print_name2, gpgsm_print_name): Remove.

	Add a hook to be called right after main.
	* common/init.c (early_system_init): New stub function.

	gpg: Allow predefined names as answer to the keygen.algo prompt.
	* g10/keygen.c (ask_algo): Add list of strings.

	agent: Add some extra robustness to extract_private_key.
	* agent/cvt-openpgp.c (extract_private_key): Add arg "arraysize".
	Make sure that R_FLAGS and R_CURVE are set to NULL.

2015-01-28  NIIBE Yutaka  <gniibe@fsij.org>

	scd: Fix varargs call for 64-bit arch on ECC keys.
	* scd/app-openpgp.c (store_fpr): Remove CARD_VERSION from the
	arguments.
	(rsa_writekey): Follow the change.
	(do_genkey): Likewise.
	(ecc_writekey): Likewise.  Cast to size_t.

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

	gpg: Fix segv introduced to commit 4d7c9b0.
	* g10/keygen.c (get_parameter_passphrase): Take care of R == NULL.

2015-01-27  NIIBE Yutaka  <gniibe@fsij.org>

	agent: Fix agent_public_key_from_file for ECC.
	* agent/cvt-openpgp.c (extract_private_key): New.
	(convert_to_openpgp): Use extract_private_key.
	* agent/findkey.c (agent_public_key_from_file): Use
	extract_private_key.

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

	sm: Simplify fix ed8383c6.
	* sm/minip12.c (p12_build): Release PWBUF only at the end.

2015-01-25  Joshua Rogers  <git@internot.info>

	ccid: Remove incorrect expression leading to errors.
	* scd/ccid-driver.c (send_escape_cmd): Fix setting of 'rc'.

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

	gpgconf: Fix validity check for UINT32 values.
	* tools/gpgconf-comp.c (option_check_validity): Enable check for
	UINT32.

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

	gpg: Improve skipping of PGP-2 keys.
	* g10/keydb.c (keydb_search_first, keydb_search_next): Skip legacy
	keys.
	* g10/keyring.c (keyring_get_keyblock): Handle GPG_ERR_LEGACY_KEY.
	(prepare_search): Ditto.
	(keyring_rebuild_cache): Skip legacy keys.
	* g10/keyserver.c (keyidlist): Ditto.
	* g10/trustdb.c (validate_key_list): Ditto.

	gpg: Add dedicated error code for PGP-2 keys.
	* g10/parse-packet.c (parse_key): Return GPG_ERR_LEGACY_KEY for PGP2
	keys.
	* g10/import.c (read_block): Simplify by checking GPG_ERR_LEGACY_KEY.
	* g10/getkey.c (lookup): Silence error message for PGP-2 keys.

	* common/util.h (GPG_ERR_LEGACY_KEY): Add replacement for older
	libgpg-error.

	gpg: Replace remaining old error code macros by GPG_ERR_.
	* g10/gpg.h (g10_errstr): Remove macro and change all occurrences by
	gpg_strerror.
	(G10ERR_): Remove all macros and change all occurrences by their
	GPG_ERR_ counterparts.

	gpg: Remove an unused variable.
	* g10/getkey.c (getkey_ctx_s): Remove last_rc.

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

	dirmngr: Fix TLS build problems.
	* dirmngr/Makefile.am (AM_CFLAGS): Add flags for TLS libs.

	gpg: Support --passphrase with --quick-gen-key.
	* g10/keygen.c: Include shareddefs.h.
	(quick_generate_keypair): Support static passphrase.
	(get_parameter_passphrase): New.
	(do_generate_keypair): Use it.

	gpg: Re-enable the "Passphrase" parameter for batch key generation.
	* agent/command.c (cmd_genkey): Add option --inq-passwd.
	* agent/genkey.c (agent_genkey): Add new arg override_passphrase.
	* g10/call-agent.c (inq_genkey_parms): Handle NEWPASSWD keyword.
	(agent_genkey): Add arg optional arg "passphrase".
	* g10/keygen.c (common_gen, gen_elg, gen_dsa, gen_ecc)
	(gen_rsa, do_create): Add arg "passphrase" and pass it through.
	(do_generate_keypair): Make use of pPASSPHRASE.
	(release_parameter_list): Wipe out a passphrase parameter.

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

	kbx: Minor cleanup for the previous fix.
	* kbx/keybox-search.c (blob_get_keyid): Rename to
	blob_get_first_keyid. Check number of keys and remove blob type check.

2015-01-19  Damien Goutte-Gattat  <dgouttegattat@incenp.org>

	kbx: Call skipfnc callback to filter out keys.
	* kbx/keybox-search.c (blob_get_keyid): New.
	(keybox-search): Call skipfnc callback function.

2015-01-13  Andreas Schwier  <andreas.schwier@cardcontact.de>

	scd: Allow for certificates > 1024 with PC/SC.
	* scd/pcsc-wrapper.c (handle_transmit): Enlarge buffer to 4096 too
	allow for larger certificates.

2015-01-08  NIIBE Yutaka  <gniibe@fsij.org>

	dirmngr: Fix error code path of map_host.
	* dirmngr/ks-engine-hkp.c (map_host): Fix error return.

2015-01-08  Joshua Rogers  <git@internot.info>

	scd: fix get_public_key for OpenPGPcard v1.0.
	* scd/app-openpgp.c (get_public_key): correctly close 'fp' upon use.

2015-01-07  NIIBE Yutaka  <gniibe@fsij.org>

	dirmngr: fix LDAP query PATTERNS limit check.
	* dirmngr/ldap.c (start_cert_fetch_ldap): fix ARGC limitation.

	scd: fix merge failure.
	* scd/apdu.c (pcsc_pinpad_verify): Remove wrong lines inserted by
	merge.

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

	sm,g13: Init local vars to avoid compiler warnings.
	* sm/misc.c (transform_sigval): Init RSA_S_LEN.
	* g13/mount.c (read_keyblob): Init HEADERLEN.

	gpg: Remove unused args from a function.
	* g10/keyserver.c (parse_keyserver_uri): Remove args configname and
	configlineno.  Change all callers.

	gpg: Clear a possible rest of the KDF secret buffer.
	* g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Fix order of args.

	build: Require automake 1.14.
	* configure.ac (AM_INIT_AUTOMAKE): Add serial-tests.

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

	agent: Make --allow-loopback-pinentry gpgconf changeable.

2014-12-22  Joshua Rogers  <git@internot.info>

	tools: Free variable before return.
	* tools/gpgconf-comp.c: Free 'dest_filename' before it is returned
	upon error.

2014-12-22  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>

	sm: Avoid double-free on iconv failure.
	* sm/minip12.c: (p12_build) if jnlib_iconv_open fails, avoid
	double-free of pwbuf.

	scd: Avoid double-free on error condition in scd.
	* scd/command.c (cmd_readkey): avoid double-free of cert

	avoid future chance of using uninitialized memory.
	* common/iobuf.c: (iobuf_open): initialize len

	avoid double-close in unusual dotlock situations.
	* common/dotlock.c: (dotlock_create_unix) avoid double-close()
	 in unusual situations.

	gpgkey2ssh: clean up varargs.
	* tools/gpgkey2ssh.c (key_to_blob) : ensure that va_end is called.

2014-12-22  Werner Koch  <wk@gnupg.org>

	doc: Fix memory leak in yat2m.
	* doc/yat2m.c (write_th): Free NAME.

	dirmngr: Fix memory leak.
	* dirmngr/server.c (cmd_ks_search, cmd_ks_get): Fix memory leak.

	* dirmngr/ks-engine-hkp.c (ks_hkp_mark_host): Remove double check.

	dirmngr: Remove un-needed check.
	* dirmngr/crlfetch.c (crl_fetch): Check that URL is not NULL.

	dirmngr,gpgsm: Return NULL on fail.
	* dirmngr/ldapserver.c (ldapserver_parse_one): Set SERVER to NULL.
	* sm/gpgsm.c (parse_keyserver_line): Ditto.

2014-12-22  NIIBE Yutaka  <gniibe@fsij.org>

	scd: ECDH Support.
	* agent/divert-scd.c (divert_pkdecrypt): Support ECDH.
	* scd/app-openpgp.c (get_algo_byte, store_fpr): Support ECDH.
	(send_key_attr): Support ECDH.  Fix EdDSA algorithm value.
	(retrieve_key_material): Initialize fields.
	(get_public_key, ecc_writekey, do_writekey): Support ECDH.
	(ecdh_writekey): Remove.
	(do_decipher): Support ECDH.
	(parse_algorithm_attribute): Support ECDH.  Fix EdDSA.

2014-12-19  Werner Koch  <wk@gnupg.org>

	agent: Make sure --max-cache-ttl is >= --default-cache-ttl.
	* agent/gpg-agent.c (finalize_rereadable_options): New.
	(main, reread_configuration): Call it.

	agent: Keep the session environment for restricted connections.
	* agent/command-ssh.c (setup_ssh_env): Move code to ...
	* agent/gpg-agent.c (agent_copy_startup_env): .. new function.  Change
	calllers.
	* agent/command.c (start_command_handler): Call that fucntion for
	restricted connections.

	agent: Fix string prepended to remotely initiated prompts.
	* agent/command.c (cmd_setkeydesc): Use %0A and not \n. Make
	translatable.

2014-12-18  Werner Koch  <wk@gnupg.org>

	build: Remove option to build without agent.
	* configure.ac (build-agent): Set to yes.

2014-12-17  Werner Koch  <wk@gnupg.org>

	gpgconf: Exit with failure if --launch fails.
	* tools/gpgconf-comp.c (gc_component_launch): Return an error code.
	* tools/gpgconf.c (main): Exit if launch failed.

2014-12-16  Werner Koch  <wk@gnupg.org>

	Release 2.1.1.

	po: Update the German translation.

2014-12-16  Petr Pisar  <petr.pisar@atlas.cz>

	po: Update Czech translation.

2014-12-16  Werner Koch  <wk@gnupg.org>

	gpg: Show private DO information in the card status.
	* g10/call-agent.c (agent_release_card_info): Free private_do.
	(learn_status_cb): Parse PRIVATE-DO-n stati.

2014-12-16  Ineiev  <ineiev@gnu.org>

	po: Update Russian translation.

2014-12-16  Jedi  <jedi@jedi.org>

	po: Update zh_TW translation.

2014-12-15  Werner Koch  <wk@gnupg.org>

	gpg: Add sub-command "factory-reset" to --card-edit.
	* common/util.h (GPG_ERR_OBJ_TERM_STATE): New.
	* scd/iso7816.c (map_sw): Add this error code.
	* scd/app-openpgp.c (do_getattr): Return the life cycle indicator.
	* scd/app.c (select_application): Allow a return value of
	GPG_ERR_OBJ_TERM_STATE.
	* scd/scdaemon.c (set_debug): Print the DBG_READER value.
	* g10/call-agent.c (start_agent): Print a status line for the
	termination state.
	(agent_scd_learn): Make arg "info" optional.
	(agent_scd_apdu): New.
	* g10/card-util.c (send_apdu): New.
	(factory_reset): New.
	(card_edit): Add command factory-reset.

	gpg: Fix regression in notation data regression.
	* g10/misc.c (pct_expando): Reorder conditions for clarity.
	* g10/sign.c (write_signature_packets): Fix notation data creation.

	gpg: Avoid extra LF in notaion data listing.
	* g10/keylist.c (show_notation): Use log_printf.

2014-12-12  Werner Koch  <wk@gnupg.org>

	scd: Fix possibly inhibited checkpin of the admin pin.
	* scd/app-openpgp.c (do_check_pin): Do not check a byte of a released
	buffer.

	gpg: Let --card--status create a shadow key (card key stub).
	* agent/command.c (cmd_learn): Add option --sendinfo.
	* agent/learncard.c (agent_handle_learn): Add arg "send" andsend
	certifciate only if that is set.
	* g10/call-agent.c (agent_scd_learn): Use --sendinfo.  Make INFO
	optional.
	(agent_learn): Remove.
	* g10/keygen.c (gen_card_key): Replace agent_learn by agent_scd_learn.

	gpg: Fix possible read of unallocated memory.
	* g10/parse-packet.c (can_handle_critical): Check content length
	before calling can_handle_critical_notation.

2014-12-11  Werner Koch  <wk@gnupg.org>

	build: Replace deprecated autconf macro.
	* m4/intl.m4: s/AM_PROG_MKDIR_P/AC_PROG_MKDIR_P/
	* m4/po.m4: Ditto.

2014-12-08  Werner Koch  <wk@gnupg.org>

	dirmngr: Improve dead host detection.
	* dirmngr/ks-engine-hkp.c (handle_send_request_error): Mark host dead
	also for 2 other error messages.

	http: Improve diagnostic messages.
	* common/http.c (send_request): Print TLS alert info
	(connect_server): Detect bogus DNS entry.

	gpg: Obsolete some keyserver helper options.
	* g10/options.h (opt): Remove keyserver_options.other.
	* g10/gpg.c (main): Obsolete option --honor-http-proxt.
	* g10/keyserver.c (add_canonical_option): Replace by ...
	(warn_kshelper_option): New.
	(parse_keyserver_uri): Obsolete "x-broken-http".

	dirmngr: Return a proper error for all dead hosts.
	* dirmngr/ks-engine-hkp.c (map_host): Change to return an gpg_error_t.
	Return an error code for all dead hosts.
	(make_host_part): Change to return an gpg_error_t.  Change all
	callers.

	gpg: Write a status line for a failed --send-keys.
	* g10/keyserver.c (keyserver_put): Write an status error.

2014-12-08  NIIBE Yutaka  <gniibe@fsij.org>

	scd: Fix for EdDSA.
	* scd/app-openpgp.c (get_algo_byte): It catches 22.
	(store_fpr): It's MPI usually, but it's opaque bytes for EdDSA.

2014-12-05  Andre Heinecke  <aheinecke@intevation.de>

	Document no-allow-mark-trusted option.
	    doc: Document no-allow-mark-trusted for gpg-agent

	    * doc/gpg-agent.texi: Change allow-mark-trusted doc to
	    no-allow-mark-trusted.

	    --
	    Since rev. 78a56b14 allow-mark-trusted is the default option
	    and was replaced by no-allow-mark-trusted to disable the
	    interactive prompt.

2014-12-05  NIIBE Yutaka  <gniibe@fsij.org>

	scd: Fix for NIST P-256.
	* g10/card-util.c (card_store_subkey): Error check.
	* scd/app-opengpg.c (ecc_writekey): Support NIST P-256.
	(do_writekey): Error check.

2014-12-04  Werner Koch  <wk@gnupg.org>

	gpg: Allow import of large keys.
	* g10/import.c (import): Skip too large keys.
	* kbx/keybox-file.c (IMAGELEN_LIMIT): Change limit from 2MB to 5MB.

2014-12-03  Werner Koch  <wk@gnupg.org>

	gpg: Remove option aliases --[no-]throw-keyid and --notation-data.
	* g10/gpg.c (opts): Remove them.
	* g10/options.h (opt): s/throw_keyid/throw_keyids/ and change users.

2014-12-02  Werner Koch  <wk@gnupg.org>

	agent: Replace some sprintf.
	* agent/call-scd.c (agent_card_pksign): Replace sprintf by bin2hex.
	* agent/command-ssh.c (ssh_identity_register): Ditto.
	* agent/pkdecrypt.c (agent_pkdecrypt): Replace sprintf by
	put_membuf_printf.

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

	tools: Improve watchgnupg portability.
	* configure.ac (AC_CHECK_HEADERS): Check for sys.select.h
	* tools/watchgnupg.c: Include it.

	gpg: Fix export bug using exact search with only one key in the keybox.
	* g10/export.c (do_export_stream): Disable caching.
	* g10/keyserver.c (keyidlist): Ditto.

	scd: Implement socket redirection.
	* scd/scdaemon.c (ENAMETOOLONG): New.
	(redir_socket_name): New.
	(cleanup): Take care of a redirected socket.
	(main): Pass redir_socket_name to create_server_socket.
	(create_socket_name): Remove superfluous length check.
	(create_server_socket): Add arg r_redir_name and implement
	redirection.  Replace assert for older Assuan by an error message.

	dirmngr: Implement socket redirection.
	* dirmngr/dirmngr.c (ENAMETOOLONG): new.
	(redir_socket_name): New.
	(main): Add Assuan socket redirection.
	(cleanup): Adjust cleanup for redirection.

2014-11-28  Werner Koch  <wk@gnupg.org>

	agent: Implement socket redirection.
	* agent/gpg-agent.c (ENAMETOOLONG): New.
	(redir_socket_name, redir_socket_name_extra)
	(redir_socket_name_ssh): New.
	(remove_socket): Take care of the redir names.
	(main): Pass the redir names to create_server_socket.
	(create_socket_name): Remove length check - that is anyway done later.
	(create_server_socket): Add arg r_redir_name and implement redirection
	if Libassuan is at least 2.14.

	gpg: Change another BUG() call to a regular error message.
	* g10/mainproc.c (proc_tree): Replace BUG by a proper error messages.

	Add option --no-autostart.
	* g10/gpg.c: Add option --no-autostart.
	* sm/gpgsm.c: Ditto.
	* g10/options.h (opt): Add field autostart.
	* sm/gpgsm.h (opt): Ditto.
	* g10/call-agent.c (start_agent): Print note if agent was not
	autostarted.
	* sm/call-agent.c (start_agent): Ditto.
	* g10/call-dirmngr.c (create_context): Likewise.
	* sm/call-dirmngr.c (start_dirmngr_ext): Ditto.

2014-11-27  Мирослав Николић  <wk@gnupg.org>

	gpg-agent: Add restricted connection feature.
	* agent/agent.h (opt): Add field extra_socket.
	(server_control_s): Add field restricted.
	* agent/command.c: Check restricted flag on many commands.
	* agent/gpg-agent.c (oExtraSocket): New.
	(opts): Add option --extra-socket.
	(socket_name_extra): New.
	(cleanup): Cleanup that socket name.
	(main): Implement oExtraSocket.
	(create_socket_name): Add arg homedir and change all callers.
	(create_server_socket): Rename arg is_ssh to primary and change
	callers.
	(start_connection_thread): Take ctrl as arg.
	(start_connection_thread_std): New.
	(start_connection_thread_extra): New.
	(handle_connections): Add arg listen_fd_extra and replace the
	connection starting code by parameterized loop.
	* common/asshelp.c (start_new_gpg_agent): Detect the use of the
	restricted mode and don't fail on sending the pinentry environment.

	* common/util.h (GPG_ERR_FORBIDDEN): New.

	agent: Make auditing of the option list easier.
	* agent/gpg-agent.c (opts): Use ARGPARSE_ macros.

2014-11-26  Kristian Fiskerstrand  <kf@sumptuouscapital.com>

	dirmngr: Only report hkps scheme when available.
	* dirmngr/ks-engine-hkp.c (ks_hkp_help): Make use of TLS macros.

2014-11-26  Werner Koch  <wk@gnupg.org>

	gpg: Change a bug() call to a regular error message.
	* g10/decrypt-data.c (decrypt_data): Return an error code instead of
	calling BUG().

2014-11-25  Werner Koch  <wk@gnupg.org>

	Fix buffer overflow in openpgp_oid_to_str.
	* common/openpgp-oid.c (openpgp_oid_to_str): Fix unsigned underflow.

	* common/t-openpgp-oid.c (BADOID): New.
	(test_openpgp_oid_to_str): Add test cases.

2014-11-24  Werner Koch  <wk@gnupg.org>

	gpg: Fix use of uninit.value in listing sig subpkts.
	* g10/parse-packet.c (dump_sig_subpkt): Print regex subpacket
	sanitized.

	gpg: Fix off-by-one read in the attribute subpacket parser.
	* g10/parse-packet.c (parse_attribute_subpkts): Check that the
	attribute packet is large enough for the subpacket type.

	gpg: Fix batch generation of ECC keys.
	* g10/keygen.c (get_parameter_algo): Map ECC algorithm strings
	directly.

2014-11-24  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>

	Distinguish between ARGPARSE_AMBIGUOUS_{OPTION,COMMAND}
	* common/argparse.c (initialize): Use correct value.

	gpg: Refer to --throw-keyids instead of --throw-keyid.
	* g10/encrypt.c: adjust error message

2014-11-21  Werner Koch  <wk@gnupg.org>

	gpg: Track number of skipped v3 keys on import.
	* g10/import.c (stats_s): Add field v3keys.
	(import): Update this field.
	(import_print_stats): Print v3 key count.
	(read_block): Skip v3 keys and return a count for them.

	gpg: Fix regression in parse_key.
	* g10/parse-packet.c (parse): Better return just the gpg_err_code.
	(parse_key): Return the error code.

	speedo: Add simple logos to the installer.
	* build-aux/speedo/w32/README.txt: Include GnuPG Readme.
	* build-aux/speedo/w32/gnupg-logo-150x57.bmp: New.
	* build-aux/speedo/w32/gnupg-logo-164x314.bmp: New.
	* build-aux/speedo/w32/inst.nsi: Add logos.
	* build-aux/speedo.mk ($(bdir)/NEWS.tmp): Extract news items.

2014-11-20  Werner Koch  <wk@gnupg.org>

	gpg: Fix hash detection for ECDSA.
	* g10/sign.c (sign_file): Use DSA or ECDSA and not DSA|EdDSA.

	Fix linker problem on OS X.
	* common/init.c (default_errsource): Move to the .data segmemt.

2014-11-19  Werner Koch  <wk@gnupg.org>

	gpg-connect-agent: Add convenience option --uiserver.

	Add "gpgconf --kill dirmngr" and avoid useless launch before a kill.
	* common/asshelp.c (start_new_gpg_agent): Add arg autostart.  Change
	all callers to use 1 for it.
	(start_new_dirmngr): Ditto.
	* tools/gpg-connect-agent.c: Add option --no-autostart.
	(main): Default autostart to 1.
	(start_agent): Implement no-autostart.
	* tools/gpgconf-comp.c (gpg_agent_runtime_change): Use --no-autostart.
	(scdaemon_runtime_change): Ditto.
	(dirmngr_runtime_change): New.

	po: Copied missing translations from the 2.0 branch.
	* po/LINGUAS: Add new translations.

2014-11-17  Werner Koch  <wk@gnupg.org>

	gpg: Fix a NULL-deref for invalid input data.
	* g10/mainproc.c (proc_encrypted): Take care of canceled passpharse
	entry.

2014-11-13  Werner Koch  <wk@gnupg.org>

	gpg: Make the use of "--verify FILE" for detached sigs harder.
	* g10/openfile.c (open_sigfile): Factor some code out to ...
	(get_matching_datafile): new function.
	* g10/plaintext.c (hash_datafiles): Do not try to find matching file
	in batch mode.
	* g10/mainproc.c (check_sig_and_print): Print a warning if a possibly
	matching data file is not used by a standard signatures.

	gpg: Fix a missing LF in debug output.
	* g10/kbnode.c (dump_kbnode): Print a LF.

	gpg: Remove PGP-2 related cruft.
	* g10/armor.c (parse_hash_header,carmor_filter): Ignore MD5 in hash
	header.
	(fake_packet): Remove pgp-2 workaround for white space stripping.
	* g10/filter.h (armor_filter_context_t): Remove field pgp2mode.
	* g10/options.h (opt): Remove field pgp2_workarounds.
	* g10/gpg.c (main): Do not set this field.
	* g10/gpgv.c (main): Ditto.
	* g10/mainproc.c (proc_encrypted): Use SHA-1 as fallback s2k hash
	  algo.  Using MD5 here is useless.
	(proc_plaintext): Remove PGP-2 related woraround
	(proc_tree): Remove another workaround but keep the one for PGP-5.

2014-11-12  Werner Koch  <wk@gnupg.org>

	gpg: Improve perceived speed of secret key listings.
	* g10/keylist.c (list_keyblock): Flush stdout for secret keys.

	gpg: Fix regression in --refresh-keys.
	* g10/keyserver.c (keyserver_get): Factor all code out to ...
	(keyserver_get_chunk): new.  Extimate line length.
	(keyserver_get): Split up requests into chunks.

	gpg: Add import options "keep-ownertrust".
	* g10/options.h (IMPORT_KEEP_OWNERTTRUST): New.
	* g10/import.c (parse_import_options): Add "keep-ownertrust".
	(import_one): Act upon new option.

2014-11-11  Werner Koch  <wk@gnupg.org>

	Remove use of gnulib (part 2)
	* configure.ac (strpbrk): Add to AC_CHECK_FUNCS.
	(gl_EARLY): Remove.
	* common/stringhelp.c (strpbrk) [!HAVE_STRPBRK]: New.
	* common/sysutils.c (gnupg_mkdtemp): New.  Based on code from
	glibc-2.6.
	(gnupg_setenv): Rewrite.
	(gnupg_unsetenv): Rewrite.
	* g10/exec.c: Include sysutils.h and replace mkdtemp by gnupg_mkdtemp.
	* g13/be-encfs.c: Ditto.
	* g13/mount.c: Ditto.
	* tools/symcryptrun.c (confucius_mktmpdir): Ditto.

	Remove use of gnulib (part 1)
	* gl/: Remove entire tree.
	* configure.ac: Remove gnulib tests and the gl/ Makefile.
	(setenv): Add to AC_CHECK_FUNCS.
	* autogen.rc (extra_aclocal_flags): Set to empty.
	* Makefile.am (ACLOCAL_AMFLAGS): Remove -I gl/m4
	(SUBDIRS): Remove gl/.
	* agent/Makefile.am (common_libs): Remove ../gl/gnulib.a
	* common/Makefile.am (t_common_ldadd): Ditto.
	* dirmngr/Makefile.am (dirmngr_LDADD): Ditto.
	(dirmngr_ldap_LDADD, dirmngr_client_LDADD): Ditto.
	* g10/Makefile.am (needed_libs): Ditto.
	* g13/Makefile.am (g13_LDADD): Ditto.
	* kbx/Makefile.am (kbxutil_LDADD): Ditto.
	($(PROGRAMS)): Ditto.
	* scd/Makefile.am (scdaemon_LDADD): Ditto.
	* sm/Makefile.am (common_libs): Ditto.
	* tools/Makefile.am (common_libs, commonpth_libs): Ditto.

	* agent/gpg-agent.c: Remove "mkdtemp.h"
	* g10/exec.c: Ditto.
	* scd/scdaemon.c: Ditto.
	* tools/symcryptrun.c: Ditto.
	* common/sysutils.c: Remove "setenv.h"

	* common/t-timestuff.c: Use putenv if setenv is not available.

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

	gpg: Remove warning message for non-implemented search modes.
	* kbx/keybox-search.c (keybox_search): Silently ignore.
	* doc/specify-user-id.texi: Docuement '@", '+', and '.' search
	prefixes.

	w32: Fix http access module.
	* common/http.c (write_server) [W32]: Rework to use send() instead of
	write even when build with npth.
	(cookie_read) [W32]: Rework to use recv() instead of read even when
	build with npth.

	build: Add method to use a custom swdb.lst and use adns with Windows.
	* build-aux/getswdb.sh: Add option --skip-verify.
	* build-aux/speedo.mk: Add config var CUSTOM_SWDB.  Tage adns version
	from swdb and build for Windows with adns.

	build: Improve test for ADNS.
	* configure.ac <adns>: Use adns_free as probe function for libadns.
	(HAVE_ADNS_FREE): Remove bogus tests to set this and remove the macro.
	(ADNSLIBS): Do not ac_subst - it is only used within configure.

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

	speedo: Append the date to the Windows installer.
	* build-aux/speedo.mk (BUILD_DATESTR): New.
	(dist-source, installer): Use it.

	Release 2.1.0.

	Avoid sign extension when shifting the MSB.
	* sm/fingerprint.c (gpgsm_get_short_fingerprint): Cast MSB before
	shifting.
	* g10/build-packet.c (delete_sig_subpkt): Ditto.

2014-11-04  Werner Koch  <wk@gnupg.org>

	Remove all expired common CA certificates.
	* doc/com-certs.pem: Remove certifciates.

2014-11-02  Werner Koch  <wk@gnupg.org>

	gpg: Avoid extra pinentries for each subkey in --export-secret-keys.
	* agent/command.c (cmd_export_key): Actually implement the cache_nonce
	feature.
	* g10/export.c (do_export_stream): Make use of a cache_nonce.

	gpg: Fix endless loop in keylisting with fingerprint.
	* g10/getkey.c (getkey_next): Disable cache.

	gpg: Minor cleanup for key listing related code.
	* g10/getkey.c (get_pubkey_next): Divert to getkey_next.
	(get_pubkey_end): Move code to getkey_end.
	* g10/keydb.c (keydb_search_reset): Add a debug statement.
	(dump_search_desc): Add arg HD and print the handle.

	gpg: Do not show an useless passphrase prompt in batch mode.
	* g10/keygen.c: Remove unused PASSPHRASE related code.
	(proc_parameter_file): Remove useless asking for a passphrase in batch
	mode.

2014-10-31  Werner Koch  <wk@gnupg.org>

	gpg: Remove superfluous check for Libgcrypt >= 1.4.0.
	* g10/gpg.c (main): Remove check.

	kbx: Let keydb_search skip unwanted blobs.
	* kbx/keybox.h (keybox_blobtype_t): New.
	* kbx/keybox-defs.h (BLOBTYPE_*): Replace by KEYBOX_BLOBTYPE_*.
	* kbx/keybox-search.c (keybox_search): Add arg want_blobtype and skip
	non-matching blobs.
	* sm/keydb.c (keydb_search): Pass KEYBOX_BLOBTYPE_X509 to keybox_search.
	* g10/keydb.c (keydb_search): Pass KEYBOX_BLOBTYPE_PGP to keybox_search.

	gpg: Fix --rebuild-keydb-caches.
	* g10/parse-packet.c (parse_key): Store even unsupported packet
	versions.
	* g10/keyring.c (keyring_rebuild_cache): Do not copy keys with
	versions less than 4.

	gpg: Fix testing for secret key availability.
	* g10/getkey.c (have_secret_key_with_kid): Do not change the search
	mode.

	build: Avoid distributing backup files etc.
	* Makefile.am (EXTRA_DIST): Do not include directories.

2014-10-30  Werner Koch  <wk@gnupg.org>

	tests: Speed up the genkey1024.test by using not so strong random.
	* agent/gpg-agent.c (oDebugQuickRandom): New.
	(opts): New option --debug-quick-random.
	(main): Use new option.
	* common/asshelp.c (start_new_gpg_agent): Add hack to pass an
	additional argument for the agent name.
	* tests/openpgp/defs.inc: Pass --debug-quick-random to the gpg-agent
	starting parameters.
	* tests/openpgp/version.test: Ditto.

2014-10-29  Werner Koch  <wk@gnupg.org>

	common: Check option arguments for a valid range.
	* common/argparse.h (ARGPARSE_INVALID_ARG): New.
	* common/argparse.c: Include limits h and errno.h.
	(initialize): Add error strings for new error constant.
	(set_opt_arg): Add range checking.

	Fix stdint.h problem for Apple.
	* gl/stdint_.h [__APPLE__]: Include hack.

2014-10-27  Werner Koch  <wk@gnupg.org>

	speedo: Fixes for native build.
	* build-aux/speedo.mk (TARGETOS): Init with empty string.
	(speedo_pkg_gnupg_configure): Use --enable-gpg2-is-gpg only for w32.
	(INST_VERSION, INST_PROD_VERSION): Create only for w32.

2014-10-24  Werner Koch  <wk@gnupg.org>

	agent: Support pinentries with integrated repeat passphrase feature.
	* agent/agent.h (struct pin_entry_info_s): Add fields repeat_okay and
	with_repeat.
	* agent/call-pinentry.c (close_button_status_cb): Rewrite and check
	for PIN_REPEAT.  Change users to check only the relevant bit.
	(agent_askpin): Support repeat logic of new Pinentries.

	* agent/command-ssh.c (ssh_identity_register): Use the new repeat
	feature.
	* agent/genkey.c (agent_ask_new_passphrase): Ditto.

2014-10-19  Werner Koch  <wk@gnupg.org>

	gpg: Silence "packet with obsolete versoin" warnings.
	* g10/parse-packet.c (parse_key): Print warning only in very verbose
	mode.

	gpg: Make card key generation work again.
	* g10/call-agent.c (agent_scd_learn): Rename from agent_learn.
	(agent_learn): New.
	* g10/keygen.c (gen_card_key): Call new agent-learn.

2014-10-17  Werner Koch  <wk@gnupg.org>

	dirmngr: Allow building without LDAP support.
	* configure.ac: Add option --disable-ldap.
	(USE_LDAP): New ac_define and am_conditional.
	* dirmngr/Makefile.am: Take care of USE_LDAP.
	* dirmngr/dirmngr.c (!USE_LDAP): Make all ldap options dummy options
	and do not call any ldap function.
	* dirmngr/server.c (!USE_LDAP): Do not call any ldap function.
	* dirmngr/crlfetch.c (!USE_LDAP): Ditto.

	w32: Set SYSROOT to help finding config scripts.
	* autogen.sh <build-w32>: Set SYSROOT.

	gpg: Remove all support for v3 keys and always create v4-signatures.
	* g10/build-packet.c (do_key): Remove support for building v3 keys.
	* g10/parse-packet.c (read_protected_v3_mpi): Remove.
	(parse_key): Remove support for v3-keys.  Add dedicated warnings for
	v3-key packets.
	* g10/keyid.c (hash_public_key): Remove v3-key support.
	(keyid_from_pk): Ditto.
	(fingerprint_from_pk): Ditto.

	* g10/options.h (opt): Remove fields force_v3_sigs and force_v4_certs.
	* g10/gpg.c (cmd_and_opt_values): Remove oForceV3Sigs, oNoForceV3Sigs,
	oForceV4Certs, oNoForceV4Certs.
	(opts): Turn --force-v3-sigs, --no-force-v3-sigs, --force-v4-certs,
	--no-force-v4-certs int dummy options.
	(main): Remove setting of the force_v3_sigs force_v4_certs flags.
	* g10/revoke.c (gen_revoke, create_revocation): Always create v4 certs.
	* g10/sign.c (hash_uid): Remove support for v3-signatures
	(hash_sigversion_to_magic): Ditto.
	(only_old_style): Remove this v3-key function.
	(write_signature_packets): Remove support for creating v3-signatures.
	(sign_file): Ditto.
	(sign_symencrypt_file): Ditto.
	(clearsign_file): Ditto.  Remove code to emit no Hash armor line if
	only v3-keys are used.
	(make_keysig_packet): Remove arg SIGVERSION and force using
	v4-signatures.  Change all callers to not pass a value for this arg.
	Remove all v3-key related code.
	(update_keysig_packet): Remove v3-signature support.
	* g10/keyedit.c (sign_uids): Always create v4-signatures.

	* g10/textfilter.c (copy_clearsig_text): Remove arg pgp2mode and
	change caller.

2014-10-13  Werner Koch  <wk@gnupg.org>

	gpg: Remove extra RSA import status line.
	* g10/import.c (stats_s): Remove field "imported_rsa".
	(import_print_stats): Do not print separate value for RSA.
	(import_one): Remove the RSA counter.

	gpg: Fix informative printing of user ids.
	* g10/getkey.c (keyid_list): Add field "fpr".
	(cache_user_id): Store fpr and check for dups only by fpr.
	(get_pubkey_byfpr): New.
	(get_user_id_string): Make static and use xasprintf.
	(get_long_user_id_string): Use xasprintf.
	(get_user_id_byfpr): New.
	(get_user_id_byfpr_native): New.
	* g10/keyid.c (fingerprint_from_pk): Make arg RET_LEN optional.
	* g10/import.c (import_one): Use get_user_id_byfpr_native.

	gpg: Allow importing keys with duplicated long key ids.
	* g10/keydb.c (keydb_handle): Add field no_caching.
	(keyblock_cache): Repalce field kid by fpr.
	(keydb_disable_caching): New.
	(keydb_search): Use the fingerprint as cache index.

	* g10/import.c (import_one): Use the fingerprint and not the kid to
	lookup the key.  Call keydb_disable_caching beofre re-searching for
	update.

	* tests/openpgp/import.test: Add a test case.

	tests: Speed up conventional encryption tests for gpg.
	* tests/openpgp/conventional-mdc.test: Add an s2k-count option.
	* tests/openpgp/conventional.test: Ditto.

2014-10-12  Werner Koch  <wk@gnupg.org>

	gpg: Minor change for better readability.
	* g10/build-packet.c (write_version): Remove.
	(do_pubkey_enc, do_onepass_sig): Write version directly.

2014-10-10  Werner Koch  <wk@gnupg.org>

	doc: Fix a man page rendering problem.
	* doc/gpg-agent.texi (Agent Configuration): Fix rendering of the
	sshcontrol example.

2014-10-10  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>

	gpg: Add build and runtime support for larger RSA keys.
	* configure.ac: Added --enable-large-secmem option.
	* g10/options.h: Add opt.flags.large_rsa.
	* g10/gpg.c: Contingent on configure option: adjust secmem size,
	add gpg --enable-large-rsa, bound to opt.flags.large_rsa.
	* g10/keygen.c: Adjust max RSA size based on opt.flags.large_rsa
	* doc/gpg.texi: Document --enable-large-rsa.

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

	gpg: Skip overlong keys and a print a warning.
	* kbx/keybox-search.c (keybox_search): Add arg r_skipped and skip too
	long blobs.
	* sm/keydb.c (keydb_search): Call keybox_search with a dummy param.
	* g10/keydb.c (struct keydb_handle): Add field skipped_long_blobs.
	(keydb_search_reset): Reset that field.
	(keydb_search): Update that field.
	(keydb_get_skipped_counter): New.
	* g10/keylist.c (list_all): Print count of skipped keys.

	gpg: Sync keylist output and warning messages.
	* g10/keylist.c (list_all): Flush stdout before logging.
	* g10/misc.c (print_pubkey_algo_note): Ditto.
	(print_cipher_algo_note): Ditto.
	(print_digest_algo_note): Ditto.
	(print_md5_rejected_note): Ditto.

	kbx: Fix handling of overlong keys.
	* kbx/keybox-file.c (IMAGELEN_LIMIT): Change limit from 10^6 to 2MiB.
	(_keybox_read_blob2): Skip too long record records.
	(_keybox_write_blob): Do not accept too long record.
	* kbx/keybox-dump.c (file_stats_s): Add field skipped_long_blobs.
	(_keybox_dump_file): Print new counter.
	(_keybox_dump_file): Skip too long records.
	----

	To test this feature you may set the limit back to 1MiB and use key
	F7F0E70F307D56ED which is in my local copy close to 2MiB.  Without
	this patch it was possible to import the key but access to that key
	and all keys stored after it was not possible.

	gpg: Take care to use pubring.kbx if it has ever been used.
	* kbx/keybox-defs.h (struct keybox_handle): Add field for_openpgp.
	* kbx/keybox-file.c (_keybox_write_header_blob): Set openpgp header
	flag.
	* kbx/keybox-blob.c (_keybox_update_header_blob): Add arg for_openpgp
	and set header flag.
	* kbx/keybox-init.c (keybox_new): Rename to do_keybox_new, make static
	and add arg for_openpgp.
	(keybox_new_openpgp, keybox_new_x509): New.  Use them instead of the
	former keybox_new.
	* kbx/keybox-update.c (blob_filecopy): Add arg for_openpgp and set the
	openpgp header flags.

	* g10/keydb.c (rt_from_file): New.  Factored out and extended from
	keydb_add_resource.
	(keydb_add_resource): Switch to the kbx file if it has the openpgp
	flag set.

	* kbx/keybox-dump.c (dump_header_blob): Print header flags.

2014-10-09  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>

	Avoid unnecessary library linkage.
	* dirmngr/Makefile.am: Avoid $(DNSLIBS) for dirmngr_ldap
	* g10/Makefile.am: $(LIBREADLINE) is only for gpg2; gpgv2 does not
	need $(LIBASSUAN_LIBS)
	* sm/Makefile.am: gpgsm does not need $(ZLIBS)
	* tools/Makefile.am: gpgconf does not need $(NPTH_LIBS)

2014-10-08  Werner Koch  <wk@gnupg.org>

	gpg: Avoid error exit if keygrip computations fails in a key listing.
	* g10/keyid.c (keygrip_from_pk): Use log_info and clear array on error.

2014-10-03  Werner Koch  <wk@gnupg.org>

	Release 2.1.0-beta864.

	gpg: Allow creating a cert-only primary key.
	* g10/keygen.c (ask_key_flags): Allow a 'c' in direct entry.

	build: Add configure options --disable-{ntb,gnu}tls.
	* configure.ac: Add --disable-ntbtls and --disable-gnutls.

2014-10-03  Andre Heinecke  <aheinecke@intevation.de>

	gpg: Check gpg-agent version before 2.1 migration.
	* g10/call-agent.c, g10/call-agent.h (agent_get_version): New.
	* g10/migrate.c (migrate_secring): Abort migration if
	agent_get_version returns not at least 2.1.0

2014-10-03  Werner Koch  <wk@gnupg.org>

	po: Update German translation.

	Remove support for the GPG_AGENT_INFO envvar.
	* agent/agent.h (opt): Remove field use_standard_socket.
	* agent/command.c (cmd_killagent): Always allow killing.
	* agent/gpg-agent.c (main): Turn --{no,}use-standard-socket and
	--write-env-file into dummy options.  Always return true for
	--use-standard-socket-p. Do not print the GPG_AGENT_INFO envvar
	setting or set that envvar.
	(create_socket_name): Simplify by removing non standard socket
	support.
	(check_for_running_agent): Ditto.
	* common/asshelp.c (start_new_gpg_agent): Remove GPG_AGENT_INFO use.
	* common/simple-pwquery.c (agent_open): Ditto.
	* configure.ac (GPG_AGENT_INFO_NAME): Remove.
	* g10/server.c (gpg_server): Do not print the AgentInfo comment.
	* g13/server.c (g13_server): Ditto.
	* sm/server.c (gpgsm_server): Ditto.
	* tools/gpgconf.c (main): Simplify by removing non standard socket
	support.

2014-10-02  Werner Koch  <wk@gnupg.org>

	gpg: Fix regression removing SHA256.
	* g10/misc.c (map_md_openpgp_to_gcry): Always use SHA256.

	First changes for future use of NTBTLS.
	* configure.ac (NEED_NTBTLS_ABI, NEED_NTBTLS_VERSION): New.
	(HTTP_USE_NTBTLS): New.  Prefer over GNUTLS.
	* m4/ntbtls.m4: New.
	* m4/Makefile.am (EXTRA_DIST): Add new file.
	* common/http.c: Add conditionals to eventually use NTBTLS.

	build: Update m4 scripts.
	* m4/gpg-error.m4: Update from Libgpg-error git master.
	* m4/libgcrypt.m4: Update from Libgcrypt git master.
	* configure.ac: Declare SYSROOT a precious variable.  Add extra error
	message for library configuration mismatches.

2014-09-29  Werner Koch  <wk@gnupg.org>

	doc: Remove GnuPG-1 related parts from gpg.texi.
	* doc/Makefile.am (YAT2M_OPTIONS): Add 2.1 to the source info.
	* doc/gpg.texi: Remove gpg1 related texts.

2014-09-27  Werner Koch  <wk@gnupg.org>

	gpg: Default to SHA-256 for all signature types on RSA keys.
	* g10/main.h (DEFAULT_DIGEST_ALGO): Use SHA256 in --gnupg and SHA1 in
	strict RFC or PGP modes.
	* g10/sign.c (make_keysig_packet): Use DEFAULT_DIGEST_ALGO also for
	RSA key signatures.
	* configure.ac: Do not allow to disable sha256.

	gpg: Simplify command --gen-key and add --full-gen-key.
	* g10/gpg.c (aFullKeygen): New.
	(opts): Add command --full-key-gen.
	(main): Implement it.
	* g10/keygen.c (DEFAULT_STD_ALGO): Replace wrong GCRY_PK_RSA although
	the value is identical.
	(DEFAULT_STD_CURVE): New.
	(DEFAULT_STD_SUBALGO): New.
	(DEFAULT_STD_SUBKEYSIZE): New.
	(DEFAULT_STD_SUBCURVE): New.
	(quick_generate_keypair): Use new macros here.
	(generate_keypair): Add arg "full" and fix call callers. Do not ask
	for keysize in non-full node.
	(ask_user_id): Add arg "full" and simplify for non-full mode.

2014-09-26  Werner Koch  <wk@gnupg.org>

	gpg: Add shortcut for setting key capabilities.
	* g10/keygen.c (ask_key_flags): Add shortcut '='.
	* doc/help.txt (gpg.keygen.flags): New.

2014-09-25  Werner Koch  <wk@gnupg.org>

	gpg: Do not always print dashes in obsolete_option.
	* g10/gpg.c (main): Pass option names to obsolete_option without
	double dash.
	* g10/misc.c (obsolete_option, obsolete_scdaemon_option): Print double
	dash only for command line options.

2014-09-25  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>

	gpg: Warn about (but don't fail) on scdaemon options in gpg.conf.
	* g10/gpg.c: Add config options that should belong in scdaemon.conf
	* g10/main.h, g10/misc.c (obsolete_scdaemon_option): New.

2014-09-22  Werner Koch  <wk@gnupg.org>

	speedo: Check that wget and gpgv are installed.
	* build-aux/getswdb.sh: Check for required tools.

	speedo: Autodetect sha1sum tools.
	* build-aux/getswdb.sh: Add option --find-sha1sum.
	* build-aux/speedo.mk (check-tools): New phony target.  Not yet used.
	(SHA1SUM): New var.  Use it instead of sha1sum.

	gpg: Create default keyring with .kbx suffix.
	* g10/keydb.c (maybe_create_keyring_or_box): Rename arg for clarity.
	(keydb_add_resource): Fix order of args to maybe_create_keyring_or_box
	and check and create .kbx.

2014-09-20  Werner Koch  <wk@gnupg.org>

	gpg: --delete-secret-key - check that a secret key exists.
	* g10/delkey.c (do_delete_key): Check availibility of a secret key.

	gpg: Make algorithm selection prompt for ECC more clear.
	* g10/keygen.c (ask_algo): Change 9 to "ECC and ECC".

2014-09-18  Werner Koch  <wk@gnupg.org>

	Release 2.1.0-beta834.

	speedo: Distribute needed files.
	* Makefile.am (EXTRA_DIST): Add speedo stuff.

	build: Enable gpgtar by default.

	common: Do not build maintainer modules in non-maintainer mode.
	* common/Makefile.am (module_maint_tests): Use only in maintainer
	mode.
	(t_common_cflags): New.

	common: Remove superfluous statements.
	* common/exechelp-posix.c: Remove weak pragmas.
	* common/sexputil.c (make_canon_sexp_from_rsa_pk): Remove double
	const.

	g13: Avoid segv after pipe creation failure.
	* g13/call-gpg.c (gpg_encrypt_blob): Init some vars in case of an
	early error.
	(gpg_decrypt_blob): Ditto.

	scd: Fix int/short mismatch in format string of app-p15.c.
	* scd/app-p15.c (parse_certid): Use snprintf and cast value.
	(send_certinfo): Ditto.
	(send_keypairinfo): Ditto.
	(do_getattr): Ditto.

	agent: Init a local variable in the error case.
	* agent/pksign.c (do_encode_md): Init HASH on error.

	agent: Remove left over debug output.
	* agent/command-ssh.c (ssh_signature_encoder_eddsa): Remove debug
	output.

	agent: Silence compiler warning for a debug message.
	* agent/call-pinentry.c (agent_query_dump_state): Use %p for
	POPUP_TID.

	sm: Silence compiler warnings.
	* sm/certreqgen-ui.c (gpgsm_gencertreq_tty): Remove unused var I.
	* sm/certreqgen.c (proc_parameters): Init PUBLIC to avoid compiler
	warning.

	gpg: Silence a compiler warning.
	* g10/parse-packet.c (enum_sig_subpkt): Replace hack.

	gpg: Replace a hash algo test function.
	* g10/gpg.c (print_mds): Replace openpgp_md_test_algo.

	speedo: Various fixes.
	* build-aux/speedo.mk: Take zlib and bzip2 from ftp.gnupg.org.  Minor
	other fixes.

2014-09-17  Werner Koch  <wk@gnupg.org>

	gpg: Print a warning if the subkey expiration may not be what you want.
	* g10/keyedit.c (subkey_expire_warning): New.
	(keyedit_menu): Call it when needed.

	gpg: Improve passphrase caching.
	* agent/cache.c (last_stored_cache_key): New.
	(agent_get_cache): Allow NULL for KEY.
	(agent_store_cache_hit): New.
	* agent/findkey.c (unprotect): Call new function and try to use the
	last stored key.

	* g10/revoke.c (create_revocation): Add arg CACHE_NONCE and pass to
	make_keysig_packet.
	(gen_standard_revoke): Add arg CACHE_NONCE and pass to
	create_revocation.
	* g10/keygen.c (do_generate_keypair): Call gen_standard_revoke with
	cache nonce.

2014-09-12  Werner Koch  <wk@gnupg.org>

	gpg: Use algorithm id 22 for EdDSA.
	* common/openpgpdefs.h (PUBKEY_ALGO_EDDSA): Change to 22.
	* g10/keygen.c (ask_curve): Reword the Curve25519 warning note.

2014-09-11  Werner Koch  <wk@gnupg.org>

	gpg: Stop early on bogus old style comment packets.
	* g10/parse-packet.c (parse_key): Take care of too short packets for
	old style commet packets.

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

	dirmngr: Support https for KS_FETCH.
	* dirmngr/ks-engine-hkp.c (cert_log_cb): Move to ...
	* dirmngr/misc.c (cert_log_cb): here.
	* dirmngr/ks-engine-http.c (ks_http_fetch): Support 307-redirection
	and https.

	dirmngr: Fix the ks_fetch command for the http scheme.
	* common/http.c (http_session_ref): Allow for NULL arg.

2014-09-08  Werner Koch  <wk@gnupg.org>

	gpg: Fix memory leak in ECC encryption.
	* g10/pkglue.c (pk_encrypt): Fix memory leak and streamline error
	handling.

2014-09-02  Werner Koch  <wk@gnupg.org>

	gpg: Fix export of NIST ECC keys.
	* common/openpgp-oid.c (struct oidtable): New.
	(openpgp_curve_to_oid): Rewrite and allow OID as input.
	(openpgp_oid_to_curve): Make use of the new table.

	agent: Fix import of OpenPGP EdDSA keys.
	* agent/cvt-openpgp.c (get_keygrip): Special case EdDSA.
	(convert_secret_key): Ditto.
	(convert_transfer_key): Ditto.
	(apply_protection): Handle opaque MPIs.

	(do_unprotect): Check FLAG_OPAQUE instead of FLAG_USER1 before
	unpacking an opaque mpi.

2014-09-01  Kyle Butt  <kylebutt@gmail.com>

	gpg: Fix export of ecc secret keys by adjusting check ordering.
	* g10/export.c (transfer_format_to_openpgp): Move the check against
	PUBKEY_MAX_NSKEY to after the ECC code adjusts the number of
	parameters.

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

	agent: Allow key unprotection using AES-256.
	* agent/protect.c (PROT_CIPHER): Rename to GCRY_CIPHER_AES128 for
	clarity.
	(do_decryption): Add args prot_cipher and prot_cipher_keylen.  USe
	them instead of the hardwired values.
	(agent_unprotect): Change to use a table of protection algorithms.
	Add AES-256 variant.

2014-08-28  Werner Koch  <wk@gnupg.org>

	gpg: Do not show "MD5" and triplicated "RSA" in --version.
	* g10/gpg.c (build_list_pk_test_algo): Ignore RSA aliases
	(build_list_md_test_algo): Ignore MD5.

	gpg: Do not show "MD5" and triplicated "RSA" in --version.
	* g10/gpg.c (build_list_pk_test_algo): Ignore RSA aliases
	(build_list_md_test_algo): Ignore MD5.

2014-08-26  Werner Koch  <wk@gnupg.org>

	gpg: Remove CAST5 from the default prefs and order SHA-1 last.
	* g10/keygen.c (keygen_set_std_prefs): Update prefs.

	Switch to the libgpg-error provided estream.
	* configure.ac (NEED_GPG_ERROR_VERSION): Reguire 1.14.
	(GPGRT_ENABLE_ES_MACROS): Define.
	(estream_INIT): Remove.
	* m4/estream.m4: Remove.
	* common/estream-printf.c, common/estream-printf.h: Remove.
	* common/estream.c, common/estream.h: Remove.
	* common/init.c (_init_common_subsystems): Call gpgrt initialization.

	gpg: Allow for positional parameters in the passphrase prompt.
	* g10/passphrase.c (passphrase_get): Replace sprintf by xasprintf.

2014-08-20  Werner Koch  <wk@gnupg.org>

	gpg: Fix "can't handle public key algorithm" warning.
	* g10/parse-packet.c (unknown_pubkey_warning): Check for encr/sign
	capabilities.

2014-08-19  Werner Koch  <wk@gnupg.org>

	speedo: Get version numbers from online database.
	* build-aux/getswdb.sh: New.
	* build-aux/speedo.mk: Get release version numbers from swdb.lst.

	build: Create VERSION file via autoconf.
	* Makefile.am (dist-hook): Remove creation of VERSION.
	(EXTRA_DIST): Add VERSION.
	* configure.ac: Let autoconf create VERSION.

2014-08-18  Werner Koch  <wk@gnupg.org>

	gpg: Install the current release signing pubkey.
	* g10/distsigkey.gpg: New.

	agent: Return NO_SECKEY instead of ENONET for PKSIGN and others.
	* agent/pksign.c (agent_pksign_do): Replace ENONET by NO_SECKEY.
	* agent/findkey.c (agent_key_from_file): No diagnostic for NO_SECKEY.
	* agent/pkdecrypt.c (agent_pkdecrypt): Replace checking for ENOENT.

	kbx: Make user id and signature data optional for OpenPGP.
	* kbx/keybox-blob.c (_keybox_create_openpgp_blob): Remove restriction.

	gpg: Change default cipher for --symmetric from CAST5 to AES-128.
	* g10/main.h (DEFAULT_CIPHER_ALGO): Chhange to AES or CAST5 or 3DES
	depending on configure option.
	* g10/gpg.c (main): Set opt.s2k_cipher_algo to DEFAULT_CIPHER_ALGO.

	yat2m: Support @set and @value.
	* doc/yat2m.c (variablelist): New.
	(set_variable): New.
	(macro_set_p): Also check the variables.
	(proc_texi_cmd): Support the @value command.
	(parse_file): Support the @set command.
	(top_parse_file): Release variablelist.

	yat2m: Support the $* command for man page rendering.

2014-08-17  Werner Koch  <wk@gnupg.org>

	estream: Change license from GPL to LPGL.
	* common/estream-printf.c, common/estream-printf.h: Change license.
	* common/estream.c, common/estream.h: Ditto.

2014-08-14  Werner Koch  <wk@gnupg.org>

	Release 2.1.0-beta783.

	po: Update the German (de) translation.

	sm: Create homedir and lock empty keybox creation.
	* sm/gpgsm.h (opt): Add field "no_homedir_creation".
	* sm/gpgsm.c (main): Set it if --no-options is used.
	* sm/keydb.c (try_make_homedir): New.  Similar to the one from
	g10/openfile.c.
	(maybe_create_keybox): New.  Similar to the one from g10/keydb.c.
	(keydb_add_resource): Replace some code by maybe_create_keybox.

	gpg: Screen keyserver responses.
	* g10/main.h (import_screener_t): New.
	* g10/import.c (import): Add screener callbacks to param list.
	(import_one): Ditto.
	(import_secret_one): Ditto.
	(import_keys_internal): Ditto.
	(import_keys_stream): Ditto.
	* g10/keyserver.c (struct ks_retrieval_screener_arg_s): New.
	(keyserver_retrieval_screener): New.
	(keyserver_get): Pass screener to import_keys_es_stream().

	scd: Minor changes to app-sc-hsm.
	* scd/app-sc-hsm.c: Re-indendet some parts and set some vars to NULL
	after xfree for improbed robustness.
	(read_ef_prkd): Replace serial operator by blocks for better
	readability.
	(apply_PKCS_padding): Rewrite for easier auditing.
	(strip_PKCS15_padding): Ditto.  Add stricter check on SRCLEN.

	gpg: Disable an MD5 workaround for pgp2 by default.
	* g10/sig-check.c (do_check): Move some code to ...
	* g10/misc.c (print_md5_rejected_note): new function.
	* g10/mainproc.c (proc_tree, proc_plaintext): Enable MD5 workaround
	only if option --allow-weak-digest-algos is used.

	gpg: Remove options --pgp2 and --rfc1991.
	* g10/gpg.c (oRFC1991, oPGP2): Remove
	(opts): Remove --pgp2 and --rfc1991.
	* g10/options.h (CO_PGP2, CO_RFC1991): Remove.  Remove all users.
	(RFC2440, PGP2): Remove.  Remove all code only enabled by these
	conditions.
	* tests/openpgp/clearsig.test: Remove --rfc1991 test.

	build: Fix autogen.sh base version hack.
	* autogen.sh <find-version>: Fix.

	gpg: Remove --compress-keys and --compress-sigs feature.
	* g10/gpg.c (oCompressKeys, oCompressSigs): Remove.
	(opts): Turn --compress-keys and --compress-signs in NOPs.
	* g10/options.h (opt): Remove fields compress_keys and compress_sigs.
	* g10/export.c (do_export): Remove compress_keys feature.
	* g10/sign.c (sign_file): Remove compress_sigs feature.

2014-08-13  Werner Koch  <wk@gnupg.org>

	gpg: Add list-option "show-usage".
	* g10/gpg.c (parse_list_options): Add "show-usage".
	* g10/options.h (LIST_SHOW_USAGE): New.
	* g10/keyid.c (usagestr_from_pk): Add arg FILL.  Change caller.
	* g10/keylist.c (list_keyblock_print): Print usage info.

2014-08-12  Werner Koch  <wk@gnupg.org>

	gpg: Make --with-colons work again for --search-keys.
	* g10/keyserver.c (search_line_handler): Replace log_debug by
	es_printf.

2014-08-08  NIIBE Yutaka  <gniibe@fsij.org>

	po: Update Japanese translation.

2014-07-25  Werner Koch  <wk@gnupg.org>

	scd: Minor and editorial changes to app-sc-hsm.c.
	* scd/app-sc-hsm.c (select_and_read_binary): Use SW_ macro.
	(parse_certid): Remove useless test.
	(send_certinfo, send_keypairinfo): Shrink malloc to the needed size.
	(do_getattr): Ditto.
	(verify_pin): Use SW_ macro.
	(do_decipher): Replace OFS variable and extend comment.

	scd: Add a new status word code.
	* scd/apdu.h (SW_REF_DATA_INV): New.
	* scd/apdu.c (apdu_strerror): Add string.

2014-07-25  Andreas Schwier  <andreas.schwier@cardcontact.de>

	scd: Support for SmartCard-HSM.
	* scd/app-sc-hsm.c: New.
	* scd/app.c (select_application, get_supported_applications): Register
	new app.

2014-07-25  Werner Koch  <wk@gnupg.org>

	gpg: Switch to an EdDSA format with prefix byte.
	* g10/keygen.c (gen_ecc): USe "comp" for EdDSA.

2014-07-23  Werner Koch  <wk@gnupg.org>

	agent: Show just one warning with all failed passphrase constraints.
	* agent/genkey.c (check_passphrase_constraints): Build a final warning
	after all checks.

	agent: Only one confirmation prompt for an empty passphrase.
	* agent/genkey.c (check_passphrase_constraints): Moev empty passphrase
	check to the front.

	gpg: Add command --quick-gen-key.
	* g10/gpg.c (aQuickKeygen): New.
	* g10/misc.c (is_valid_user_id): New stub.
	* g10/keygen.c (quickgen_set_para): New.
	(quick_generate_keypair): New.

	common: Add cpr_get_answer_is_yes_def()
	* g10/cpr.c (cpr_get_answer_is_yes): Factor code out to ....
	(cpr_get_answer_is_yes_def): ...new.

	gpg: Make --quick-sign-key promote local key signatures.
	* g10/keyedit.c (sign_uids): Promote local sigs in quick mode.

2014-07-22  Werner Koch  <wk@gnupg.org>

	scd: Do not use the pcsc-wrapper.
	* scd/apdu.c (NEED_PCSC_WRAPPER): Do not define.
	* scd/Makefile.am (libexec_PROGRAMS): Remove gnupg-pcsc-wrapper
	(gnupg_pcsc_wrapper_SOURCES): Remove.
	(gnupg_pcsc_wrapper_LDADD): Remove.
	(gnupg_pcsc_wrapper_CFLAGS): Remove.

2014-07-21  Werner Koch  <wk@gnupg.org>

	gpg: Improve --list-packets output for faulty packets.
	* g10/parse-packet.c: Add list_mode output for certain failures.

	gpg: Cap size of attribute packets at 16MB.
	* g10/parse-packet.c (parse_attribute): Avoid xmalloc failure and cap
	size of packet.

2014-07-03  Werner Koch  <wk@gnupg.org>

	Release 2.1.0-beta751.

	gpg: Make show-uid-validity the default.

	tests: Fix end-of-all-ticks test for Western locales.
	* common/t-timestuff.c (test_timegm): Use timegm if available.
	(main): Set TX to UTC if timegm is not available.

2014-07-03  Kristian Fiskerstrand  <kf@sumptuouscapital.com>

	gpg: Spelling error.

2014-06-30  Werner Koch  <wk@gnupg.org>

	gpg: Auto-create revocation certificates.
	* configure.ac (GNUPG_OPENPGP_REVOC_DIR): New config define.
	* g10/revoke.c (create_revocation): Add arg "leadin".
	(gen_standard_revoke): New.
	* g10/openfile.c (get_openpgp_revocdir): New.
	(open_outfile): Add MODE value 3.
	* g10/keyid.c (hexfingerprint): New.
	* g10/keygen.c (do_generate_keypair): Call gen_standard_revoke.

	estream: Fix minor glitch in "%.*s" format.
	* common/estream-printf.c (pr_string): Take care of non-nul terminated
	strings.

	gpg: Rearrange code in gen_revoke.
	* g10/revoke.c (gen_revoke): Factor some code out to ...
	(create_revocation): new.

	gpg: Create exported secret files and revocs with mode 700.
	* common/iobuf.c (direct_open): Add arg MODE700.
	(iobuf_create): Ditto.
	* g10/openfile.c (open_outfile): Add arg RESTRICTEDPERM.  Change call
	callers to pass 0 for it.
	* g10/revoke.c (gen_desig_revoke, gen_revoke): Here pass true for new
	arg.
	* g10/export.c (do_export): Pass true for new arg if SECRET is true.

	common: Minor code cleanup for a legacy OS.
	* common/iobuf.c (direct_open) [__riscos__]: Simply cpp conditionals.

2014-06-27  Werner Koch  <wk@gnupg.org>

	speedo: Fix the w32 installer name.

	po: Update some strings of the French (fr) translation.

	po: Update the German (de) translation.

	agent: Adjust for changed npth_eselect under W32.
	* agent/gpg-agent.c (handle_connections) [W32]: Make events_set an
	unsigned int to match the changed prototype.

	dirmngr: Use the homedir based socket also under W32.
	* common/homedir.c (dirmngr_user_socket_name): Use same code for all
	platforms.

2014-06-27  Yuri Chornoivan  <yurchor@ukr.net>

	po: Update and enable Ukrainian (uk) translation.

	Fix typos in messages.

2014-06-27  Werner Koch  <wk@gnupg.org>

	build: Remove unused options.
	* configure.ac: Remove option --build-agent-only.
	(FAKE_CURL, GPGKEYS_CURL): Remove check for cURL
	(GPGKEYS_MAILTO): Remove ac_subst but keep the currently unused
	SENDMAIL check.
	(GPGKEYS_KDNS): Remove ac_subst.
	* autogen.rc (final_info): Remove suggestion to use the removed option
	--enable-mailto.

2014-06-27  NIIBE Yutaka  <gniibe@fsij.org>

	scd: Add pinpad support for REINER SCT cyberJack go.
	* scd/ccid-driver.h (VENDOR_REINER, CYBERJACK_GO): New.
	* scd/ccid-driver.c (ccid_transceive_secure): Handle the case for
	VENDOR_REINER. Original work was by Alina Friedrichsen (tiny change).

2014-06-27  Werner Koch  <wk@gnupg.org>

	scd: Support reader Gemalto IDBridge CT30.
	* scd/ccid-driver.h (GEMPC_CT30): New product id.
	* scd/ccid-driver.c (parse_ccid_descriptor): Add quirk for that
	reader.

2014-06-26  Werner Koch  <wk@gnupg.org>

	gpg: Limit keysize for unattended key generation to useful values.
	* g10/keygen.c (gen_elg): Enforce keysize 1024 to 4096.
	(gen_rsa): Enforce keysize 1024 to 4096.
	(gen_dsa): Enforce keysize 768 to 3072.

	Enable DNS SRV records again.
	* configure.ac (GPGKEYS_HKP, GPGKEYS_FINGER): Remove ac_subst.
	(use_dns_srv): Make test work.

	agent: Fix export of RSA keys to OpenPGP.
	* agent/cvt-openpgp.c (convert_transfer_key): Fix sexp build format
	string.

	gpg,gpgsm: Simplify wrong_args function.

	speedo: "make clean-gnupg" may not remove the source.
	* build-aux/speedo.mk (clean-$(1)): Take care of gnupg.

	gpgsm: Fix default config name.

2014-06-25  Werner Koch  <wk@gnupg.org>

	doc: Improve the rendering of the manual.

	doc: Update for modern makeinfo.
	* doc/texi.css: Remove.
	* doc/Makefile.am (AM_MAKEINFOFLAGS): Use --css-ref.

	gpg: Allow key-to-card upload for cert-only keys.
	* g10/card-util.c (card_store_subkey): Allo CERT usage for key 0.

2014-06-24  Werner Koch  <wk@gnupg.org>

	doc: Add conditionals for GnuPG-1.

2014-06-20  Werner Koch  <wk@gnupg.org>

	gpg: Make export of ECC keys work again.
	* agent/cvt-openpgp.c (convert_to_openpgp): Use the curve name instead
	of the curve parameters.
	* g10/export.c (canon_pubkey_algo): Rename to ...
	(canon_pk_algo): this.  Support ECC.
	(transfer_format_to_openpgp): Expect curve name.

	gpg: Avoid infinite loop in uncompressing garbled packets.
	* g10/compress.c (do_uncompress): Limit the number of extra FF bytes.

2014-06-17  Kristian Fiskerstrand  <kf@sumptuouscapital.com>

	gpg: Fix a couple of spelling errors.

2014-06-17  Werner Koch  <wk@gnupg.org>

	speedo: Support building from dist-source generated tarball.

2014-06-13  Werner Koch  <wk@gnupg.org>

	http: Print human readable GNUTLS status.
	* common/http.c (send_gnutls_bye): Take care of EAGAIN et al.
	(http_verify_server_credentials): Print a human readable status.

2014-06-12  Werner Koch  <wk@gnupg.org>

	gpg: Improve the output of --list-packets.
	* g10/parse-packet.c (parse): Print packet meta info in list mode.

2014-06-11  Werner Koch  <wk@gnupg.org>

	speedo: Improve building of the w32 installer.
	* build-aux/speedo.mk: Change name of build directory to PLAY.
	Improve the dist-source target.
	* build-aux/speedo/w32/gdk-pixbuf-loaders.cache: Add a blank
	line (plus comment).
	* build-aux/speedo/w32/inst.nsi: Change name of file to gnupg-w32-*.
	Install more tools.

2014-06-10  Werner Koch  <wk@gnupg.org>

	speedo: Revamped speedo and include a w32 installer.
	* build-aux/speedo/: New.
	* build-aux/speedo/w32/: New.

	build: Add more options to autogen.sh.
	* autogen.sh: Add options --print-host and --print-build.

	w32: Fix build problem with dirmngr.
	* dirmngr/ks-engine-hkp.c (EAI_SYSTEM) [W32]: Add replacement
	constant.

	gpg: Use more specific reason codes for INV_RECP.
	* g10/pkclist.c (find_and_check_key, build_pk_list): Use more specific
	reasons codes for INV_RECP.

2014-06-06  Werner Koch  <wk@gnupg.org>

	Improve the beta number generation.
	* autogen.sh: Add option --find-version
	* configure.ac: Rework the setting of the mym4_ variables.

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

	Remove keyserver helper code.
	* configure.ac: Remove keyserver helper related stuff.
	* Makefile.am (SUBDIRS): Remove keyserver.
	* keyserver/Makefile.am: Remove.

	gpg: Require confirmation for --gen-key with experimental curves.
	* g10/keygen.c (ask_curve): Add arg both.  Require confirmation for
	Curve25519.

	gpg: Auto-migrate existing secring.gpg.
	* g10/migrate.c: New.
	* g10/import.c (import_old_secring): New.
	(import_one): Add arg silent.
	(transfer_secret_keys): Add arg batch.
	(import_secret_one): Add args batch and for_migration.
	* g10/gpg.c (main): Call migration function.

2014-06-04  Werner Koch  <wk@gnupg.org>

	gpgsm: Fix commit be07ed65.
	* sm/server.c (option_handler): Use "with-secret".

2014-06-03  Werner Koch  <wk@gnupg.org>

	Add new option --with-secret.
	* g10/gpg.c: Add option --with-secret.
	* g10/options.h (struct opt): Add field with_secret.
	* g10/keylist.c (public_key_list): Pass opt.with_secret to list_all
	and list_one.
	(list_all, list_one): Add arg mark_secret.
	(list_keyblock_colon): Add arg has_secret.
	* sm/gpgsm.c: Add option --with-secret.
	* sm/server.c (option_handler): Add option "with-secret".
	* sm/gpgsm.h (server_control_s): Add field with_secret.
	* sm/keylist.c (list_cert_colon): Take care of with_secret.  Also move
	the token string from the wrong field 14 to 15.

	gpgsm: New commands --export-secret-key-{p8,raw}
	* sm/gpgsm.c: Add new commands.
	* sm/minip12.c (build_key_sequence): Add arg mode.
	(p12_raw_build): New.
	* sm/export.c (export_p12): Add arg rawmode.  Call p12_raw_build.
	(gpgsm_p12_export): Ditto.
	(print_short_info): Print the keygrip.

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

	gpg: Avoid NULL-deref in default key listing.
	* g10/keyid.c (hash_public_key): Take care of NULL keys.
	* g10/misc.c (pubkey_nbits): Ditto.

	gpg: Simplify default key listing.
	* g10/mainproc.c (list_node): Rework.

	gpg: Graceful skip reading of corrupt MPIs.
	* g10/parse-packet.c (mpi_read): Change error message on overflow.

	gpgsm: Handle re-issued CA certificates in a better way.
	* sm/certchain.c (find_up_search_by_keyid): Consider all matching
	certificates.
	(find_up): Add some debug messages.

	gpgsm: Add a way to save a found state.
	* kbx/keybox-defs.h (keybox_found_s): New.
	(keybox_handle): Factor FOUND out to above.  Add saved_found.
	* kbx/keybox-init.c (keybox_release): Release saved_found.
	(keybox_push_found_state, keybox_pop_found_state): New.

	* sm/keydb.c (keydb_handle): Add field saved_found.
	(keydb_new): Init it.
	(keydb_push_found_state, keydb_pop_found_state): New.

	gpg: Fix bug parsing a zero length user id.
	* g10/getkey.c (get_user_id): Do not call xmalloc with 0.

	* common/xmalloc.c (xmalloc, xcalloc): Take extra precaution not to
	pass 0 to the arguments.

2014-05-19  Werner Koch  <wk@gnupg.org>

	dirmngr: Print certificates on failed TLS verification.
	* dirmngr/ks-engine-hkp.c (cert_log_cb): New.
	(send_request): Set callback.

	http: Add callback to help logging of server certificates.
	* common/http.c (http_session_s): Add field cert_log_cb.
	(http_session_set_log_cb): New.
	(http_verify_server_credentials): Call callback.

2014-05-16  Werner Koch  <wk@gnupg.org>

	keyserver: Improve support for hkps pools.
	* dirmngr/ks-engine-hkp.c (hostinfo_s): Add fields cname, v4addr, and
	v6addr.
	(create_new_hostinfo): Clear them.
	(my_getnameinfo): Add args numeric and r_isnumeric.
	(is_ip_address): New.
	(map_host): Add arg r_host.  Rewrite the code to handle pools in a
	special way.
	(ks_hkp_print_hosttable): Change format of help info output.
	(make_host_part): Add arg optional r_httphost.
	(send_request): Add arg httphost.
	(ks_hkp_search, ks_hkp_get, ks_hkp_put): Get httphost and pass it to
	send_request.

	http: Allow overriding of the Host header.
	* common/http.c (http_open): Add arg httphost.
	(http_open_document): Pass NULL for httphost.
	(send_request): Add arg httphost.  If given, use HTTPHOST instead of
	SERVER.  Use https with a proxy if requested.
	(http_verify_server_credentials): Do not stop at the first error
	message.
	* dirmngr/ocsp.c (do_ocsp_request): Adjust call to http_open.
	* keyserver/curl-shim.c (curl_easy_perform): Ditto.
	* dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
	* dirmngr/ks-engine-hkp.c (ks_hkp_help): Ditto.

2014-05-14  Werner Koch  <wk@gnupg.org>

	gpg: Fix uninitialized access to search descindex with gpg keyboxes.
	* kbx/keybox-search.c (keybox_search): Add arg  R_DESCINDEX.  Chnage
	both callers.
	* g10/keydb.c (keydb_search): Always set DESCINDEX.

	w32: Make make_absfilename work with drive letters.
	* common/stringhelp.c (do_make_filename) [HAVE_DRIVE_LETTERS]: Fix.

	gpg: Remove useless diagnostic in MDC verification.
	* g10/decrypt-data.c (decrypt_data): Do not distinguish between a bad
	MDC packer header and a bad MDC.

	gpg: Fix glitch entering a full expiration time.
	* g10/keygen.c (ask_expire_interval): Get the current time after the
	prompt.

2014-05-08  Werner Koch  <wk@gnupg.org>

	agent: Fix import of non-protected gpg keys.
	* agent/cvt-openpgp.c (do_unprotect): Return an s-exp also for
	non-protected keys.
	(convert_from_openpgp_main): Do not call agent_askpin for a
	non-protected key.

	Make more use of *_NAME macros.
	* configure.ac (GPG_DISP_NAME, GPGSM_DISP_NAME): New.
	(GPG_AGENT_DISP_NAME, SCDAEMON_DISP_NAME): New.
	(DIRMNGR_DISP_NAME, G13_DISP_NAME): New.
	(GPGCONF_DISP_NAME): New.
	(SCDAEMON_SOCK_NAME): New.
	* common/argparse.c (show_help): Map description string.

2014-05-08  NIIBE Yutaka  <gniibe@fsij.org>

	agent: Fix auth key comment handling.
	* agent/command-ssh.c (ssh_send_key_public): Handle the case with no
	comment.

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

	Make -jN work again.
	* common/Makefile.am ($(PROGRAMS)): New rule
	(t_http_LDADD): Use libcommontls.a without directory prefix.
	* dirmngr/Makefile.am ($(PROGRAMS)): New rule.

	gpg: Print the key algorithm/curve with signature info.
	* g10/mainproc.c (check_sig_and_print): Print the name and curve.

	gpg: Fix memleak in signature verification of bogus keys.
	* g10/mainproc.c (check_sig_and_print): Factor common code out to ...
	(print_good_bad_signature): here.

	gpg: Mark experimental algorithms in the key listing.
	* g10/keylist.c (list_keyblock_print): Remove duplicate curve name.
	Print a note for experimental algorithms.
	* g10/misc.c (print_pubkey_algo_note): Fix warning message.

	gpg: Finish experimental support for Ed25519.
	* agent/cvt-openpgp.c (try_do_unprotect_arg_s): Add field "curve".
	(get_keygrip): Add and use arg CURVE.
	(convert_secret_key): Ditto.
	(convert_transfer_key): Ditto.
	(get_npkey_nskey): New.
	(prepare_unprotect): Replace gcrypt functions by
	get_npkey_nskey.  Allow opaque MPIs.
	(do_unprotect): Use CURVE instead of parameters.
	(convert_from_openpgp_main): Ditto.
	(convert_to_openpgp):  Simplify.
	* g10/import.c (one_mpi_from_pkey): Remove.
	(transfer_secret_keys): Rewrite to use the curve instead of the
	parameters.
	* g10/parse-packet.c (parse_key): Mark protected MPIs with USER1 flag.

	* common/openpgp-oid.c (openpgp_curve_to_oid): Allow the use of
	 "NIST P-256" et al.
	* g10/keygen.c (ask_curve): Add arg ALGO.
	(generate_keypair): Rewrite the ECC key logic.

	* tests/openpgp/ecc.test: Provide the "ecc" passphrase.

	kbx: Add experimental support for EDDSA.
	* kbx/keybox-openpgp.c (parse_key): Use algo constants and add
	experimental support for EdDSA.

	agent: Remove greeting message.
	* agent/gpg-agent.c (main): Remove greeting.  Make --no-greeting a
	dummy.

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

	Use "samethread" mode keyword for some es_fopenmem.
	* dirmngr/ks-engine-hkp.c (armor_data): Add mode keyword.
	* g10/call-dirmngr.c (ks_put_inq_cb): Ditto.
	* scd/atr.c (atr_dump): Ditto.

2014-05-05  Werner Koch  <wk@gnupg.org>

	dirmngr: Add support for hkps keyservers.
	* dirmngr/dirmngr.c: Include gnutls.h.
	(opts): Add --gnutls-debug and --hkp-cacert.
	(opt_gnutls_debug, my_gnutls_log): New.
	(set_debug): Set gnutls log level.
	(parse_rereadable_options): Register a CA file.
	(main): Init GNUTLS.
	* dirmngr/ks-engine-hkp.c (ks_hkp_help): Support hkps.
	(send_request): Ditto.

	http: Add reference counting to the session object.
	* common/http.c (http_session_t): Add field "refcount".
	(_my_socket_new, _my_socket_ref, _my_socket_unref): Add debug code.
	(send_request, my_npth_read, my_npth_write): Use SOCK object for the
	transport ptr.
	(http_session_release): Factor all code out to ...
	(session_unref): here.  Deref SOCK.
	(http_session_new): Init refcount and transport ptr.
	(http_session_ref): New.  Ref and unref all assignments.

2014-05-02  Werner Koch  <wk@gnupg.org>

	http: Add HTTP_FLAG_FORCE_TLS and http_get_tls_info.
	* common/http.c (http_parse_uri): Factor code out to ...
	(parse_uri): here.  Add arg FORCE_TLS.
	(do_parse_uri): Ditto.  Implement flag.
	(http_get_tls_info): New.
	(http_register_tls_ca): Allow clearing of the list.
	(send_request): Use a default verification function.
	* common/http.h (HTTP_FLAG_FORCE_TLS): New.
	* common/t-http.c (main): Add several command line options.

	common: Fix test for openpgp_oid_is_ed25519.
	* common/t-openpgp-oid.c (test_openpgp_oid_is_ed25519): Add correct
	value.

	http: Revamp TLS API.
	* configure.ac (NEED_GNUTLS_VERSION): New.
	(HTTP_USE_GNUTLS, LIBGNUTLS_CFLAGS, LIBGNUTLS_LIBS): New ac_subst.

	* common/http.h (http_session_t): New.
	* common/http.c: Remove compatibility for gnutls < 3.0.
	(http_session_s): New.
	(cookie_s): Replace gnutls_session_t by http_session_t.
	(tls_callback, tls_ca_certlist): New variables.
	(my_socket_unref): Add preclose args.
	(my_npth_read, my_npth_write): New.
	(make_header_line): Fix bug using int* instead of char*.
	(http_register_tls_callback): New.
	(http_register_tls_ca): New.
	(http_session_new): New.
	(http_session_release): New.
	(http_get_header_names): New.
	(escape_data): Add hack to escape in forms mode.
	(send_request) [HTTP_USE_GNUTLS]: Support SNI.
	(send_request) [HTTP_USE_GNUTLS]: Fix use of make_header_line.
	(send_gnutls_bye): New.
	(cookie_close): Make use of preclose feature.
	(http_verify_server_credentials): New.
	(main) [TEST]: Remove test code.
	* common/t-http.c: New.
	* common/tls-ca.pem: New.
	* common/Makefile.am (tls_sources): New. Move http code to here.
	(libcommontls_a_SOURCES): New.
	(libcommontlsnpth_a_SOURCES): New.
	(EXTRA_DIST): Add tls-ca.pem
	(module_maint_tests): Add t-http.
	(t_http_SOURCES, t_http_CFLAGS, t_http_LDADD): New.

	* dirmngr/Makefile.am (dirmngr_LDADD): Add libcommontlsnpth.

	common: Cleanup the use of USE_NPTH and HAVE_NPTH macros.
	* configure.ac (HAVE_NPTH): New ac_define.
	* common/estream.c: Use USE_NPTH instead of HAVE_NPTH.
	* common/http.c: Ditto.  Replace remaining calls to pth by npth calls.
	(connect_server): Remove useless _().
	* common/exechelp-posix.c, common/exechelp-w32.c
	* common/exechelp-w32ce.c: Use HAVE_PTH to include npth.h.
	* common/init.c (_init_common_subsystems): Remove call to pth_init.
	* common/sysutils.c (gnupg_sleep): Use npth_sleep.
	* scd/ccid-driver.c (my_sleep): Ditto.

2014-04-30  Werner Koch  <wk@gnupg.org>

	estream: Implement "samethread" mode keyword.
	* src/estream.c (estream_internal): Add field SAMETHREAD.
	(init_stream_lock, lock_stream, trylock_stream, unlock_stream): Use it.
	(parse_mode): Add arg SAMETHREAD and parse that keyword.
	(es_initialize): Rename to ...
	(init_stream_obj): this.  Add arg SAMETHREAD.
	(es_create): Add arg SAMETHREAD.  Call init_stream_lock after
	init_stream_obj.
	(doreadline): Call es_create with samethread flag.
	(es_fopen, es_mopen, es_fopenmem, es_fopencookie, do_fdopen)
	(do_fpopen, do_w32open): Implement "samethread" keyword.
	(es_freopen): Take samthread flag from old stream.
	(es_tmpfile): Call es)_create w/o samethread.

	estream: Fix deadlock in es_fileno.
	* src/estream.c (es_fileno_unlocked): Call the unlocked functions.

	estream: Add debug code to the lock functions.
	* common/estream.c (dbg_lock_0, dbg_lock_1, dbg_lock_1): New.

	estream: Replace locking macros by functions.
	* common/estream.c: Replace most macros.

2014-04-28  NIIBE Yutaka  <gniibe@fsij.org>

	ECC Fixes.
	* agent/cvt-openpgp.c (get_keygrip, convert_secret_key)
	(convert_transfer_key): Follow newer (>= 1.6) libgcrypt API, which
	does not distinguish the detail.
	(do_unprotect, convert_from_openpgp_main): Don't call
	map_pk_openpgp_to_gcry, as it's the value of libgcrypt API already and
	not the value defined by OpenPGP.
	(convert_to_openpgp): It's "ecc".
	* agent/gpg-agent.c (map_pk_openpgp_to_gcry): Remove.
	* g10/call-agent.c (agent_pkdecrypt): Fix off-by-one error.
	* g10/pubkey-enc.c (get_it): Fix swapping the fields error.

2014-04-22  Werner Koch  <wk@gnupg.org>

	gpg: Pass --homedir to gpg-agent.
	* agent/gpg-agent.c (main): Make sure homedir is absolute.
	* common/asshelp.c (lock_spawning): Create lock file with an absolute
	name.
	(start_new_gpg_agent): Use an absolute name for the socket and pass
	option --homedir to the agent.
	(start_new_dirmngr): Use an absolute name for the --homedir.

	common: Add functions make_absfilename and make_absfilename_try.
	* common/stringhelp.c (do_make_filename): Add modes 2 and 3.
	(make_absfilename): New.
	(make_absfilename_try): New.

	common: Add function gnupg_getcwd.
	* tools/gpg-connect-agent.c (gnu_getcwd): Move to ...
	* common/sysutils.c (gnupg_getcwd): .. here.
	* tools/gpg-connect-agent.c (get_var_ext): Use gnupg_getcwd.

	gpg: Print a warning if GKR has hijacked gpg-agent.
	* g10/call-agent.c (check_hijacking): New.
	(start_agent): Call it.
	(membuf_data_cb, default_inq_cb): Move more to the top.

2014-04-17  Werner Koch  <wk@gnupg.org>

	gpg: New %U expando for the photo viewer.
	* g10/photoid.c (show_photos): Set namehash.
	* g10/misc.c (pct_expando): Add "%U" expando.

	common: Add z-base-32 encoder.
	* common/zb32.c: New.
	* common/t-zb32.c: New.
	* common/Makefile.am (common_sources): Add zb82.c
	(module_tests): Add t-zb32.

2014-04-16  Werner Koch  <wk@gnupg.org>

	Two minor code cleanups and one NULL deref on error fix.
	* common/estream.c (es_freopen): Remove useless check for STREAM.
	* kbx/keybox-blob.c (_keybox_create_x509_blob): Remove useless check
	for BLOB.
	* tools/sockprox.c (run_proxy): Do not fclose(NULL).

2014-04-15  Werner Koch  <wk@gnupg.org>

	gpg: Re-enable secret key deletion.
	* g10/call-agent.c (agent_delete_key): New.
	* g10/keydb.h (FORMAT_KEYDESC_DELKEY): New.
	* g10/passphrase.c (gpg_format_keydesc): Support new format.
	* g10/delkey.c (do_delete_key): Add secret key deletion.

	gpg: Re-indent a file.
	* g10/delkey.c: Re-indent.
	(do_delete_key, delete_keys): Change return type top gpg_error_t.

	gpg: Fix regression in secret key export.
	* agent/cvt-openpgp.c (convert_to_openpgp): Fix use
	gcry_sexp_extract_param.
	* g10/export.c (do_export_stream): Provide a proper prompt to the
	agent.

	gpg: Change pinentry prompt to talk about "secret key".
	* g10/passphrase.c (gpg_format_keydesc): Add mode 2.  Change strings.
	* g10/keydb.h (FORMAT_KEYDESC_NORMAL, FORMAT_KEYDESC_IMPORT)
	(FORMAT_KEYDESC_EXPORT): New.  Use them for clarity.

	agent: Add command DELETE_KEY.
	* agent/command.c (cmd_delete_key): New.
	* agent/findkey.c (modify_description): Add '%C' feature.
	(remove_key_file): New.
	(agent_delete_key): New.
	* agent/command-ssh.c (search_control_file): Make arg R_DISABLE
	optional.

	* configure.ac: Require libgpg-error 1.13.

2014-04-09  NIIBE Yutaka  <gniibe@fsij.org>

	scd: EdDSA support.
	* scd/app-openpgp.c (KEY_TYPE_EDDSA, CURVE_ED25519): New.
	(struct app_local_s): Add eddsa.
	(get_algo_byte, store_fpr): Support KEY_TYPE_EDDSA.
	(get_ecc_key_parameters, get_curve_name): Support CURVE_ED25519.
	(send_key_attr, get_public_key): Support KEY_TYPE_EDDSA.
	(build_ecc_privkey_template): Rename as it supports both of
	ECDSA and EdDSA.
	(ecc_writekey): Rename.  Support CURVE_ED25519, too.
	(do_writekey): Follow the change of ecc_writekey.
	(do_auth): Support KEY_TYPE_EDDSA.
	(parse_ecc_curve): Support CURVE_ED25519.  Bug fix for other curves.
	(parse_algorithm_attribute): Bug fix for ECDH.  Support EdDSA.

2014-04-08  Werner Koch  <wk@gnupg.org>

	dirmngr: Fix compiler warning.
	* common/mischelp.h (JNLIB_GCC_HAVE_PUSH_PRAGMA): New.
	* dirmngr/dirmngr.c (handle_tick): Factor time check out to ...
	(time_for_housekeeping_p): new.

	gpgconf: Add command --launch.
	* tools/gpgconf.c: Add command --launch.
	* tools/gpgconf-comp.c (gc_component_launch): New.

	scd: Silent compiler warnings about unused variables.
	* scd/app-openpgp.c (build_ecdsa_privkey_template): Mark unused arg.
	(ecdh_writekey): Mark unused args.

2014-04-08  NIIBE Yutaka  <gniibe@fsij.org>

	agent: Support EdDSA.
	* agent/pksign.c (agent_pksign_do): Handle EdDSA signature.

	g10: EdDSA support.
	* g10/keyid.c (keygrip_from_pk): Compute keygrip of EdDSA key.
	* g10/keygen.c (generate_subkeypair): Ed25519 is for EdDSA.
	* common/openpgp-oid.c (oid_ed25519): Update.

2014-04-04  NIIBE Yutaka  <gniibe@fsij.org>

	agent: EdDSA support for SSH.
	* agent/command-ssh.c (ssh_signature_encoder_eddsa): Signature is
	two 32-byte opaque data which should not be interpreted as number.

2014-03-27  Werner Koch  <wk@gnupg.org>

	gpg: Add commands --quick-sign-key and --quick-lsign-key.
	* g10/gpg.c (main): Add commands --quick-sign-key and
	--quick-lsign-key.
	* g10/keyedit.c (sign_uids): Add args FP and QUICK.
	(keyedit_quick_sign): New.
	(show_key_with_all_names): Add arg NOWARN.

	Change some keyedit functions to allow printing to arbitrary streams.
	* common/ttyio.c (tty_print_string): Add optional arg FP. Change all
	callers.
	(tty_print_utf8_string2): Ditto.
	* g10/keyedit.c (show_prefs):  Ditto.
	(show_key_with_all_names_colon): Ditto.
	(show_names): Ditto.
	* g10/keylist.c (print_revokers): Ditto.
	(print_fingerprint): Ditto.

2014-03-23  Werner Koch  <wk@gnupg.org>

	agent: Replace es_mopen by es_fopenmem for ssh.
	* agent/command-ssh.c (ssh_read_key_public_from_blob): Use
	es_fopenmem.
	(ssh_handler_request_identities): Ditto.
	(ssh_request_process): Ditto.

2014-03-22  Werner Koch  <wk@gnupg.org>

	agent: Put ssh key type as comment into sshcontrol.
	* agent/command-ssh.c (ssh_key_type_spec): Add field name.
	(ssh_key_types): Add human readable names.
	(add_control_entry): Add arg SPEC and print key type as comment.
	(ssh_identity_register): Add arg SPEC.
	(ssh_handler_add_identity): Add var SPEC and pass ssh_receive_key.

	agent: Support the Ed25519 signature algorithm for ssh.
	* agent/command-ssh.c (SPEC_FLAG_IS_EdDSA): New.
	(ssh_key_types): Add entry for ssh-ed25519.
	(ssh_identifier_from_curve_name): Move to the top.
	(stream_read_skip): New.
	(stream_read_blob): New.
	(ssh_signature_encoder_rsa): Replace MPIS array by an s-exp and move
	the s-exp parsing to here.
	(ssh_signature_encoder_dsa): Ditto.
	(ssh_signature_encoder_ecdsa): Ditto.
	(ssh_signature_encoder_eddsa): New.
	(sexp_key_construct): Rewrite.
	(ssh_key_extract): Rename to ...
	(ssh_key_to_blob): .. this and rewrite most of it.
	(ssh_receive_key): Add case for EdDSA.
	(ssh_convert_key_to_blob, key_secret_to_public): Remove.
	(ssh_send_key_public): Rewrite.
	(ssh_handler_request_identities): Simplify.
	(data_sign): Add rename args.  Add new args HASH and HASHLEN.  Make
	use of es_fopenmen and es_fclose_snatch.  Remove parsing into MPIs
	which is now doe in the sgnature encoder functions.
	(ssh_handler_sign_request): Take care of Ed25519.
	(ssh_key_extract_comment): Rewrite using gcry_sexp_nth_string.

	agent: Cleanups to prepare implementation of Ed25519.
	* agent/cvt-openpgp.c: Remove.
	(convert_to_openpgp): Use gcry_sexp_extract_param.
	* agent/findkey.c (is_eddsa): New.
	(agent_is_dsa_key, agent_is_eddsa_key): Check whether ecc means EdDSA.
	* agent/pksign.c (agent_pksign_do): Add args OVERRIDEDATA and
	OVERRIDEDATALEN.

	* common/ssh-utils.c (is_eddsa): New.
	(get_fingerprint): Take care or EdDSA.

2014-03-18  Werner Koch  <wk@gnupg.org>

	tools: Fix NULL deref in gpg-connect-agent.
	* tools/gpg-connect-agent.c (handle_inquire): Do not pass NULL to
	strlen.

	dirmngr: Resurrect hosts in the HKP hosttable.
	* dirmngr/dirmngr.c (HOUSEKEEPING_INTERVAL): New.
	(housekeeping_thread): New.
	(handle_tick): Call new function.
	* dirmngr/ks-engine-hkp.c (RESURRECT_INTERVAL): New.
	(struct hostinfo_s): Add field died_at and set it along with the dead
	flag.
	(ks_hkp_print_hosttable): Print that info.
	(ks_hkp_housekeeping): New.

	common: New function elapsed_time_string.
	* common/gettime.c (elapsed_time_string): New.

2014-03-17  Werner Koch  <wk@gnupg.org>

	gpg: Reject signatures made with MD5.
	* g10/gpg.c: Add option --allow-weak-digest-algos.
	(main): Set option also in PGP2 mode.
	* g10/options.h (struct opt): Add flags.allow_weak_digest_algos.
	* g10/sig-check.c (do_check): Reject MD5 signatures.
	* tests/openpgp/defs.inc: Add allow_weak_digest_algos to gpg.conf.

	gpg: Make --auto-key-locate work again with keyservers.
	* dirmngr/ks-engine-hkp.c (ks_hkp_get): Allow exact search mode.
	* g10/keyserver.c (keyserver_import_name): Implement.
	(keyserver_get): Use exact mode for name based import.
	(keyserver_get): Add args R_FPR and R_FPRLEN.  Change all callers.

	gpg: New mechanism "clear" for --auto-key-locate.
	* g10/getkey.c (parse_auto_key_locate): Implement "clear".

2014-03-14  Werner Koch  <wk@gnupg.org>

	gpg-connect-agent: Make it easier to connect to the dirmngr.
	* tools/gpg-connect-agent.c: Add options --dirmngr and
	--dirmngr-program.

	dirmngr: Make use of IPv4 and IPV6 more explicit.
	* common/http.c (connect_server): Handle the new flags.
	* common/http.h (HTTP_FLAG_IGNORE_IPv4, HTTP_FLAG_IGNORE_IPv4): New.
	* dirmngr/ks-engine-hkp.c (map_host): Add arg r_httpflags.
	(make_host_part): Ditto.
	(send_request): Add arg httpflags.
	(ks_hkp_search, ks_hkp_get, ks_hkp_put): Handle httpflags.

	dirmngr: Do not use brackets around legacy IP addresses.
	* dirmngr/ks-engine-hkp.c (my_getnameinfo): Change args to take a
	complete addrinfo.  Bracket only v6 addresses.  Change caller.

	gpg: Print the actual used keyserver address.
	* dirmngr/ks-engine-hkp.c (ks_hkp_search, ks_hkp_get): Print SOURCE
	status lines.
	* g10/call-dirmngr.c (ks_status_parm_s): New.
	(ks_search_parm_s): Add field stparm.
	(ks_status_cb): New.
	(ks_search_data_cb): Send source to the data callback.
	(gpg_dirmngr_ks_search): Change callback prototope to include the
	SPECIAL arg.  Adjust all users.  Use ks_status_cb.
	(gpg_dirmngr_ks_get): Add arg r_source and use ks_status_cb.
	* g10/keyserver.c (search_line_handler): Adjust callback and print
	"data source" disgnostic.
	(keyserver_get): Print data source diagnostic.

	dirmngr: Default to a user socket name and enable autostart.
	* common/homedir.c (dirmngr_socket_name): Rename to
	dirmngr_sys_socket_name.
	(dirmngr_user_socket_name): New.
	* common/asshelp.c (start_new_dirmngr): Handle sys and user dirmngr
	socket.
	* dirmngr/dirmngr.c (main): Ditto.
	* dirmngr/server.c (cmd_getinfo): Ditto.
	* sm/server.c (gpgsm_server): Ditto.
	* dirmngr/dirmngr-client.c (start_dirmngr): Likewise.
	* tools/gpgconf.c (main): Print "dirmngr-sys-socket" with --list-dirs.

	* configure.ac (USE_DIRMNGR_AUTO_START): Set by default.

2014-03-12  Werner Koch  <wk@gnupg.org>

	gpg: Add option --dirmngr-program.
	* g10/gpg.c: Add option --dirmngr-program.
	* g10/options.h (struct opt): Add field dirmngr_program.
	* g10/call-dirmngr.c (create_context): Use new var.

	* dirmngr/dirmngr.c: Include gc-opt-flags.h.
	(main): Remove GC_OPT_FLAG_*.
	* tools/gpgconf-comp.c (GC_OPT_FLAG_NO_CHANGE): Move macro to ...
	* common/gc-opt-flags.h: here.

	dirmngr: Detect dead keyservers and try another one.
	* dirmngr/ks-action.c (ks_action_resolve): Rename var for clarity.
	(ks_action_search, ks_action_put): Ditto.
	(ks_action_get): Consult only the first server which retruned some
	data.

	* dirmngr/ks-engine-hkp.c (SEND_REQUEST_RETRIES): New.
	(map_host): Add arg CTRL and call dirmngr_tick.
	(make_host_part): Add arg CTRL.
	(mark_host_dead): Allow the use of an URL.
	(handle_send_request_error): New.
	(ks_hkp_search, ks_hkp_get, ks_hkp_put): Mark host dead and retry on
	error.

	http: Add a flag to the URL parser indicating a literal v6 address.
	* common/http.h (struct parsed_uri_t): Add field v6lit.
	* common/http.c (do_parse_uri): Set v6lit.

2014-03-12  NIIBE Yutaka  <gniibe@fsij.org>

	scd: writekey support of ECC.
	* scd/app-openpgp.c (CURVE_SEC_P256K1, get_algo_byte): New.
	(store_fpr): Support ECC keys with varargs.
	(get_ecc_key_parameters, get_curve_name): Support secp256k1.
	(parse_ecc_curve): Likewise.
	(build_ecdsa_privkey_template, rsa_writekey, ecdsa_writekey): New.
	(ecdh_writekey): New.  Not implemented yet.
	(do_writekey): Call rsa_writekey, ecdsa_writekey, or ecdh_writekey.
	(do_genkey): Follow the change of store_fpr.

2014-03-11  Werner Koch  <wk@gnupg.org>

	dirmngr: Put brackets around IP addresses in the hosttable.
	* dirmngr/ks-engine-hkp.c (EAI_OVERFLOW): Provide a substitute.
	(my_getnameinfo): New.
	(map_host): Use it.

	dirmngr: Add command option to mark hosts as dead or alive.
	* dirmngr/server.c (cmd_killdirmngr): Factor some code out to ...
	(check_owner_permission): here.
	(cmd_keyserver): Add options --dead and --alive.
	* dirmngr/ks-engine-hkp.c (host_in_pool_p): New.
	(ks_hkp_mark_host): New.

	dirmngr: Make Assuan output of keyblocks easier readable.
	* dirmngr/server.c (data_line_cookie_write): Print shorter data lines
	in verbose mode.

	dirmngr: Fix HKP host selection code.
	* dirmngr/server.c (cmd_keyserver): Add option --resolve and change
	--print-hosttable to --hosttable.
	* dirmngr/ks-action.c (ks_printf_help): New.
	(ks_action_resolve): New.
	* dirmngr/ks-engine-hkp.c (select_random_host): Fix selection.
	(ks_hkp_print_hosttable): Print to assuan stream.
	(map_host): Remove debug code.  Add arg FORCE_SELECT.  Return numeric
	IP addr if it can't be resolved.
	(make_host_part): Add arg FORCE_SELECT; change callers to pass false.
	(ks_hkp_resolve): New.

	List readline support in configure summary.
	* m4/readline.m4: Set gnupg_cv_have_readline.
	* configure.ac: Add readline support to summary output.

2014-03-11  NIIBE Yutaka  <gniibe@fsij.org>

	agent: API change of agent_key_from_file.
	* agent/findkey.c (agent_key_from_file): Always return S-expression.
	* agent/command.c (cmd_passwd): Distinguish by SHADOW_INFO.
	(cmd_export_key): Likewise.  Free SHADOW_INFO.
	(cmd_keytocard): Likewise.  Release S_SKEY.
	* agent/pkdecrypt.c (agent_pkdecrypt): Likewise.
	* agent/pksign.c (agent_pksign_do): Likewise.  Use the S-expression to
	know the key type.

2014-03-10  Werner Koch  <wk@gnupg.org>

	Backport useful code from fixes for bug 1447.
	* configure.ac: Cehck for inet_ntop.
	* m4/libcurl.m4: Provide a #define for the version of the curl
	library.

	scd: acquire lock in new_reader_slot.
	* scd/apdu.c (new_reader_slot): Acquire lock.
	(open_ct_reader, open_pcsc_reader_direct, open_pcsc_reader_wrapped)
	(open_ccid_reader, open_rapdu_reader): Release lock.
	(lock_slot, trylock_slot, unlock_slot): Move more to the top.

	Do not require libiconv for Android.
	* configure.ac (require_iconv): New.  Set to false for android.
	(AM_ICONV): Run only if required.

2014-03-07  Werner Koch  <wk@gnupg.org>

	dirmmgr: Use a portability wrapper for struct timeval.
	* dirmngr/dirmngr_ldap.c [W32]: Include winber.h.
	(my_ldap_timeval_t): New.

	Silence more warnings about unused vars and args.
	* dirmngr/cdblib.c (cdb_init) [W32]: Remove unused var.
	* dirmngr/dirmngr-client.c (start_dirmngr): s/int/assuan_fd_t/.
	* dirmngr/dirmngr.c (w32_service_control): Mark unused args.
	(call_real_main): New.
	(main) [W32]: Use new function to match prototype.
	(real_main) [W32]: Mark unused vars.
	(handle_signal) [W32]: Do not build the function at all.
	(handle_connections) [W32]: Do not define signo.
	* dirmngr/ldap-wrapper-ce.c (outstream_reader_cb): Remove used vars.
	* g10/tdbio.c (ftruncate) [DOSISH]: Define only if not yet defined.

	dirmngr: Simplify strtok macro.
	* dirmngr/ldap-url.c (ldap_utf8_strtok): Remove unused r3d arg.
	(ldap_str2charray): Remove lasts.

	Use attribute __gnu_printf__ also in estream header files.
	* common/estream-printf.h: Use attribute gnu_printf.
	* common/estream.h: Ditto.

	Use attribute __gnu_printf__ with our estream-printf functions.
	* common/mischelp.h (JNLIB_GCC_A_PRINTF): Use __gnu_printf__
	(JNLIB_GCC_A_NR_PRINTF): Ditto.

	w32: Silence warnings about unused vars.
	* agent/gpg-agent.c (main) [W32]: Mark unused vars.
	* sm/gpgsm.c (run_protect_tool) [W32]: Ditto.
	* g10/trustdb.c (check_regexp) [DISABLE_REGEX]: Ditto.
	* scd/scdaemon.c (main) [W32]: Ditto.
	(handle_connections) [W32]: Ditto.
	(handle_signal) [W32]: Do not build the function at all.
	* scd/apdu.c (pcsc_send_apdu_direct): Ditto.
	(connect_pcsc_card): s/long/pcsc_dword_t/.
	(open_pcsc_reader_direct): Remove var listlen.

	w32: Fix a potential problem in gpgconf's gettext.
	* tools/gpgconf-comp.c (my_dgettext) [USE_SIMPLE_GETTEXT]: Make sure
	to return something even DOMAIN is not given.

	Silence several warnings when building under Windows.
	* agent/call-scd.c (start_scd): Replace int by assuan_fd_t.
	(start_pinentry): Ditto.
	* common/asshelp.c (start_new_gpg_agent): Replace int by assuan_fd_t.
	* common/dotlock.c (GNUPG_MAJOR_VERSION): Include stringhelp.h for
	prototypes on Windows and some other platforms.
	* common/logging.c (fun_writer): Declare addrbuf only if needed.
	* g10/decrypt.c (decrypt_message_fd) [W32]: Return not_implemented.
	* g10/encrypt.c (encrypt_crypt) [W32]: Return error if used in server
	mode.
	* g10/dearmor.c (dearmor_file, enarmor_file): Replace GNUPG_INVALID_FD
	by -1 as temporary hack for Windows.
	* g10/export.c (do_export): Ditto.
	* g10/revoke.c (gen_desig_revoke, gen_revoke): Ditto.
	* g10/sign.c (sign_file, clearsign_file, sign_symencrypt_file): Ditto.
	* g10/server.c (cmd_verify, gpg_server) [W32]: Return an error.

	w32: Include winsock2.h to silence warnings.

	gl: Avoid warning about shadowing an arg.
	* gl/setenv.c (KNOWN_VALUE): s/value/_v/.

	common: Fix build problem with Sun Studio compiler.
	* common/estream.c (ESTREAM_MUTEX_UNLOCK): Use int dummy dummy
	functions.
	(ESTREAM_MUTEX_INITIALIZE): Ditto.

	gpg: Do not require a trustdb with --always-trust.
	* g10/tdbio.c (tdbio_set_dbname): Add arg R_NOFILE.
	* g10/trustdb.c (trustdb_args): Add field no_trustdb.
	(init_trustdb): Set that field.
	(revalidation_mark):  Take care of a nonexistent trustdb file.
	(read_trust_options): Ditto.
	(tdb_get_ownertrust): Ditto.
	(tdb_get_min_ownertrust): Ditto.
	(tdb_update_ownertrust): Ditto.
	(update_min_ownertrust): Ditto.
	(tdb_clear_ownertrusts): Ditto.
	(tdb_cache_disabled_value): Ditto.
	(tdb_check_trustdb_stale): Ditto.
	(tdb_get_validity_core): Ditto.
	* g10/gpg.c (main): Do not create a trustdb with most commands for
	trust-model always.

	gpg: Print a "not found" message for an unknown key in --key-edit.
	* g10/keyedit.c (keyedit_menu): Print message.

	gpg: Protect against rogue keyservers sending secret keys.
	* g10/options.h (IMPORT_NO_SECKEY): New.
	* g10/keyserver.c (keyserver_spawn, keyserver_import_cert): Set new
	flag.
	* g10/import.c (import_secret_one): Deny import if flag is set.

	agent: Fix UPDATESTARTUPTTY for ssh.
	* agent/command-ssh.c (setup_ssh_env): Fix env setting.

	gpgv: Init Libgcrypt to avoid syslog warning.
	* g10/gpgv.c (main): Check libgcrypt version and disable secure
	memory.

	Improve libcurl detection.
	* m4/libcurl.m4: Do not use AC_PATH_PROG if --with-libcurl as been
	given.  Suggested by John Marshall.

	gpg: Remove legacy keyserver examples from the template conf file.
	* g10/options.skel: Update.

	(cherry picked from commit f3c5cc8bcd37e38b5d65db6a50466e22d03d1f0c)

	w32: Define WINVER only if needed.
	* common/sysutils.c (WINVER): Define only if less that 5.0.

	w32: Remove unused code.
	* jnlib/w32-reg.c (write_w32_registry_string): Remove.

	agent: Make --allow-mark-trusted the default.
	* agent/gpg-agent.c (opts, main): Add option --no-allow-mark-trusted.
	Put this option into the gpgconf-list.
	(main): Enable opt.allow_mark_trusted by default.
	* tools/gpgconf-comp.c (gc_options_gpg_agent): Replace
	allow-mark-trusted by no-allow-mark-trusted.

	* agent/trustlist.c (agent_marktrusted): Always set the "relax" flag.

	ssh: Add support for Putty.
	* agent/gpg-agent.c [W32]: Include Several Windows header.
	(opts): Change help text for enable-ssh-support.
	(opts, main): Add option --enable-putty-support
	(putty_support, PUTTY_IPC_MAGIC, PUTTY_IPC_MAXLEN): New for W32.
	(agent_init_default_ctrl): Add and asssert call.
	(putty_message_proc, putty_message_thread): New.
	(handle_connections) [W32]: Start putty message thread.
	* common/sysutils.c (w32_get_user_sid): New for W32 only
	* tools/gpgconf-comp.c (gc_options_gpg_agent): Add
	--enable-ssh-support and --enable-putty-support.  Make the
	configuration group visible at basic level.
	* agent/command-ssh.c (serve_mmapped_ssh_request): New for W32 only.

	agent: Fix binary vs. text mode problem in ssh.
	* agent/command-ssh.c (file_to_buffer)
	(ssh_handler_request_identities): Open streams in binary mode.
	(start_command_handler_ssh): Factor some code out to ..
	(setup_ssh_env): new function.

	Fix syntax error for building on APPLE.
	* scd/pcsc-wrapper.c [__APPLE__]: Fix syntax error.

	Ignore obsolete option --disable-keypad.
	* scd/scdaemon.c (opts): Ignore --disable-keypad.

	Allow marking options as ignored.
	* jnlib/argparse.h (ARGPARSE_OPT_IGNORE): New.
	(ARGPARSE_TYPE_MASK): New, for internal use.
	(ARGPARSE_ignore): New.
	* jnlib/argparse.c (optfile_parse, arg_parse): Replace remaining
	constants by macros.
	(optfile_parse): Implement ARGPARSE_OPT_IGNORE.
	(arg_parse): Exclide ignore options from --dump-options.

2014-03-06  Werner Koch  <wk@gnupg.org>

	common: Fix recent commit 55656208.
	* common/membuf.c (get_membuf_shrink): Fix use of LEN.

2014-03-06  NIIBE Yutaka  <gniibe@fsij.org>

	Fix g10/trust.c.
	* g10/trust.c (register_trusted_keyid, register_trusted_key)
	(update_ownertrust): Call functions with tdb_.

2014-02-26  Werner Koch  <wk@gnupg.org>

	common: Replace all macros in strusage() returned strings.
	* common/argparse.c (writechar): Remove.
	(writestrings): Simplify.
	(strusage): Use map_static_macro_string.

	common: New function map_static_macro_string.
	* common/mapstrings.c: New.
	* common/t-mapstrings.c: New.
	* common/t-support.h (DIM, DIMof): Define if not defined.
	* common/Makefile.am: Add new files.

	common: New function get_membuf_shrink.
	* common/membuf.c (get_membuf_shrink): New.

	agent: Fixed unresolved symbol under Windows.
	* agent/gpg-agent.c (main): s/ttyname/gnupg_ttyname/.

	common: Require an installed libiconv.
	* common/utf8conv.c: Remove dynload.h.
	(load_libiconv): Remove.  Remove all calls to it.

2014-02-10  Werner Koch  <wk@gnupg.org>

	gpg: Silent more compiler warnings due to some configure options.
	* g10/keygen.c (generate_keypair, gen_card_key)
	(gen_card_key_with_backup) [!ENABLE_CARD_SUPPORT]: Mark unused args.

	tests: Avoid segv if dns cert lookup is not configured.
	* common/dns-cert.c (get_dns_cert) [!USE_DNS_CERT]: Reset return args.

	gpg: Cleanup compiler warnings due to some configure options.
	* g10/photoid.c (show_photos) [DISABLE_PHOTO_VIEWER]: Mark args as
	unused.
	* tools/gpgconf-comp.c (my_dgettext): Mark DOMAIN as unused if NLS is
	not configured.

	gpg: Allow building without any trust model support.
	* configure.ac: Add option --disable-trust-models
	(NO_TRUST_MODELS): New ac_define and am_conditional.
	* g10/Makefile.am (trust_source): New.
	(gpg2_SOURCES): Factor some files out to above.  Add trust.c.
	* g10/gpg.c [NO_TRUST_MODELS]: Disable options --export-ownertrust,
	--import-ownertrust, --update-trustdb, --check-trustdb, --fix-trustdb,
	--list-trustdb, --trustdb-name, --auto-check-trustdb,
	--no-auto-check-trustdb, and --force-ownertrust.
	(parse_trust_model) [NO_TRUST_MODELS]: Do not build.
	(main) [NO_TRUST_MODELS]: Set trust_model to always and exclude all
	trustdb related option code.
	* g10/keyedit.c (cmds) [NO_TRUST_MODELS]: Remove menu items "trust",
	"enable", and "disable".
	* g10/keylist.c (public_key_list) [NO_TRUST_MODELS]: Do not print
	"tru" record.

	* g10/trust.c: New.
	* g10/trustdb.c (struct key_item): Move to trustdb.h.
	(register_trusted_keyid): Rename to tdb_register_trusted_keyid.
	(register_trusted_key): Rename to tdb_register_trusted_key.
	(trust_letter, uid_trust_string_fixed, trust_value_to_string)
	(string_to_trust_value, get_ownertrust_with_min, get_ownertrust_info)
	(get_ownertrust_string, get_validity_info, get_validity_string)
	(clean_sigs_from_uid, clean_uid_from_key, clean_key): Move to trust.c.
	(mark_usable_uid_certs): Move to trust.c and make global.
	(is_in_klist): Move as inline to trustdb.h.
	(trustdb_check_or_update): Rename to tdb_check_or_update
	(revalidation_mark): Rename to tdb_revalidation_mark.
	(get_ownertrust): Rename to tdb_get_ownertrust.
	(get_min_ownertrust): Rename to tdb_get_min_ownertrust.
	(update_ownertrust): Rename to tdb_update_ownertrust.
	(clear_ownertrusts): Rename to tdb_clear_ownertrusts.
	(cache_disabled_value): Rename to tdb_cache_disabled_value.
	(check_trustdb_stale): Rename to tdb_check_trustdb_stale.
	(get_validity): Rename to tdb_get_validity_core, add arg MAIN_PK and
	factor some code out to ...
	* trust.c (get_validity): ...new.
	(check_or_update_trustdb): New wrapper.
	(revalidation_mark): New wrapper.
	(get_ownertrust): New wrapper.
	(get_ownertrust_with_min): New wrapper.
	(update_ownertrust): New wrapper.
	(clear_ownertrusts): New wrapper.
	(cache_disabled_value): New wrapper.
	(check_trustdb_stale): New wrapper.

	* tests/openpgp/defs.inc (opt_always): New.  Use in all tests instead
	of --always-trust.

	tests: Handle disabled algorithms.
	* tests/openpgp/mds.test: Skip disabled algorithms.
	* tests/openpgp/signencrypt-dsa.test: Ditto.
	* tests/openpgp/sigs-dsa.test: Ditto.

2014-02-07  Werner Koch  <wk@gnupg.org>

	Silence annoying ABI change warning.
	* configure.ac [GCC]: Pass -Wno-psabi for gcc >= 4.6.  Avoid some gcc
	option tests for gcc >= 4.6

	Allow disabling of card support.
	* configure.ac: Add option --disable-card-support.  Also add
	am_conditional and do not build scd if card support is enabled.

	gpg: List only available algos in --gen-key.
	* g10/keygen.c (ask_algo, ask_curve): Take care of GPG_USE_<algo>.

	gpg: Change --print-mds to output enabled OpenPGP algos.
	* g10/gpg.c (print_mds): Use opengpg_md_test_algo.  Test also for MD5
	availibility.

	gpg: Avoid compiler warnings for disabled algos.
	* g10/misc.c (map_cipher_openpgp_to_gcry): Add case for disabled algo.
	(openpgp_pk_test_algo2): Ditto.
	(map_md_openpgp_to_gcry): Ditto.

2014-02-05  Werner Koch  <wk@gnupg.org>

	gpg: Change format for the key size in --list-key and --edit-key.
	* g10/gpg.c (oLegacyListMode, opts, main): Add --legacy-list-mode.
	* g10/options.h (struct opt): Add field legacy_list_mode.
	* g10/keydb.h (PUBKEY_STRING_SIZE): New.
	* g10/keyid.c (pubkey_string): New.
	* g10/import.c (import_one, import_secret_one): Use pubkey_string.
	* g10/keylist.c (print_seckey_info): Ditto.
	(print_pubkey_info, print_card_key_info): Ditto.
	(list_keyblock_print): Ditto.
	* g10/mainproc.c (list_node): Ditto.
	* g10/pkclist.c (do_edit_ownertrust, build_pk_list): Ditto.
	* g10/keyedit.c (show_key_with_all_names): Ditto.  Also change the
	format.
	(show_basic_key_info): Ditto.
	* common/openpgp-oid.c (openpgp_curve_to_oid): Also allow "ed25519".
	(openpgp_oid_to_curve): Downcase "ed25519"

2014-01-31  Werner Koch  <wk@gnupg.org>

	gpg: Add configure options to disable algorithms.
	* acinclude.m4 (GNUPG_GPG_DISABLE_ALGO): New.
	* configure.ac: Add --enable-gpg-* options to disable non MUS
	algorithms.
	* g10/misc.c (map_cipher_openpgp_to_gcry): Implement these options.
	(openpgp_pk_test_algo2): Ditto.
	(map_md_openpgp_to_gcry): Ditto.
	(openpgp_cipher_test_algo, openpgp_md_test_algo): Simplify.

	gpg: Improve --version algo info output.
	* g10/misc.c (openpgp_pk_algo_name): Return a different string for
	each ECC algorithm.
	* g10/gpg.c (build_list_pk_test_algo): New wrapper to cope with the
	different algo type enums.
	(build_list_pk_algo_name): Ditto.
	(build_list_cipher_test_algo): Ditto.
	(build_list_cipher_algo_name): Ditto.
	(build_list_md_test_algo): Ditto.
	(build_list_md_algo_name): Ditto.
	(my_strusage): Use them.
	(list_config): Ditto. Add "pubkeyname".
	(build_list): Add letter==1 hack.

	gpg: Start using OpenPGP digest algo ids.
	* g10/misc.c (print_pubkey_algo_note): Use enum typedef for the arg.
	(print_cipher_algo_note): Ditto.
	(print_digest_algo_note): Ditto.
	(map_md_openpgp_to_gcry): New.
	(openpgp_md_test_algo): Rewrite.
	(openpgp_md_algo_name): Rewrite to do without Libgcrypt.
	* g10/cpr.c (write_status_begin_signing): Remove hardwired list of
	algo ranges.

	gpg: Use only OpenPGP cipher algo ids.
	* g10/misc.c (map_cipher_openpgp_to_gcry): Use explicit mapping and
	use enums for the arg and return value.
	(map_cipher_gcry_to_openpgp): Ditto.
	(openpgp_cipher_blocklen): Use constant macros.
	(openpgp_cipher_test_algo): Use mapping function and prepare to
	disable algorithms.
	(openpgp_cipher_algo_name): Do not use Libgcrypt.

	* g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Replace
	CGRY_CIPHER_* by CIPHER_ALGO_*.

	* common/openpgpdefs.h (cipher_algo_t): Remove unused
	CIPHER_ALGO_DUMMY.

2014-01-30  Werner Koch  <wk@gnupg.org>

	gpg: Use only OpenPGP public key algo ids and add the EdDSA algo id.
	* common/sexputil.c (get_pk_algo_from_canon_sexp): Change to return a
	string.
	* g10/keygen.c (check_keygrip): Adjust for change.
	* sm/certreqgen-ui.c (check_keygrip): Likewise.

	* agent/pksign.c (do_encode_dsa): Remove bogus map_pk_openpgp_to_gcry.

	* g10/misc.c (map_pk_openpgp_to_gcry): Remove.
	(openpgp_pk_test_algo): Change to a wrapper for openpgp_pk_test_algo2.
	(openpgp_pk_test_algo2): Rewrite.
	(openpgp_pk_algo_usage, pubkey_nbits): Add support for EdDSA.
	(openpgp_pk_algo_name): Rewrite to remove need for gcry calls.
	(pubkey_get_npkey, pubkey_get_nskey): Ditto.
	(pubkey_get_nsig, pubkey_get_nenc): Ditto.
	* g10/keygen.c(do_create_from_keygrip):  Support EdDSA.
	(common_gen, gen_ecc, ask_keysize, generate_keypair): Ditto.
	* g10/build-packet.c (do_key): Ditto.
	* g10/export.c (transfer_format_to_openpgp): Ditto.
	* g10/getkey.c (cache_public_key): Ditto.
	* g10/import.c (transfer_secret_keys): Ditto.
	* g10/keylist.c (list_keyblock_print, list_keyblock_colon): Ditto.
	* g10/mainproc.c (proc_pubkey_enc): Ditto.
	* g10/parse-packet.c (parse_key): Ditto,
	* g10/sign.c (hash_for, sign_file, make_keysig_packet): Ditto.
	* g10/keyserver.c (print_keyrec): Use openpgp_pk_algo_name.
	* g10/pkglue.c (pk_verify, pk_encrypt, pk_check_secret_key): Use only
	OpenPGP algo ids and support EdDSA.
	* g10/pubkey-enc.c (get_it): Use only OpenPGP algo ids.
	* g10/seskey.c (encode_md_value): Ditto.

2014-01-29  Werner Koch  <wk@gnupg.org>

	gpg: Remove cipher.h and put algo ids into a common file.
	* common/openpgpdefs.h (cipher_algo_t, pubkey_algo_t, digest_algo_t)
	(compress_algo_t): New.
	* agent/gpg-agent.c: Remove ../g10/cipher.h. Add openpgpdefs.h.
	* g10/cipher.h (DEK): Move to ...
	* g10/dek.h: new file.
	* g10/cipher.h (is_RSA, is_ELGAMAL, is_DSA)
	(PUBKEY_MAX_NPKEY, PUBKEY_MAX_NSKEY, PUBKEY_MAX_NSIG, PUBKEY_MAX_NENC)
	(PUBKEY_USAGE_SIG, PUBKEY_USAGE_ENC, PUBKEY_USAGE_CERT)
	(PUBKEY_USAGE_AUTH, PUBKEY_USAGE_NONE): Move to
	* g10/packet.h: here.
	* g10/cipher.h: Remove.  Remove from all files.
	* g10/filter.h, g10/packet.h:  Include dek.h.
	* g10/Makefile.am (common_source): Remove cipher.h.  Add dek.h.

	include: Remove this directory.
	* include/cipher.h: Move to ...
	* g10/cipher.h: here.
	* agent/gpg-agent.c: Adjust header file name.

	* include/host2net.h: Move to ...
	* common/host2net.h: here.  Change license to LGPLv3/GPLv2.  Adjust
	notices to reflect that only me worked on that file.

	* include/types.h: Remove.
	* common/types.h: Include inttypes.h.  Add byte typedef and comments
	for __riscos__.
	* common/iobuf.h: Adjust header file name.

	* include/_regex.h: Remove this unused file.

	* include/Makefile.am: Remove.
	* Makefile.am (SUBDIRS): Remove "include".
	* configure.ac (AC_CONFIG_FILES): Remove include/Makefile.
	* include/ChangeLog-2011: Move to ...
	* common/ChangeLog-2011.include: here.
	* common/Makefile.am (EXTRA_DIST): Add file.

	* include/zlib-riscos.h: Move this repo only file to ...
	* g10/zlib-riscos.h: here.

	* include/: Remove.

2014-01-17  Werner Koch  <wk@gnupg.org>

	Remove unused u64 type definitions.
	* configure.ac: Remove check for uint64 and UINT64_C.
	* include/types.h: Remove u64 stuff.
	* common/types.h: Ditto.

2014-01-16  NIIBE Yutaka  <gniibe@fsij.org>

	agent: Not remove SSH socket when already running.
	* agent/gpg-agent.c (main): Defer setting of socket_name_ssh to avoid
	removal of the socket when it will die in create_server_socket for
	socket_name.

	agent: Fix agent_is_eddsa_key.
	* agent/findkey.c (agent_is_eddsa_key): Implemented.

2014-01-15  NIIBE Yutaka  <gniibe@fsij.org>

	Add secp256k1.
	* common/openpgp-oid.c (openpgp_curve_to_oid): Add secp256k1.
	(openpgp_oid_to_curve): Likewise.

	* g10/keygen.c (ask_curve): Add secp256k1.

2014-01-10  Werner Koch  <wk@gnupg.org>

	autogen.sh: Add rule for 64 bit windows.

	Turn autogen.sh into a generic script.
	* autogen.sh: Revamp.
	* autogen.rc: New.
	* Makefile.am (EXTRA_DIST): Add autogen.rc.

	Rename scripts/ to build-aux/
	* scripts/: Rename to build-aux/
	* Makefile.am: Adjust accordingly.
	* configure.ac (AC_CONFIG_AUX_DIR): Change to build-aux.

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

	Improve the speedo make script.
	* scripts/gpg-w32-dev/README: Remove
	* scripts/gpg-w32-dev/GNUmakefile, scripts/gpg-w32-dev/speedo.mk:
	Merge into ..
	* scripts/speedo.mk: this.

	gpgsplit: Allow building without zlib support.
	* tools/gpgsplit.c [!HAVE_ZLIB]: Do not include zlib.h.
	(handle_zlib): Build only if HAVE_ZLIB is defined.
	(write_part): Support zlib and zip only if HAVE_ZLIB is defined.

	w32: Fix backslash quoting in registry name.
	* configure.ac (GNUPG_REGISTRY_DIR): Double backslashes.

	Fix test for zlib.
	* configure.ac (HAVE_ZLIB): Define only if found.

	Add --enable-silent-rules stuff.
	* configure.ac: Add AM_SILENT_RULES.

2014-01-08  Werner Koch  <wk@gnupg.org>

	w32: Add macro for the registry key.
	* configure.ac (GNUPG_REGISTRY_DIR) [W32]: New ac-define.
	* common/homedir.c (default_homedir): Use it.
	* common/logging.c (do_logv): Use it.

2013-12-11  Werner Koch  <wk@gnupg.org>

	gpg: Change --show-session-key to print the session key earlier.
	* g10/cpr.c (write_status_strings): New.
	(write_status_text): Replace code by a call to write_status_strings.
	* g10/mainproc.c (proc_encrypted): Remove show_session_key code.
	* g10/decrypt-data.c (decrypt_data): Add new show_session_key code.

2013-12-05  Werner Koch  <wk@gnupg.org>

	gpg: Change OID of Ed25519 and add Brainpool oids.
	* common/openpgp-oid.c (openpgp_curve_to_oid): Change OID for
	Ed25519.  Add brainpool OIDs.
	(openpgp_oid_to_curve): Ditto.

2013-11-29  Werner Koch  <wk@gnupg.org>

	common: Add put_membuf_printf.
	* common/membuf.c (put_membuf_printf): New.

2013-11-27  Werner Koch  <wk@gnupg.org>

	gpg: Change armor Version header to emit only the major version.
	* g10/options.h (opt): Rename field no_version to emit_version.
	* g10/gpg.c (main): Init opt.emit_vesion to 1.  Change --emit-version
	to bump up opt.emit_version.
	* g10/armor.c (armor_filter): Implement different --emit-version
	values.

2013-11-18  Werner Koch  <wk@gnupg.org>

	Make use of the *_NAME etc macros.
	Replace hardwired strings at many places with new macros from config.h
	and use the new strusage macro replacement feature.

	* common/asshelp.c (lock_spawning) [W32]: Change the names of the spawn
	sentinels.
	* agent/command.c (cmd_import_key): Use asprintf to create the prompt.

	Add strusage macro replacement feature.
	* common/argparse.c (writechar): New.
	(writestrings): Add macro replacement feature.
	(show_help): Remove specialized @EMAIL@ replacement.
	* configure.ac (GNUPG_NAME, GPG_NAME, GPGSM_NAME): Define.
	(GPG_AGENT_NAME, DIRMNGR_NAME, G13_NAME, GPGCONF_NAME): Define.
	(GPGTAR_NAME, GPG_AGENT_INFO_NAME, GPG_AGENT_SOCK_NAME): Define.
	(GPG_AGENT_SSH_SOCK_NAME, DIRMNGR_INFO_NAME): Define.
	(DIRMNGR_SOCK_NAME): Define.

2013-11-15  Werner Koch  <wk@gnupg.org>

	kbx: Implement update operation for OpenPGP keyblocks.
	* kbx/keybox-update.c (keybox_update_keyblock): Implement.
	* kbx/keybox-search.c (get_blob_flags): Move to ...
	* kbx/keybox-defs.h (blob_get_type): here.
	* kbx/keybox-file.c (_keybox_read_blob2): Fix calling without R_BLOB.
	* g10/keydb.c (build_keyblock_image): Allow calling without
	R_SIGSTATUS.
	(keydb_update_keyblock): Implement for keybox.

	* kbx/keybox-dump.c (_keybox_dump_blob): Fix printing of the unhashed
	size.  Print "does not expire" also on 64 bit platforms.

	gpg: Rework ECC support and add experimental support for Ed25519.
	* agent/findkey.c (key_parms_from_sexp): Add algo name "ecc".
	(agent_is_dsa_key): Ditto.
	(agent_is_eddsa_key): New.  Not finished, though.
	* agent/pksign.c (do_encode_eddsa): New.
	(agent_pksign_do): Use gcry_log_debug functions.
	* agent/protect.c (agent_protect): Parse a flags parameter.
	* g10/keygen.c (gpg_curve_to_oid): Move to ...
	* common/openpgp-oid.c (openpgp_curve_to_oid): here and rename.
	(oid_ed25519): New.
	(openpgp_oid_is_ed25519): New.
	(openpgp_oid_to_curve): New.
	* common/t-openpgp-oid.c (test_openpgp_oid_is_ed25519): New.
	* g10/build-packet.c (gpg_mpi_write): Write the length header also for
	opaque MPIs.
	(gpg_mpi_write_nohdr): New.
	(do_key): Use gpg_mpi_write_nohdr depending on algorithm.
	(do_pubkey_enc): Ditto.
	* g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Use
	gpg_mpi_write_nohdr.
	* g10/export.c (transfer_format_to_openpgp):
	* g10/keygen.c (ecckey_from_sexp): Return the error.
	(gen_ecc): Repalce arg NBITS by CURVE.
	(read_parameter_file): Add keywords "Key-Curve" and "Subkey-Curve".
	(ask_curve): New.
	(generate_keypair, generate_subkeypair): Use ask_curve.
	(do_generate_keypair): Also pass curve name.
	* g10/keylist.c (list_keyblock_print, list_keyblock_colon): Print
	curve name.
	* g10/parse-packet.c (mpi_read): Remove workaround for
	Libcgrypt < 1.5.
	(parse_key): Fix ECC case.  Print the curve name.
	* g10/pkglue.c (mpi_from_sexp): Rename to get_mpi_from_sexp.
	(pk_verify, pk_check_secret_key): Add special case for Ed25519.
	* g10/seskey.c (encode_md_value): Ditto.
	* g10/sign.c (do_sign, hash_for, sign_file): Ditto.

	kbx: Fix possible segv in kbxdump.
	* kbx/keybox-dump.c (_keybox_dump_blob): Check length before get32.

	Require Libgcrypt 1.6.
	* agent/pksign.c (do_encode_dsa): Remove Libgcrypt version check

2013-11-13  NIIBE Yutaka  <gniibe@fsij.org>

	scd: more pinpad input fix for PC/SC.
	* scd/apdu.c (check_pcsc_pinpad): Set default values here.
	(pcsc_pinpad_verify, pcsc_pinpad_modify): Remove setting default
	values, as it's too late.

2013-11-11  NIIBE Yutaka  <gniibe@fsij.org>

	scd: more pinpad fix.
	* scd/apdu.c (check_pcsc_pinpad): Set ->minlen and ->maxlen only when
	those are specified.
	(pcsc_pinpad_modify): Remove old check code.

2013-10-29  NIIBE Yutaka  <gniibe@fsij.org>

	scd: pinpad fix for PC/SC on Windows.
	* scd/apdu.c (SCARD_CTL_CODE): Fix for Windows.

2013-10-28  Werner Koch  <wk@gnupg.org>

	doc: Change yat2m to allow arbitrary condition names.
	* doc/yat2m.c (MAX_CONDITION_NESTING): New.
	(gpgone_defined): Remove.
	(condition_s, condition_stack, condition_stack_idx): New.
	(cond_is_active, cond_in_verbatim): New.
	(add_predefined_macro, set_macro, macro_set_p): New.
	(evaluate_conditions, push_condition, pop_condition): New.
	(parse_file): Rewrite to use the condition stack.
	(top_parse_file): Set prefined macros.
	(main): Change -D to define arbitrary macros.

2013-10-25  NIIBE Yutaka  <gniibe@fsij.org>

	scd: fix pinpad input on Windows.
	* scd/apdu.c (open_pcsc_reader_direct): Don't call
	pcsc_vendor_specific_init here, but...
	(connect_pcsc_card): Call it here.

2013-10-23  NIIBE Yutaka  <gniibe@fsij.org>

	po: Update Japanese translation.

2013-10-16  NIIBE Yutaka  <gniibe@fsij.org>

	scd: add pinpad readers information for PC/SC service.
	* scd/apdu.c (pcsc_vendor_specific_init): Add information for Cherry
	ST-2xxx, Reiner cyberJack, Vasco DIGIPASS, FSIJ Gnuk Token, and KAAN
	Advance.

2013-10-15  NIIBE Yutaka  <gniibe@fsij.org>

	scd: remove pin length check.
	* scd/apdu.c (pcsc_pinpad_verify): Remove old check code for pin
	length.

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

	gpg: Limit the nesting level of I/O filters.
	* common/iobuf.c (MAX_NESTING_FILTER): New.
	(iobuf_push_filter2): Limit the nesting level.

	* g10/mainproc.c (mainproc_context): New field ANY.  Change HAVE_DATA
	and ANY_SIG_SIGN to bit fields of ANY.  Add bit field
	UNCOMPRESS_FAILED.
	(proc_compressed): Avoid printing multiple Bad Data messages.
	(check_nesting): Return GPG_ERR_BAD_DATA instead of UNEXPECTED_DATA.

2013-10-02  Werner Koch  <wk@gnupg.org>

	gpg: Fix bug with deeply nested compressed packets.
	* g10/mainproc.c (MAX_NESTING_DEPTH): New.
	(proc_compressed): Return an error code.
	(check_nesting): New.
	(do_proc_packets): Check packet nesting depth.  Handle errors from
	check_compressed.

2013-09-08  Werner Koch  <wk@gnupg.org>

	Switch to deterministic DSA.
	* agent/pksign.c (rfc6979_hash_algo_string): New.
	(do_encode_dsa) [Libgcrypt >= 1.6]: Make use of RFC-6979.

2013-08-30  Werner Koch  <wk@gnupg.org>

	scd: Suppress gcc warning about possible uninitialized use.
	* scd/app-nks.c (parse_pwidstr): Always init r_pwid.

	gpg: Use 2048 as the default keysize in batch mode.
	* g10/keygen.c (gen_elg, gen_dsa, gen_rsa): Set default keysize to
	2048.

	gpgtar: Fix building for systems with a separate libintl.
	* tools/Makefile.am (gpgtar_LDADD): Add LIBINTL and LIBICONV.

	scd: Use vendor and product id macros also in apdu.c.
	* scd/ccid-driver.c: Move vendor and product ids to ...
	* scd/ccid-driver.h: here.
	* scd/apdu.c (CCID_DRIVER_INCLUDE_USB_IDS): Define to include ids.
	(pcsc_vendor_specific_init): Use vendor and product id macros.

2013-08-30  NIIBE Yutaka  <gniibe@fsij.org>

	scd: PC/SC pinpad input improvement.
	* scd/apdu.c (struct reader_table_s): Add members: PINMIN, PINMAX, and
	PINPAD_VERLEN_SUPPORTED.
	(CM_IOCTL_VENDOR_IFD_EXCHANGE, FEATURE_GET_TLV_PROPERTIES,
	PCSCv2_PART10_PROPERTY_*): New.
	(new_reader_slot): Initialize pinpad_varlen_supported, pinmin, pinmax.
	(pcsc_vendor_specific_init): New.
	(open_pcsc_reader_direct, open_pcsc_reader_wrapped): Call
	pcsc_vendor_specific_init.
	(check_pcsc_pinpad): Not detect here but use the result of
	pcsc_vendor_specific_init.
	(pcsc_pinpad_verify, pcsc_pinpad_modify): Specify bNumberMessage.

2013-08-29  Jonas Borgström  <jonas@borgstrom.se>

	scd: add support for RSA_CRT and RSA_CRT_N key import.
	* scd/app-openpgp.c (do_writekey): Added RSA_CRT and RSA_CRT_N support.

2013-08-29  Werner Koch  <wk@gnupg.org>

	kbx: Add a few macros for easier readability.
	* kbx/keybox-update.c (FILECOPY_INSERT)
	(FILECOPY_DELETE, FILECOPY_UPDATE): New macros.  Replace numbers by
	them.

2013-08-28  Werner Koch  <wk@gnupg.org>

	Fix commit 04e2c83f.
	* agent/command-ssh.c (stream_read_string): Do not assign to a NULL
	ptr.

	gpg: Make decryption with the OpenPGP card work.
	* scd/app-common.h (APP_DECIPHER_INFO_NOPAD): New.
	* scd/app-openpgp.c (do_decipher): Add arg R_INFO.
	* scd/app-nks.c (do_decipher): Add arg R_INFO as a dummy.
	* scd/app.c (app_decipher): Add arg R_INFO.
	* scd/command.c (cmd_pkdecrypt): Print status line "PADDING".
	* agent/call-scd.c (padding_info_cb): New.
	(agent_card_pkdecrypt): Add arg R_PADDING.
	* agent/divert-scd.c (divert_pkdecrypt): Ditto.
	* agent/pkdecrypt.c (agent_pkdecrypt): Ditto.
	* agent/command.c (cmd_pkdecrypt):  Print status line "PADDING".
	* g10/call-agent.c (padding_info_cb): New.
	(agent_pkdecrypt): Add arg R_PADDING.
	* g10/pubkey-enc.c (get_it): Use padding info.

	agent: Fix two compiler warnings.
	* agent/command.c (cmd_preset_passphrase, pinentry_loopback): Use %zu
	in format string.
	* scd/ccid-driver.c (ccid_get_atr): Ditto.
	* agent/command-ssh.c (stream_read_string): Init arg STRING_SIZE to
	avoid maybe_unitialized warning.

2013-08-27  NIIBE Yutaka  <gniibe@fsij.org>

	scd: fix parsing login-data DO.
	* scd/app-openpgp.c (parse_login_data): Release RELPTR.  Fix parsing.

	scd: fix Vega for Alpha reader.
	* scd/ccid-driver.c (ccid_vendor_specific_init): Fix error handling
	and size of command.

2013-08-21  Werner Koch  <wk@gnupg.org>

	scd: Make SPRx32 pinpad work with PC/SC on Windows.
	* scd/apdu.c (CM_IOCTL_GET_FEATURE_REQUEST): Use SCARD_CTL_CODE.
	(SCARD_CTL_CODE): Define if not defined.
	(reader_table_s): Add is_spr532.
	(new_reader_slot): Clear it.
	(check_pcsc_pinpad): Set it.
	(pcsc_pinpad_verify, pcsc_pinpad_modify): Add fix for SPR532.

	scd: Improve --enable-pinpad-varlen.
	* tools/gpgconf-comp.c (gc_options_scdaemon): Add
	enable-pinpad-varlen.
	* scd/apdu.c (check_pcsc_pinpad): Detect SPRx32 reader.

2013-08-08  Werner Koch  <wk@gnupg.org>

	agent: Extend cmd KEYINFO to return data from sshcontrol.
	* agent/command-ssh.c (struct control_file_s): Rename to
	ssh_control_file_s.
	(ssh_open_control_file, ssh_close_control_file)
	(ssh_read_control_file, ssh_search_control_file): New.
	(control_file_t):  Rename and move to ...
	* agent/agent.h (ssh_control_file_t): here.
	* agent/command.c (do_one_keyinfo): Add args is_ssh, ttl, disabled,
	and confirm. Rename unknown keytype indicator from '-' to 'X'.  Extend
	output.
	(cmd_keyinfo): Add options --ssh-list and --with-ssh.

2013-08-02  Werner Koch  <wk@gnupg.org>

	gpg: No need to create a trustdb when encrypting with --always-trust.
	* g10/gpg.c (main): Special case setup_trustdb for --encrypt.

2013-08-01  Werner Koch  <wk@gnupg.org>

	w32: Fix recent patch 9ff72e4.
	* common/homedir.c (check_portable_app): Fix the name of the control
	file.

	agent: Include missing prototype.
	* agent/protect.c: Include cvt-openpgp.h.

	w32: Add code to support a portable use of GnuPG.
	* common/homedir.c (w32_bin_is_bin, w32_portable_app) [W32]: New.
	(check_portable_app) [W32]: New.
	(standard_homedir, default_homedir) [W32]: Support the portable flag.
	(w32_rootdir, w32_commondir) [W32]: Ditto.
	(gnupg_bindir, gnupg_cachedir, dirmngr_socket_name) [W32]: Ditto.
	* common/logging.h (JNLIB_LOG_NO_REGISTRY): New.
	* common/logging.c (no_registry): New variable.
	(log_set_prefix, log_get_prefix): Set/get that variable.
	(do_logv): Do not check the registry if that variable is set.

	Silence compiler warning about deprecated Libgcrypt symbols.
	* configure.ac (AH_BOTTOM): Define GCRYPT_NO_DEPRECATED.

	dirmngr: Define missing LDAP constant.
	* dirmngr/ldap-url.c (LDAP_SCOPE_DEFAULT): Define if missing.

	scd: Fix a syntax error for Apple and Windows.
	* scd/apdu.c (pcsc_dword_t) [W32]: Fix syntax error.

	common: Fix a build error when using adns.
	* common/dns-cert.c (get_dns_cert) [USE_ADNS]: Fix synatx error.

2013-07-31  Werner Koch  <wk@gnupg.org>

	common: Comment out unused code.
	* common/w32-reg.c (write_w32_registry_string): Comment out.

	dirmngr: Remove unused file.
	* dirmngr/get-path.c: Remove.

2013-06-27  Werner Koch  <wk@gnupg.org>

	sm: Remove cruft from source files.
	* sm/keydb.c, sm/keydb.h: Remove disabled code parts.

	Prepare for newer automake versions.
	* configure.ac (AM_INIT_AUTOMAKE): Replace 2 argument form by the
	option form.  Add options from the top Makefile.
	(AM_CONFIG_HEADER): Rename to AC_CONFIG_HEADER.
	* Makefile.am (AUTOMAKE_OPTIONS): Remove.

	* kbx/Makefile.am: Remove INCLUDES.  Include cmacros.am.  FActor some
	AM_CPPFLAGS options to  AM_CFLAGS.

2013-06-26  Werner Koch  <wk@gnupg.org>

	Fix Makefile regression.
	* agent/Makefile.am (gpg_agent_DEPENDENCIES): Remove cruft from wrong
	resolve conflict 2013-04-25.
	(gpg_agent_DEPENDENCIES): Remove obsolete gpg_agent_res_deps
	(gpg_agent_LDFLAGS): Remove obsolete gpg_agent_res_ldflags.

2013-05-22  Werner Koch  <wk@gnupg.org>

	Implement unattended OpenPGP secret key import.
	* agent/command.c (cmd_import_key): Add option --unattended.
	* agent/cvt-openpgp.c (convert_transfer_key): New.
	(do_unprotect): Factor some code out to ...
	(prepare_unprotect): new function.
	(convert_from_openpgp): Factor all code out to ...
	(convert_from_openpgp_main): this.  Add arg 'passphrase'.  Implement
	openpgp-native protection modes.
	(convert_from_openpgp_native): New.
	* agent/t-protect.c (convert_from_openpgp_native): New dummy fucntion
	* agent/protect-tool.c (convert_from_openpgp_native): Ditto.
	* agent/protect.c (agent_unprotect): Add arg CTRL.  Adjust all
	callers.  Support openpgp-native protection.
	* g10/call-agent.c (agent_import_key): Add arg 'unattended'.
	* g10/import.c (transfer_secret_keys): Use unattended in batch mode.

	New debug functions log_printcanon and log_printsexp.
	* common/sexputil.c (sexp_to_string, canon_sexp_to_string): New.
	(log_printcanon, log_printsexp): New.

	agent: Fix length detection of canonical formatted openpgp keys.
	* agent/command.c (cmd_import_key): Pass 0 instead of KEYLEN to
	gcry_sexp_canon_len.

	agent: New option --disable-check-own-socket.
	* agent/gpg-agent.c (oDisableCheckOwnSocket): New.
	(disable_check_own_socket): New.
	(parse_rereadable_options): Set new option.
	(check_own_socket): Implement new option.

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

	w32: Add icons and version information.
	* common/gnupg.ico: New.  Take from artwork/gnupg-favicon-1.ico.
	* agent/gpg-agent-w32info.rc: New.
	* g10/gpg-w32info.rc: New.
	* scd/scdaemon-w32info.rc: New.
	* sm/gpgsm-w32info.rc: New.
	* tools/gpg-connect-agent-w32info.rc: New.
	* common/w32info-rc.h.in: New.
	* configure.ac (BUILD_REVISION, BUILD_FILEVERSION, BUILD_TIMESTAMP)
	(BUILD_HOSTNAME): New.
	(AC_CONFIG_FILES): Add w32info-rc.h.
	* am/cmacros.am (.rc.o): New rule.
	* agent/Makefile.am, common/Makefile.am, g10/Makefile.am
	* scd/Makefile.am, sm/Makefile.am, tools/Makefile.am: Add stuff to
	build resource files.

2013-05-07  Ian Abbott  <abbotti@mev.co.uk>

	doc: fix some Texinfo warnings.
	* doc/gpg.texi: Fix syntax and add missing menu entries.
	* doc/gpgsm.texi: Fix subsectioning.

2013-04-22  Werner Koch  <wk@gnupg.org>

	Fix potential heap corruption in "gpg -v --version".
	* g10/gpg.c (build_list): Rewrite to cope with buffer overflow in
	certain locales.

2013-04-19  Werner Koch  <wk@gnupg.org>

	gpgsm: Remove non-implemented commands from --help.
	* sm/gpgsm.c (opts): Removed commands --clearsign, --symmetric,
	--send-keys, and --recv-keys.

2013-04-19  Daiki Ueno  <ueno@gnu.org>

	Make sure to call fflush if estream_t is backed with stdio.
	* common/estream.c (es_func_fp_write): Call fflush after fwrite.

2013-04-19  Werner Koch  <wk@gnupg.org>

	doc: Formatting fixes.
	* doc/Makefile.am (.fig.jpg): Correct to use -L jpeg.
	* doc/gpg.texi: Fix cross reference for --options.
	* doc/gpgsm.texi: Likewise.
	* doc/gpl.texi: Fix enumerate and re-indent examples.

2013-04-01  NIIBE Yutaka  <gniibe@fsij.org>

	scd: move SCDaemon to libexecdir.
	* common/homedir.c (gnupg_module_name): It's now libexecdir.
	* scd/Makefile.am (libexec_PROGRAMS): Add scdaemon
	(bin_PROGRAMS): Remove scdaemon.

2013-03-29  Werner Koch  <wk@gnupg.org>

	copyright assignments are not anymore required.

2013-03-26  NIIBE Yutaka  <gniibe@fsij.org>

	scd: PC/SC status fix.
	* scd/apdu.c (pcsc_get_status_direct): Check PCSC_STATE_MUTE only when
	PCSC_STATE_PRESENT.

	* scd/pcsc-wrapper.c (handle_status): Ditto.

	scd: PC/SC cleanup (more).
	* scd/apdu.c (control_pcsc_direct, control_pcsc_wrapped, control_pcsc)
	(check_pcsc_pinpad, pcsc_pinpad_verify, pcsc_pinpad_modify): Use
	pcsc_dword_t.

	scd: call update_card_removed only when detecting removal.
	* scd/command.c (update_reader_status_file): Add condition
	vr->status == 0.

2013-03-22  NIIBE Yutaka  <gniibe@fsij.org>

	scd: PC/SC cleanup.
	* scd/apdu.c (pcsc_dword_t): New.  It was named as DWORD (double-word)
	when a word was 16-bit.
	(struct reader_table_s): Fixes for types.
	(struct pcsc_readerstate_s) [__APPLE__]: Enable #pragma pack(1).
	Throughout: Fixes for types.

	* scd/pcsc-wrapper.c: Likewise.

2013-03-21  NIIBE Yutaka  <gniibe@fsij.org>

	po: Enable ja.po.
	* po/LINGUAS: Enable ja.po.

	scd: change default value of pinpad maxlen.
	* scd/apdu.c (pcsc_pinpad_verify, pcsc_pinpad_modify): Default value
	of maxlen for pinpad input is now 15 (was: 25).

	* scd/ccid-driver.c (ccid_transceive_secure): Likewise.

2013-03-20  Werner Koch  <wk@gnupg.org>

	Add code to allow for late memory cleanup.
	* common/init.c (mem_cleanup_item_t): New.
	(run_mem_cleanup): New.
	(_init_common_subsystems): Add an atexit for it.
	(register_mem_cleanup_func): New.

	* g10/kbnode.c (cleanup_registered): New.
	(release_unused_nodes): New.
	(alloc_node): Call register_mem_cleanup_func.

	kbx: Remove unused macro.
	* kbx/keybox.h (KEYBOX_WITH_OPENPGP): Remove unused macro.

2013-03-19  Werner Koch  <wk@gnupg.org>

	gpg: Print indicator for unknown key capability.
	* g10/keylist.c (print_capabilities): Print '?' for unknown usage.

2013-03-19  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>

	gpg: Allow setting of all zero key flags.
	* g10/keygen.c (do_add_key_flags): Do not check for empty key flags.

2013-03-19  Werner Koch  <wk@gnupg.org>

	gpg: Distinguish between missing and cleared key flags.
	* include/cipher.h (PUBKEY_USAGE_NONE): New.
	* g10/getkey.c (parse_key_usage): Set new flag.

2013-03-15  NIIBE Yutaka  <gniibe@fsij.org>

	scd: ccid-driver supporting larger APDU.
	* scd/ccid-driver.c (ccid_transceive_apdu_level): Support larger
	APDU.

	scd: fix missing close paren.
	* scd/app-openpgp.c (du_auth): Fix.

2013-03-09  NIIBE Yutaka  <gniibe@fsij.org>

	scd: support ECDSA signing.
	* scd/app-openpgp.c (do_sign): Only prepend message digest block
	for RSA or do_auth.
	(do_auth): Remove message digest block for ECDSA.

2013-03-08  NIIBE Yutaka  <gniibe@fsij.org>

	scd: support ECDSA public key.
	* scd/app-openpgp.c (key_type_t): New.
	(CURVE_NIST_P256, CURVE_NIST_P384, CURVE_NIST_P521): New.
	(struct app_local_s): Change keyattr to have key_type and union.
	(get_ecc_key_parameters, get_curve_name): New.
	(send_key_attr, get_public_key): Support ECDSA.
	(build_privkey_template, do_writekey, do_genkey): Follow the change
	of the member KEY_ATTR.
	(parse_historical): New.
	(parse_algorithm_attribute): Support ECDSA.

2013-03-05  Werner Koch  <wk@gnupg.org>

	Require libgpg-error 1.11.
	* configure.ac: Require libgpg-error 1.11.
	* common/util.h (GPG_ERR_NO_KEYSERVER, GPG_ERR_INV_CURVE)
	(GPG_ERR_UNKNOWN_CURVE): Remove fallback definitions.

2013-02-28  NIIBE Yutaka  <gniibe@fsij.org>

	agent: pksign result conversion to sexp to upper layer.
	* agent/agent.h (divert_pksign): Add R_SIGLEN argument.
	* agent/divert-scd.c (divert_pksign): Return length at R_SIGLEN.
	* agent/call-scd.c (agent_card_pksign): Move composition of
	S-expression to...
	* agent/pksign.c (agent_pksign_do): ... here.

2013-02-22  Werner Koch  <wk@gnupg.org>

	Use has_leading_keyword in the assuan callbacks.
	* agent/call-pinentry.c (inq_quality): Use has_leading_keyword.
	* agent/call-scd.c (inq_needpin, inq_writekey_parms): Ditto.
	* g10/call-agent.c (inq_writecert_parms, keyinfo_status_cb): Ditto.
	(inq_genkey_parms, inq_ciphertext_cb, inq_import_key_parms): Ditto.
	* g10/call-dirmngr.c (ks_put_inq_cb): Ditto.
	* sm/call-agent.c (default_inq_cb, inq_ciphertext_cb): Ditto.
	(inq_genkey_parms, istrusted_status_cb, learn_status_cb): Ditto.
	(keyinfo_status_cb, inq_import_key_parms): Ditto.
	* sm/call-dirmngr.c (inq_certificate, isvalid_status_cb): Ditto.
	(lookup_status_cb, run_command_inq_cb, run_command_status_cb): Ditto.

	Remove some unused variables.
	* tools/gpgconf-comp.c (gc_process_gpgconf_conf): Remove unused
	used_components.
	* agent/command-ssh.c (ssh_signature_encoder_ecdsa): Mark unused arg.
	* g13/g13.c (main): Comment variable of yet unimplemented options.

	gpg: Fix a memory leak in batch key generation.
	* g10/keygen.c (append_to_parameter): New.
	(proc_parameter_file): Use new func to extend the parameter list.

	* g10/passphrase.c (passphrase_to_dek_ext): Print a diagnostic of
	gcry_kdf_derive failed.
	* g10/keygen.c (proc_parameter_file): Print a diagnostic if
	passphrase_to_dek failed.

	gpg: Handle the agent's NEW_PASSPHRASE inquiry.
	* g10/call-agent.c (default_inq_cb): Take care of NEW_PASSPHRASE.

	common: Add func has_leading_keyword.
	* common/stringhelp.c (has_leading_keyword): New.

	Remove build hacks for FreeBSD.
	* configure.ac [freebsd]: Do not add /usr/local to CPPFLAGS and
	LDFLAGS.

2013-02-22  NIIBE Yutaka  <gniibe@fsij.org>

	agent: fix two bugs.
	* agent/command.c (cmd_keytocard): Decrement KEYDATALEN.
	* agent/findkey.c (agent_public_key_from_file): Increment for ELEMS.

	gpg: fix keytocard and support ECC card for key attribute.
	* g10/call-agent.c (agent_keytocard): Supply PARM arg.
	* g10/card-util.c (card_status): Support ECC.
	(card_store_subkey): Don't assume RSA.

2013-02-21  Werner Koch  <wk@gnupg.org>

	gpg: Fix a memory leak in batch key generation.
	* g10/keygen.c (append_to_parameter): New.
	(proc_parameter_file): Use new func to extend the parameter list.

	* g10/passphrase.c (passphrase_to_dek_ext): Print a diagnostic of
	gcry_kdf_derive failed.
	* g10/keygen.c (proc_parameter_file): Print a diagnostic if
	passphrase_to_dek failed.

	gpg: Handle the agent's NEW_PASSPHRASE inquiry.
	* g10/call-agent.c (default_inq_cb): Take care of NEW_PASSPHRASE.

	common: Add func has_leading_keyword.
	* common/stringhelp.c (has_leading_keyword): New.

2013-02-20  Werner Koch  <wk@gnupg.org>

	Remove build hacks for FreeBSD.
	* configure.ac [freebsd]: Do not add /usr/local to CPPFLAGS and
	LDFLAGS.

2013-02-12  NIIBE Yutaka  <gniibe@fsij.org>

	gpg: Implement card_store_subkey again.
	* g10/call-agent.h (agent_keytocard): New.
	* g10/call-agent.c (agent_keytocard): New.
	* g10/card-util.c (replace_existing_key_p): Returns 1 when replace.
	(card_generate_subkey): Check return value of replace_existing_key_p.
	(card_store_subkey): Implement again using agent_keytocard.

	agent: Add KEYTOCARD command.
	* agent/agent.h (divert_writekey, agent_card_writekey): New.
	* agent/call-scd.c (inq_writekey_parms, agent_card_writekey): New.
	* agent/command.c (cmd_keytocard, hlp_keytocard): New.
	(register_commands): Add cmd_keytocard.
	* agent/divert-scd.c (divert_writekey): New.

	Japanese: update po and doc.
	* doc/help.ja.txt, po/ja.po: Updated.

2013-02-08  NIIBE Yutaka  <gniibe@fsij.org>

	scd: Rename 'keypad' to 'pinpad'.
	* NEWS: Mention scd changes.

	* agent/divert-scd.c (getpin_cb): Change message.

	* agent/call-scd.c (inq_needpin): Change the protocol to
	POPUPPINPADPROMPT and DISMISSPINPADPROMPT.
	* scd/command.c (pin_cb): Likewise.

	* scd/apdu.c (struct reader_table_s): Rename member functions.
	(check_pcsc_pinpad, pcsc_pinpad_verify, pcsc_pinpad_modify,
	check_ccid_pinpad, ccid_pinpad_operation, apdu_check_pinpad
	apdu_pinpad_verify, apdu_pinpad_modify): Rename.

	* scd/apdu.h (SW_HOST_NO_PINPAD, apdu_check_pinpad)
	(apdu_pinpad_verify, apdu_pinpad_modify): Rename.

	* scd/iso7816.h (iso7816_check_pinpad): Rename.

	* scd/iso7816.c (map_sw): Use SW_HOST_NO_PINPAD.
	(iso7816_check_pinpad): Rename.
	(iso7816_verify_kp, iso7816_change_reference_data_kp): Follow
	the change.

	* scd/ccid-driver.h (CCID_DRIVER_ERR_NO_PINPAD): Rename.
	* scd/ccid-driver.c (ccid_transceive_secure): Use it.

	* scd/app-dinsig.c (verify_pin): Follow the change.
	* scd/app-nks.c (verify_pin): Follow the change.

	* scd/app-openpgp.c (check_pinpad_request): Rename.
	(parse_login_data, verify_a_chv, verify_chv3, do_change_pin): Follow
	the change.

	* scd/scdaemon.c (oDisablePinpad, oEnablePinpadVarlen): Rename.

	* scd/scdaemon.h (opt): Rename to disable_pinpad,
	enable_pinpad_varlen.

	* tools/gpgconf-comp.c (gc_options_scdaemon): Rename to
	disable-pinpad.

2013-02-07  Werner Koch  <wk@gnupg.org>

	gpg: Add pinentry-mode feature.
	* g10/gpg.c: Include shareddefs.h.
	(main): Add option --pinentry-mode.
	* g10/options.h (struct opt): Add field pinentry_mode.
	* g10/passphrase.c: Include shareddefs.h.
	(have_static_passphrase): Take care of loopback pinentry_mode.
	(read_passphrase_from_fd): Ditto.
	(get_static_passphrase): New.
	(passphrase_to_dek_ext): Factor some code out to ...
	(emit_status_need_passphrase): new.
	* g10/call-agent.c (start_agent): Send the pinentry mode.
	(default_inq_cb): Take care of the PASSPHRASE inquiry.  Return a
	proper error code.
	(agent_pksign): Add args keyid, mainkeyid and pubkey_algo.
	(agent_pkdecrypt): Ditto.
	* g10/pubkey-enc.c (get_it): Pass new args.
	* g10/sign.c (do_sign): Pass new args.

	* g10/call-agent.c (struct default_inq_parm_s): New.  Change all
	similar structs to reference this one.  Change all users and inquire
	callback to use this struct, instead of NULL or some undefined but not
	used structs.  This change will help to eventually get rid of global
	variables.

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

	agent: Move a typedef to common and provide parse_pinentry_mode.
	* common/agent-opt.c: New.
	* common/shareddefs.h: New.
	* common/Makefile.am: Add new files.
	* agent/agent.h: Include shareddefs.h.
	(pinentry_mode_t): Factor out to shareddefs.h.
	* agent/command.c (option_handler): Use parse_pinentry_mode.

	agent: Return a better error code if no passphrase was given.
	* agent/protect.c (hash_passphrase): Handle an empty passphrase.

2013-02-05  NIIBE Yutaka  <gniibe@fsij.org>

	scd: Fix check_keypad_request.
	* scd/app-openpgp.c (check_keypad_request): 0 means not to use pinpad.

	SCD: Add vendor specific initalization.
	* scd/ccid-driver.c (ccid_vendor_specific_init): New.
	(ccid_open_reader): Call ccid_vendor_specific_init.

	SCD: Support P=N format for login data.
	* scd/app-openpgp.c (parse_login_data): Support P=N format.

	SCD: Better interoperability.
	* scd/apdu.c: Fill bTeoPrologue[2] field.

	SCD: Defaults to use pinpad if the reader has the capability.
	* scd/app-openpgp.c (struct app_local_s): Remove VARLEN.
	(parse_login_data): "P=0" means to disable pinpad.
	(check_keypad_request): Default is to use pinpad if available.

	SCD: handle keypad request on the card.
	* scd/app-openpgp.c: Add 2013.
	(struct app_local_s): Add keypad structure.
	(parse_login_data): Add parsing keypad request on the card.
	(check_keypad_request): New.
	(verify_a_chv, verify_chv3, do_change_pin): Call check_keypad_request
	to determine use of keypad.

	SCD: Minor fix of ccid-driver.
	* scd/ccid-driver.c (VENDOR_VEGA): Fix typo.

	SCD: Add support of Covadis VEGA_ALPHA reader.
	* scd/ccid-driver.c: Add 2013.
	(VENDER_VEGA, VEGA_ALPHA):New.
	(ccid_transceive_secure): VEGA_ALPHA is same firmware as GEMPC_PINPAD.
	Change bNumberMessage to 0x01, as it works better (was: 0xff).

	SCD: Support fixed length PIN input for keypad (PC/SC).
	* scd/apdu.c (pcsc_keypad_verify): SUpport fixed length PIN input for
	keypad.
	(pcsc_keypad_modify): Likewise.
	* scd/ccid-driver.c (ccid_transceive_secure): Clean up.

	SCD: Support fixed length PIN input for keypad.
	* scd/iso7816.h (struct pininfo_s): Remove MODE and add FIXEDLEN.
	* scd/app-dinsig.c (verify_pin): Initialize FIXEDLEN to unknown.
	* scd/app-nks.c (verify_pin): Likewise.
	* scd/app-openpgp.c (verify_a_chv, verify_chv3, do_change_pin):
	Likewise.
	* scd/apdu.c (check_pcsc_keypad): Add comment.
	(pcsc_keypad_verify, pcsc_keypad_modify): PC/SC driver only support
	readers with the feature of variable length input (yet).
	(apdu_check_keypad): Set FIXEDLEN.
	* scd/ccid-driver.c (ccid_transceive_secure): Add GEMPC_PINPAD
	specific settings.
	Support fixed length PIN input for keypad.

	SCD: API cleanup for keypad handling.
	* scd/iso7816.h (struct pininfo_s): Rename from iso7816_pininfo_s.
	Change meaning of MODE.
	(pininfo_t): Rename from iso7816_pininfo_t.
	* scd/sc-copykeys.c: Include "iso7816.h".
	* scd/scdaemon.c, scd/command.c: Likewise.
	* scd/ccid-driver.c: Include "scdaemon.h" and "iso7816.h".
	(ccid_transceive_secure): Follow the change of PININFO_T.
	* scd/app.c: Include "apdu.h" after "iso7816.h".
	* scd/iso7816.c (iso7816_check_keypad, iso7816_verify_kp)
	(iso7816_change_reference_data_kp): Follow the change of API.
	* scd/apdu.c (struct reader_table_s): Change API of CHECK_KEYPAD,
	KEYPAD_VERIFY, KEYPAD_MODIFY to have arg of PININFO_T.
	(check_pcsc_keypad, check_ccid_keypad): Likewise.
	(apdu_check_keypad, apdu_keypad_verify, apdu_keypad_modify): Likewise.
	(pcsc_keypad_verify, pcsc_keypad_modify, ct_send_apdu)
	(pcsc_send_apdu_direct,  pcsc_send_apdu_wrapped, pcsc_send_apdu)
	(send_apdu_ccid, ccid_keypad_operation, my_rapdu_send_apdu, send_apdu)
	(send_le): Follow the change of API.
	* scd/apdu.h (apdu_check_keypad, apdu_keypad_verify)
	(apdu_keypad_modify): Change the API.
	* scd/app-dinsig.c, scd/app-nks.c, scd/app-openpgp.c: Follow the
	change.

	SCD: Clean up.  Remove PADLEN for keypad input.
	* scd/apdu.c (struct pininfo_s): Use iso7816_pininfo_s.
	(struct reader_table_s): Remove last arg from check_keypad method.
	(check_pcsc_keypad, check_pcsc_keypad): Remove PIN_PADLEN.
	(pcsc_keypad_verify, pcsc_keypad_modify): Don't check PIN_PADLEN.
	(send_apdu_ccid, ccid_keypad_operation): Remove PIN_PADLEN.
	(apdu_check_keypad, apdu_keypad_verify, apdu_keypad_modify):
	Likewise.

	* scd/apdu.h (apdu_check_keypad, apdu_keypad_verify)
	(apdu_keypad_modify): Remove PIN_PADLEN.

	* scd/ccid-driver.c (ccid_transceive_secure): Remove PIN_PADLEN.

	* scd/ccid-driver.h (ccid_transceive_secure): Remove PIN_PADLEN.

	* scd/iso7816.c (iso7816_check_keypad, iso7816_verify_kp)
	(iso7816_change_reference_data_kp): Remove PADLEN.

	* scd/iso7816.h (struct iso7816_pininfo_s): Remove PADLEN, PADCHAR.

	SCD: Add option enable-keypad-varlen and support for GEMPC_PINPAD.
	* scd/scdaemon.h (opt): Add enable_keypad_varlen.
	* scd/scdaemon.c (cmd_and_opt_values): Add oEnableKeypadVarlen.
	(opts, main): Add oEnableKeypadVarlen.
	* scd/ccid-driver.c (GEMPC_PINPAD): New.
	(ccid_transceive_secure): Add enable_varlen handling.
	Enable GEMPC_PINPAD.

2013-01-30  Werner Koch  <wk@gnupg.org>

	Remove unused status codes.
	* common/status.h (STATUS_BEGIN_STREAM, STATUS_END_STREAM)
	(STATUS_SIEXPIRED): Remove unused codes.

	gpg: Add status line PINENTRY_LAUNCHED.
	* common/status.h (STATUS_PINENTRY_LAUNCHED): New.
	* g10/server.c (server_local_s): Add field allow_pinentry_notify.
	(option_handler): Add option "allow-pinentry-notify".
	(gpg_proxy_pinentry_notify): New.
	* g10/call-agent.c (default_inq_cb): Factor code out to the new
	function.

2013-01-25  NIIBE Yutaka  <gniibe@fsij.org>

	agent: Fix a bug of handling return code from npth_join.
	* agent/call-pinentry.c (agent_popup_message_stop): Fix npth_join
	return code.

2013-01-11  Christian Aistleitner  <christian@quelltextlich.at>

	gpg: Fix honoring --cert-digest-algo when recreating a cert.
	* g10/sign.c (update_keysig_packet): Override original signature's
	digest algo in hashed data and for hash computation.

2013-01-11  Werner Koch  <wk@gnupg.org>

	Fix spurious cruft from configure summary output.
	* configure.ac (build_scdaemon_extra): Remove $tmp cruft.

2013-01-11  NIIBE Yutaka  <gniibe@fsij.org>

	SCD: Hold lock for pinpad input.
	* scd/apdu.c (apdu_check_keypad, apdu_keypad_verify)
	(apdu_keypad_modify): Hold lock to serialize communication.

2013-01-08  Werner Koch  <wk@gnupg.org>

	kbx: Switch from MD5 to SHA-1 for the checksum.
	* kbx/keybox-blob.c (put_membuf): Use a NULL buf to store zero bytes.
	(create_blob_finish): Write just the needed space.
	(create_blob_finish): Switch to SHA-1.
	* kbx/keybox-dump.c (print_checksum): New.
	(_keybox_dump_blob): Print the checksum and the verification status.

	gpg: Cache keybox searches.
	* common/iobuf.c (iobuf_seek): Fix for temp streams.
	* g10/pubkey-enc.c (get_session_key, get_it): Add some log_clock calls.
	* g10/keydb.c (dump_search_desc): New.
	(enum_keyblock_states, struct keyblock_cache): New.
	(keyblock_cache_clear): New.
	(keydb_get_keyblock, keydb_search): Implement a keyblock cache.
	(keydb_update_keyblock, keydb_insert_keyblock, keydb_delete_keyblock)
	(keydb_rebuild_caches, keydb_search_reset): Clear the cache.

	Make log_clock easier to read.
	* common/logging.c (log_clock): Print in microseconds.

	gpg: Remove a function wrapper.
	* g10/keydb.h (keydb_search): Remove macro.
	* g10/keydb.c (keydb_search2): Rename to keydb_search.  Change all
	callers.

2013-01-08  NIIBE Yutaka  <gniibe@fsij.org>

	SCD: Support not-so-smart card readers.
	* scd/ccid-driver.c (struct ccid_driver_s): Add auto_voltage,
	auto_param, and auto_pps.
	(parse_ccid_descriptor): Set auto_voltage, auto_param, and auto_pps.
	Support non-autoconf readers.
	(update_param_by_atr): New.
	(ccid_get_atr): Use 5V for PowerOn when auto_voltage is not supported.
	Use 0x10 when nonnull_nad for SetParameters.
	Call update_param_by_atr for parsing ATR, and use param for
	SetParameters.
	Send PPS if reader requires it and card is negotiable.
	When bNadValue in the return values of SetParameters == 0,
	clear handle->nonnull_nad flag.

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

	gpg: Set the node flags while retrieving a keyblock.
	* g10/keydb.c (parse_keyblock_image): Add args PK_NO and UID_NO and
	set the note flags accordingly.
	(keydb_get_keyblock): Transfer PK_NO and UID_NO to parse_keyblock_image.
	* kbx/keybox-search.c (blob_cmp_fpr, blob_cmp_fpr_part)
	(blob_cmp_name, blob_cmp_mail): Return the key/user number.
	(keybox_search): Set the key and user number into the found struct.
	(keybox_get_keyblock): Add args R_PK_NO and R_UID_NO and set them from
	the found struct.

	New function log_clock.
	* common/logging.c (log_clock): New.
	* g10/gpg.c (set_debug): Print clock debug flag.
	* g10/options.h (DBG_CLOCK_VALUE, DBG_CLOCK): New.

	gpg: Allow searching for user ids in a keybox.
	* kbx/keybox-search.c (blob_cmp_name): Add arg X509 and adjust for PGP
	use.  Change callers.
	(blob_cmp_mail): Add arg X509 and find the mailbox offset for PGP.
	Chnage callers.
	(has_subject_or_alt): Rename to has_username.
	(has_username): Allow blobtype PGP.
	(has_mail): Ditto.

	gpg: Allow generation of more than 4096 keys in one run.
	* g10/getkey.c (cache_public_key): Make room in the cache if needed.

2013-01-07  NIIBE Yutaka  <gniibe@fsij.org>

	Update Japanese Translation.
	* po/ja.po: Fix wrong translations for designated revocation.
	Reported by Hideki Saito.

	Conflicts:
		po/ja.po

2013-01-05  NIIBE Yutaka  <gniibe@fsij.org>

	Update Japanese Translation.
	* po/ja.po: Fix fuzzy translations.

2013-01-03  NIIBE Yutaka  <gniibe@fsij.org>

	Update Japanese Translation.
	* po/ja.po: Update with POT.

	Update Japanese Translation.
	* po/ja.po: Start from the new one of 2.0.

2012-12-28  Werner Koch  <wk@gnupg.org>

	gpg: Add signature cache support to the keybox.
	* g10/keydb.c (parse_keyblock_image): Add arg SIGSTATUS.
	(keydb_get_keyblock): Handle it.
	(build_keyblock_image): Add arg SIGSTATUS.
	(keydb_insert_keyblock): Handle it.
	* kbx/keybox-blob.c (pgp_create_sig_part): Add arg SIGSTATUS.
	(_keybox_create_openpgp_blob): Ditto.
	* kbx/kbxutil.c (import_openpgp): Adjust for above change.
	* kbx/keybox.h (KEYBOX_FLAG_SIG_INFO): New.
	* kbx/keybox-search.c (_keybox_get_flag_location): Handle new flag.
	(keybox_get_keyblock): Add arg R_SIGSTATUS.
	* kbx/keybox-update.c (keybox_insert_keyblock): Add arg SIGSTATUS.

	kbxutil: Improve format of the Sig-Expire lines.
	* kbx/keybox-dump.c (_keybox_dump_blob): Print the expirate timestamp.

	gpg: First working support for keyboxes.
	* g10/getkey.c (get_pubkey_fast): Improve the assertion.
	* kbx/keybox.h: Include iobuf.h.
	* kbx/keybox-blob.c (keyboxblob_uid): Add field OFF.
	(KEYBOX_WITH_OPENPGP): Remove use of this macro.
	(pgp_create_key_part_single): New.
	(pgp_temp_store_kid): Change to use the keybox-openpgp parser.
	(pgp_create_key_part): Ditto.
	(pgp_create_uid_part): Ditto.
	(pgp_create_sig_part): Ditto.
	(pgp_create_blob_keyblock): Ditto.
	(_keybox_create_openpgp_blob): Ditto.
	* kbx/keybox-search.c (keybox_get_keyblock): New.
	* kbx/keybox-update.c (keybox_insert_keyblock): New.
	* g10/keydb.c (parse_keyblock_image):
	(keydb_get_keyblock): Support keybox.
	(build_keyblock_image): New.
	(keydb_insert_keyblock): Support keybox.

	* kbx/kbxutil.c (import_openpgp, main): Add option --dry-run and print
	a kbx file to stdout.

	* kbx/keybox-file.c (_keybox_read_blob2): Allow keyblocks up to 10^6
	bytes.

	kbxutil: Print algo number and fold similar lines.
	* kbx/keybox-defs.h (_keybox_openpgp_key_info): Add field ALGO.
	* kbx/keybox-openpgp.c (parse_key): Store algo.
	* kbx/kbxutil.c (dump_openpgp_key): Print algo number.
	* kbx/keybox-dump.c (_keybox_dump_blob): Print identical Sig-Expire
	value lines with a range of indices.

2012-12-27  Werner Koch  <wk@gnupg.org>

	gpg: First patches to support a keybox storage backend.
	* kbx/keybox-defs.h (_keybox_write_header_blob): Move prototype to ..
	* kbx/keybox.h: here.
	* kbx/keybox-init.c (keybox_lock): Add dummy function
	* g10/keydb.c: Include keybox.h.
	(KeydbResourceType): Add KEYDB_RESOURCE_TYPE_KEYBOX.
	(struct resource_item): Add field kb.
	(maybe_create_keyring_or_box): Add error descriptions to diagnostics.
	Add arg IS_BOX.  Write a header for a new keybox file.
	(keydb_add_resource): No more need for the force flag.  Rename the
	local variable "force" to "create".  Add URL scheme "gnupg-kbx".  Add
	magic test to detect a keybox file.  Add basic support for keybox.
	(keydb_new, keydb_get_resource_name, keydb_delete_keyblock)
	(keydb_locate_writable, keydb_search_reset, keydb_search2): Add
	support for keybox.
	(lock_all, unlock_all): Ditto.
	* g10/Makefile.am (needed_libs): Add libkeybox.a.
	(gpg2_LDADD, gpgv2_LDADD): Add KSBA_LIBS as a workaround.

	* g10/keydb.h (KEYDB_RESOURCE_FLAG_PRIMARY)
	KEYDB_RESOURCE_FLAG_DEFAULT, KEYDB_RESOURCE_FLAG_READONLY): New.
	* g10/gpg.c, g10/gpgv.c (main): Use new constants.

2012-12-20  Werner Koch  <wk@gnupg.org>

	gpg: Import only packets which are allowed in a keyblock.
	* g10/import.c (valid_keyblock_packet): New.
	(read_block): Store only valid packets.

2012-12-19  Werner Koch  <wk@gnupg.org>

	gpg: Make commit 2b3cb2ee actually work.
	* g10/sign.c (update_keysig_packet): Use digest_algo.

	(cherry-picked from commit d23ec86095714d388acac14b515445fe69f019e9)

	gpg: Suppress "public key already present" in quiet mode.
	* g10/pkclist.c (find_and_check_key, build_pk_list): Print a
	diagnostic only in non-quiet mode.

2012-12-18  Werner Koch  <wk@gnupg.org>

	common: Add meta option ignore-invalid-option.
	* common/argparse.c (iio_item_def_s, IIO_ITEM_DEF): New.
	(initialize): Init field IIO_LIST.
	(ignore_invalid_option_p): New.
	(ignore_invalid_option_add): New.
	(ignore_invalid_option_clear): New.
	(optfile_parse): Implement meta option.

2012-12-13  Werner Koch  <wk@gnupg.org>
	    Hans of Guardian  <hans@guardianproject.info>

	utf8conv.c: Add hacks for Android.
	* common/utf8conv.c [HAVE_ANDROID_SYSTEM]: Do not include iconv.h.
	(iconv_open, iconv_close, load_libiconv) [HAVE_ANDROID_SYSTEM]: New
	dummy functions.
	(set_native_charset) [HAVE_ANDROID_SYSTEM]: Force use of "utf-8".
	(jnlib_iconv_open) [HAVE_ANDROID_SYSTEM]: Act the same as under W32.
	(jnlib_iconv) [HAVE_ANDROID_SYSTEM]: Ditto.
	(jnlib_iconv_close) [HAVE_ANDROID_SYSTEM]: Ditto.

2012-12-13  NIIBE Yutaka  <gniibe@fsij.org>

	SCD: Fix the process of writing key or generating key.
	* scd/app-openpgp.c (store_fpr): Flush KEY-FPR and KEY-TIME.

2012-12-12  Werner Koch  <wk@gnupg.org>

	ssh: Support ECDSA keys.
	* agent/command-ssh.c (SPEC_FLAG_IS_ECDSA): New.
	(struct ssh_key_type_spec): Add fields CURVE_NAME and HASH_ALGO.
	(ssh_key_types): Add types ecdsa-sha2-nistp{256,384,521}.
	(ssh_signature_encoder_t): Add arg spec and adjust all callers.
	(ssh_signature_encoder_ecdsa): New.
	(sexp_key_construct, sexp_key_extract, ssh_receive_key)
	(ssh_convert_key_to_blob): Support ecdsa.
	(ssh_identifier_from_curve_name): New.
	(ssh_send_key_public): Retrieve and pass the curve_name.
	(key_secret_to_public): Ditto.
	(data_sign): Add arg SPEC and change callers to pass it.
	(ssh_handler_sign_request): Get the hash algo from SPEC.
	* common/ssh-utils.c (get_fingerprint): Support ecdsa.

	* agent/protect.c (protect_info): Add flag ECC_HACK.
	(agent_protect): Allow the use of the "curve" parameter.
	* agent/t-protect.c (test_agent_protect): Add a test case for ecdsa.

	* agent/command-ssh.c (ssh_key_grip): Print a better error code.

2012-12-11  Werner Koch  <wk@gnupg.org>

	ssh: Rewrite a function for better maintainability.
	* agent/command-ssh.c (ssh_signature_encoder_dsa): Rewrite.

2012-12-10  Werner Koch  <wk@gnupg.org>

	ssh: Improve key lookup for many keys.
	* agent/command-ssh.c: Remove dirent.h.
	(control_file_s): Add struct item.
	(rewind_control_file): New.
	(search_control_file): Factor code out to ...
	(read_control_file_item): New.
	(ssh_handler_request_identities): Change to iterate over entries in
	sshcontrol.

	ssh: Cleanup sshcontrol file access code.
	* agent/command-ssh.c (SSH_CONTROL_FILE_NAME): New macro to replace
	the direct use of the string.
	(struct control_file_s, control_file_t): New.
	(open_control_file, close_control_file): New.  Use them instead of
	using fopen/fclose directly.

	agent: Add envvar "gnupg_SSH_AUTH_SOCK_by"
	* agent/gpg-agent.c (main): Pass new envar gnupg_SSH_AUTH_SOCK_by to
	an invoked process.

	config: Update npth.m4.
	* m4/npth.m4: Take from current npth master.

2012-12-04  NIIBE Yutaka  <gniibe@fsij.org>

	Revert SCD changes of 2010-05-03.
	* scd/apdu.c (pcsc_no_service): Remove.
	(open_pcsc_reader_direct, open_pcsc_reader_wrapped): Remove
	pcsc_no_service support.
	(apdu_open_reader): Remove R_NO_SERVICE.
	* scd/apdu.h (apdu_open_reader): Remove R_NO_SERVICE.
	* scd/command.c (reader_disabled): Remove.
	(get_current_reader): Follow the change of R_NO_SERVICE.
	(open_card, cmd_serialno, scd_command_handler): Remove reader_disabled
	support.
	* scd/sc-copykeys.c (main): Follow the change of R_NO_SERVICE.

	Don't keep opening unavailable card reader.
	* scd/command.c (update_reader_status_file): Don't call
	get_current_reader.

2012-11-30  David Shaw  <dshaw@jabberwocky.com>

	Refresh sample keys.

	Adjust awk to not add trailing whitespace.
	* mksamplekeys: Tweak awk script to not add trailing whitespace to
	  blank lines (makes git pre-commit hook unhappy)

2012-11-29  David Shaw  <dshaw@jabberwocky.com>

	The keyserver search menu should honor --keyid-format.
	* keyserver.c (print_keyrec): Honor --keyid-format when getting back
	  full fingerprints from the keyserver (the comment in the code was
	  correct, the code was not).

2012-11-27  Werner Koch  <wk@gnupg.org>

	Fix printing of ECC algo names in hkp keyserver listings.
	* g10/keyserver.c (print_keyrec): Map OpenPGP algorithm ids.

2012-11-26  Ben Kibbey  <bjk@luxsci.net>

	Check for inet_addr() in -lnsl.
	* configure.ac: Check for inet_addr() in libnsl.

2012-11-20  Werner Koch  <wk@gnupg.org>

	Do not use a broken ttyname.
	* configure.ac (HAVE_BROKEN_TTYNAME): New ac_define set for Android
	systems.
	* common/util.h (gnupg_ttyname): New macro.  Change all callers of
	ttyname to use this macro instead.
	(ttyname) [W32]: Rename to _gnupg_ttyname and use also if
	HAVE_BROKEN_TTYNAME is defined.
	* common/simple-pwquery.c (agent_send_all_options): Keep on using
	ttyname unless HAVE_BROKEN_TTYNAME is set.  This is because this file
	may be used standalone.

2012-11-16  Werner Koch  <wk@gnupg.org>

	Fix non-portable use of chmod in autogen.sh.
	* autogen.sh: Remove option -c from chmod.

	Improve parsing of the GIT revision number.
	* configure.ac (mmm4_revision): Use git rev-parse.

	Add an OpenPGP card vendor.
	* g10/card-util.c (get_manufacturer): Add Yubico.

2012-11-06  Werner Koch  <wk@gnupg.org>

	agent: Use wipememory instead of memset in one place.
	* agent/command.c (clear_outbuf): Use wipememory.  Suggested by Ben
	Kibbey.

	Allow decryption with card keys > 3072 bits.
	* scd/command.c (MAXLEN_SETDATA): New.
	(cmd_setdata): Add option --append.
	* agent/call-scd.c (agent_card_pkdecrypt): Use new option for long
	data.

	* scd/app-openpgp.c (struct app_local_s): Add field manufacturer.
	(app_select_openpgp): Store manufacturer.
	(do_decipher): Print a note for broken cards.

2012-11-02  NIIBE Yutaka  <gniibe@fsij.org>

	agent: Fix wrong use of gcry_sexp_build_array.
	* findkey.c (agent_public_key_from_file): Fix use of
	gcry_sexp_build_array.

2012-10-31  NIIBE Yutaka  <gniibe@fsij.org>

	SCD: Upon error, open_pcsc_reader_wrapped does same as _direct.
	* scd/apdu.c (PCSC_E_NO_SERVICE): New.
	(open_pcsc_reader_direct): Use PCSC_E_NO_SERVICE.
	(open_pcsc_reader_wrapped): Set pcsc_no_service.

2012-08-24  Werner Koch  <wk@gnupg.org>

	Update and enable French translation.
	* po/fr.po: Update.
	* po/LINGUAS: Enable fr.

2012-08-24  David Prévot  <taffit@debian.org>

	Fix typos spotted during translations.
	* agent/genkey.c: s/to to/to/
	* sm/*.c: s/failed to allocated/failed to allocate/
	* sm/certlist.c, ./dirmngr/validate.c: s/should have not/should not have/
	* g10/seskey.c: missing closing parenthesis
	* dirmngr/crlcache.c: s/may has/may have/

	Consistency fix:

	* g10/gpg.c, kbx/kbxutil.c, sm/gpgsm.c: uppercase after Syntax
	* dirmngr/dirmngr_ldap: no period in Syntax
	* dirmngr/dirmngr-client.c: infinitive for option description:
		s/certificates are expected/expect certificates/

	Keep previous msgids of translated messages.
	* po/Makefile.in.in: Use --previous with msgmerge.

2012-08-24  Hans-Christoph Steiner  <hans@eds.org>

	Fix build system for Android by disabling tests since its x-compiled.
	* configure.ac (HAVE_ANDROID_SYSTEM, RUN_TESTS): New.
	(AH_BOTTOM) [__ANDROID__]: Do not re-define ttyname.
	* Makefile.am: Depend tests on new RUN_TESTS conditional.

2012-08-24  Werner Koch  <wk@gnupg.org>

	Fix left over use of jnlib on some platforms.
	* tools/watchgnupg.c: Take mischelp.h from common/ and not jnlib/.

2012-06-25  NIIBE Yutaka  <gniibe@fsij.org>

	scd: handle reader/token removal.
	* scd/apdu.c (pcsc_error_to_sw): PCSC_E_UNKNOWN_READER means
	SW_HOST_NO_READER.

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

	Change all quotes in strings and comments to the new GNU standard.
	The asymmetric quotes used by GNU in the past (`...') don't render
	nicely on modern systems.  We now use two \x27 characters ('...').

	The proper solution would be to use the correct Unicode symmetric
	quotes here.  However this has the disadvantage that the system
	requires Unicode support.  We don't want that today.  If Unicode is
	available a generated po file can be used to output proper quotes.  A
	simple sed script like the one used for en@quote is sufficient to
	change them.

	The changes have been done by applying

	  sed -i "s/\`\([^'\`]*\)'/'\1'/g"

	to most files and fixing obvious problems by hand.  The msgid strings in
	the po files were fixed with a similar command.

2012-05-24  Werner Koch  <wk@gnupg.org>

	Print the hash algorithm in colon mode key listing.
	* g10/keylist.c (list_keyblock_colon): Print digest_algo.

	Fix type conflict warning.
	* g10/keylist.c: Change min_cert_level to a byte.

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

	Switch to the new automagic beta numbering scheme.
	* configure.ac: Add all the require m4 magic.

2012-05-08  Werner Koch  <wk@gnupg.org>

	Add tweaks for the not anymore patented IDEA algorithm.
	* g10/keygen.c (keygen_set_std_prefs): Include IDEA only in PGP2
	compatibility mode.
	* g10/misc.c (idea_cipher_warn): Remove.  Also remove all callers.
	* common/status.h (STATUS_RSA_OR_IDEA): Remove.  Do not emit this
	status anymore.

	po: Update de.po.
	* po/de.po: Update.

	common: Remove generated files only during maintainer-clean.
	* common/Makefile.am (CLEANFILES): Rename to MAINTAINERCLEANFILES.

2012-04-30  Werner Koch  <wk@gnupg.org>

	agent: Fix deadlock in trustlist due to the switch to npth.
	* agent/trustlist.c (clear_trusttable): New.
	(agent_reload_trustlist): Use new function.
	(read_trustfiles): Require to be called with lock held.
	(agent_istrusted): Factor all code out to ...
	(istrusted_internal): new.  Add ALREADY_LOCKED arg.  Make sure the
	table islocked.  Do not print TRUSTLISTFLAG stati if called internally.
	(agent_marktrusted): Replace calls to agent_reload_trustlist by
	explicit code.

2012-04-26  NIIBE Yutaka  <gniibe@fsij.org>

	make DNS and URI fields work in gpgsm --gen-key.
	* sm/certreqgen-ui.c (gpgsm_gencertreq_tty): Actually set mb_uri and
	mb_dns.avoid buffer strncpy-induced buffer overrun

2012-04-26  Jim Meyering  <jim@meyering.net>

	avoid buffer strncpy-induced buffer overrun.
	* dirmngr/crlcache.c (open_dir): Ensure that both this_update
	and next_update member strings are NUL-terminated.

	remove doubled words in a comment.

2012-04-20  Werner Koch  <wk@gnupg.org>

	Change license for some files in common to LGPLv3+/GPLv2+.
	Having the LGPL on the common GnuPG code helps to share code
	between GnuPG and related projects (like GPGME and Libassuan).  This
	is good for interoperability and to reduces bugs.

	* common/asshelp.c, common/asshelp.h, common/asshelp2.c, common/b64dec.c
	* common/b64enc.c, common/convert.c, common/dns-cert.c
	* common/dns-cert.h common/exechelp-posix.c, common/exechelp-w32.c
	* common/exechelp-w32ce.c, common/exechelp.h, common/get-passphrase.c
	* common/get-passphrase.h, common/gettime.c, common/gpgrlhelp.c
	* common/helpfile.c, common/homedir.c, common/http.c, common/http.h
	* common/i18n.c, common/init.c, common/init.h, common/iobuf.c
	* common/iobuf.h, common/localename.c, common/membuf.c, common/membuf.h
	* common/miscellaneous.c, common/openpgp-oid.c, common/openpgpdefs.h
	* common/percent.c, common/pka.c, common/pka.h, common/session-env.c
	* common/session-env.h, common/sexp-parse.h, common/sexputil.c
	* common/signal.c, common/srv.c, common/srv.h, common/ssh-utils.c
	* common/ssh-utils.h, common/sysutils.c, common/sysutils.h
	* common/tlv.c, common/tlv.h, common/ttyio.c, common/ttyio.h
	* common/userids.c, common/userids.h, common/xasprintf.c: Change
	license to LGPLv3+/GPLv2+/

2012-04-10  Ben Kibbey  <bjk@luxsci.net>

	Fix killing PID -1.
	When the KILLSCD command had been sent a race condition would occur
	causing PID -1 getting killed, which on Linux seems to terminate all
	applications for the current user.

2012-04-05  Werner Koch  <wk@gnupg.org>

	Do not mix test result with progress lines.
	This makes parsing of the results easier.  Fixes bug#1400.

	* tests/openpgp/defs.inc (progress_cancel, progress_end)
	(progress_new): New.
	* tests/openpgp/conventional-mdc.test: Use progress functions
	* tests/openpgp/conventional.test: Ditto.
	* tests/openpgp/encrypt-dsa.test: Ditto.
	* tests/openpgp/encrypt.test: Ditto.
	* tests/openpgp/sigs.test: Ditto.

2012-04-04  Ben Kibbey  <bjk@luxsci.net>

	Mention status messages in the documentation.
	Note INQUIRE_MAXLEN.

	Document PASSWD --preset.

	Document GENKEY options.

	Document PRESET_PASSPHRASE.

	Document CLEAR_PASSPHRASE.
	And describe the --mode=normal option.

2012-03-27  Werner Koch  <wk@gnupg.org>

	Fix timegm regression test.
	* common/t-timestuff.c (test_timegm): Change test to use January and
	not February or December+1.  Bug spotted by Daniel Kahn Gillmor.

	Print warning for arguments not considered an option.
	GnuPG requires that options are given before other arguments.  This
	can sometimes be confusing.  We now print a warning if we found an
	argument looking alike a long option without being preceded by the
	stop option.  This is bug#1343.

	* common/argparse.h (ARGPARSE_FLAG_STOP_SEEN): New.
	* common/argparse.c (arg_parse): Set new flag.
	* g10/gpg.c (main): Print the warning.
	* agent/gpg-agent.c (main): Ditto.
	* dirmngr/dirmngr.c (main): Ditto.
	* g13/g13.c (main): Ditto.
	* scd/scdaemon.c (main): Ditto.
	* sm/gpgsm.c (main): Ditto.
	* tools/gpg-connect-agent.c (main): Ditto.
	* tools/gpgconf.c (main): Ditto.

2012-03-26  Werner Koch  <wk@gnupg.org>

	Allow compress algorithm 0.
	* g10/mainproc.c (proc_compressed): Remove superfluous check for
	compress algorithm 0.  Reported by pfandrade.  This is bug#1326.

	Add mksamplekeys script.
	* doc/mksamplekeys: New.

2012-02-28  Marcus Brinkmann  <mb@g10code.com>

	Replace npth_yield in busy wait by npth_usleep.
	* dirmngr/ldap-wrapper.c (ldap_wrapper_wait_connections): Call
	npth_usleep instead of npth_yield.

2012-02-16  Marcus Brinkmann  <mb@g10code.com>

	Check for lber and link dirmngr_ldap to it.
	* configure.ac (LBER_LIBS, HAVE_LBER): New variables, check for lber.
	* dirmngr/Makefile.am (dirmngr_lda_LDADD): Add $(LBER_LIBS).

2012-02-07  Werner Koch  <wk@gnupg.org>

	agent: Add pin length field to the shadowed private key format.
	This is not yet fully implemented.  It will eventually allow to
	support pinpad equipped readers which do not support variable length
	pin lengths.
	* agent/protect.c (parse_shadow_info): Add optional arg R_PINLEN and
	parse pinlen info.  Change all callers to pass NULL for it.

	Use new status printing functions.
	* agent/command.c (cmd_geteventcounter): Get rid of static buffers.
	* scd/command.c (cmd_serialno, cmd_learn): Simplify by using
	print_assuan_status.

	agent: New function agent_print_status.
	* common/asshelp2.c (vprint_assuan_status): New.
	(print_assuan_status): Re-implement using above func.
	* agent/command.c (agent_print_status): New.

	po: Add Ukrainian translation.
	* po/uk.po: New.

	common: Replace macro based function calls by using DEFAULT_ERRSOURCE.
	* common/dns-cert.h (get_dns_cert): Remove macro.
	* common/dns-cert.c (_get_dns_cert): Rename to get_dns_cert.  Replace
	arg ERRSOURCE by global DEFAULT_ERRSOURCE.
	* common/http.h (http_parse_uri, http_raw_connect, http_open)
	(http_open_document, http_wait_response): Remove macros.
	* common/http.c (_http_parse_uri, _http_raw_connect, _http_open)
	(_http_open_document, _http_wait_response): Remove underscore from
	symbols.  Replace args ERRSOURCE by global DEFAULT_ERRSOURCE.
	* common/ssh-utils.h (ssh_get_fingerprint)
	(ssh_get_fingerprint_string): Remove macros.
	* common/ssh-utils.h (_ssh_get_fingerprint)
	(_ssh_get_fingerprint_string): Remove underscore from symbols.
	Replace args ERRSOURCE by global DEFAULT_ERRSOURCE.
	* common/tlv.h (parse_ber_header, parse_sexp): Remove macros.
	* common/tlv.c: Include util.h.
	(_parse_ber_header, _parse_sexp): Remove underscore from symbols.
	Replace args ERRSOURCE by global DEFAULT_ERRSOURCE.

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

	Add replacement hack for Android's broken ttyname.
	* configure.ac (HAVE_TTYNAME) [__ANDROID__]: Add hack.

	agent: Simplify printing of INQUIRE_MAXLEN.
	* agent/command.c: Include asshelp.h.
	(cmd_pkdecrypt, cmd_genkey, cmd_preset_passphrase)
	(pinentry_loopback): Use print_assuan_status for INQUIRE_MAXLEN.

	common: Add function print_assuan_status.
	* common/asshelp2.c: New.
	(print_assuan_status): New function.
	* common/Makefile.am (common_sources): Add asshelp2.c.

	common: Add a global variable to for the default error source.
	For the shared code parts it is cumbersome to pass an error sourse
	variable to each function.  Its value is always a constant for a given
	binary and thus a global variable makes things a lot easier than the
	former macro stuff.
	* common/init.c (default_errsource): New global var.
	(init_common_subsystems): Rename to _init_common_subsystems.  Set
	DEFAULT_ERRSOURCE.
	* common/init.h: Assert value of GPG_ERR_SOURCE_DEFAULT.
	(init_common_subsystems): New macro.
	* common/util.h (default_errsource): Add declaration.
	* kbx/keybox-defs.h: Add some GPG_ERR_SOURCE_DEFAULT trickery.

2012-02-03  Ben Kibbey  <bjk@luxsci.net>

	Also let GENKEY and PKDECRYPT send the INQUIRE_MAXLEN status message.
	* agent/command.c (cmd_pkdecrypt): Send the INQUIRE_MAXLEN status
	message before doing the inquire.
	(cmd_genkey): Ditto.

2012-02-02  Ben Kibbey  <bjk@luxsci.net>

	Inform the client of the preset passphrase length.
	* agent/command.c (cmd_preset_passphrase): Send the INQUIRE_MAXLEN
	status message before inquiring the passphrase.

2012-02-01  David Shaw  <dshaw@jabberwocky.com>

	Honor --cert-digest-algo when recreating a cert.
	* g10/sign.c (update_keysig_packet): Honor --cert-digest-algo when
	  recreating a cert.

	This is used by various things in --edit-key like setpref, primary,
	etc.  Suggested by Christian Aistleitner.

2012-01-27  Werner Koch  <wk@gnupg.org>

	gl: Add support for Android to stdint.h replacement.
	* gl/stdint_.h: When included from Bionic <sys/types.h>, just include
	the system's <stdint.h>.

	gpg-connect-tool: Take the string "true" as a true condition.
	* tools/gpg-connect-agent.c (main): Handle strings "true" and "yes" in
	conditions as expected.

2012-01-26  Ben Kibbey  <bjk@luxsci.net>

	Return GPG_ERR_CARD_NOT_PRESENT when pinentry-mode=loopback.
	Since there isn't a way to prompt the user to insert the smartcard when
	pinentry-mode=loopback, return GPG_ERR_CARD_NOT_PRESENT instead of
	GPG_ERR_NO_PIN_ENTRY.

	* agent/divert-scd.c (ask_for_card): Return GPG_ERR_CARD_NOT_PRESENT
	when pinentry-mode=loopback.

	Also check for GPG_ERR_ASS_CANCELED during an inquire.
	Fix pinentry-mode=loopback when cancelling an inquire from scdaemon.
	This is similar to commit 4f21f8d but for both protocol command
	cancellation and pinentry cancellation.

	* agent/call-scd.c (agent_card_pkdecrypt): Check for
	GPG_ERR_ASS_CANCELED.
	(agent_card_pksign): Ditto.

2012-01-25  Werner Koch  <wk@gnupg.org>

	nPth is now a hard requirement for GnuPG.
	* configure.ac: Remove cruft to allow building without npth.

	Require libassuan 2.1.0.
	* configure.ac (NEED_LIBASSUAN_VERSION): Set to 2.1.0.  This is due to
	the npth changes.

	Fix strerror vs. gpg_strerror usage.
	This bug was introduced by the migration to npth.
	* agent/gpg-agent.c (handle_connections): Use strerror.

	Add missing variable.
	* agent/gpg-agent.c (handle_connections) [!W32]: Add missing variable.

2012-01-25  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>

	Port LDAP wrapper to NPTH.
	* agent/gpg-agent.c (handle_connections): Handle error.
	* dirmngr/dirmngr_ldap.c, dirmngr/ldap-wrapper-ce.c: Port to NPTH.

	Port Windows code to NPTH.
	* agent/gpg-agent.c (get_agent_ssh_socket_name): Use
	INVALID_HANDLE_VALUE instead of 0.
	(handle_signal) [!HAVE_W32_SYSTEM]: Don't define.
	(handle_connections): Port Windows code to NPTH.
	* dirmngr/dirmngr.c (handle_connections): Port Windows code to NPTH.
	* g13/g13.c (handle_connections): Port Windows code to NPTH.
	* scd/scdaemon.c (handle_connections): Port Windows code to NPTH.

	Port to npth.
	* configure.ac: Don't check for PTH but for NPTH.
	(AH_BOTTOM): Remove PTH_SYSCALL_SOFT.
	(have_pth): Rename to ...
	(have_npth): ... this.
	(USE_GNU_NPTH): Rename to ...
	(USE_GNU_PTH): ... this.
	* m4/npth.m4: New file.
	* agent/Makefile.am, agent/cache.c, agent/call-pinentry.c,
	agent/call-scd.c, agent/findkey.c, agent/gpg-agent.c,
	agent/trustlist.c, common/Makefile.am, common/estream.c,
	common/exechelp-posix.c, common/exechelp-w32.c,
	common/exechelp-w32ce.c, common/http.c, common/init.c,
	common/sysutils.c, dirmngr/Makefile.am, dirmngr/crlfetch.c,
	dirmngr/dirmngr.c, dirmngr/dirmngr_ldap.c, dirmngr/ldap-wrapper-ce.c,
	dirmngr/ldap-wrapper.c, dirmngr/ldap.c, g13/Makefile.am,
	g13/call-gpg.c, g13/g13.c, g13/runner.c, scd/Makefile.am,
	scd/apdu.c, scd/app.c, scd/ccid-driver.c, scd/command.c,
	scd/scdaemon.c, tools/Makefile.am: Port to npth.

2012-01-25  Werner Koch  <wk@gnupg.org>

	Require gitlog-to-changelog to be installed.
	* Makefile.am (GITLOG_TO_CHANGELOG): New.
	(gen-ChangeLog): Use installed version of gitlog-to-changelog.

2012-01-20  David Shaw  <dshaw@jabberwocky.com>

	Changes to --min-cert-level should cause a trustdb rebuild (issue 1366)
	* g10/gpgv.c, g10/trustdb.c (read_trust_options): Add min_cert_level

	* g10/trustdb.c (check_trustdb_stale): Request a rebuild if
	  pending_check_trustdb is true (set when we detect a trustdb
	  parameter has changed).

	* g10/keylist.c (public_key_list): Use 'l' in the "tru" with-colons
	  listing for min_cert_level not matching.

	* g10/tdbio.c (tdbio_update_version_record, create_version_record,
	  tdbio_db_matches_options, tdbio_dump_record, tdbio_read_record,
	  tdbio_write_record): Add a byte for min_cert_level in the tdbio
	  version record.

2012-01-20  Werner Koch  <wk@gnupg.org>

	estream: Fix unclean usage of realloc.
	* common/estream-printf.c (_ESTREAM_PRINTF_MALLOC): Remove.
	(_ESTREAM_PRINTF_FREE): Remove.
	(_ESTREAM_PRINTF_REALLOC): New.
	(fixed_realloc) [!_ESTREAM_PRINTF_REALLOC]): New.
	(estream_vasprintf): Use my_printf_realloc instead of my_printf_malloc
	and my_printf_free.
	(dynamic_buffer_out): Use my_printf_realloc instead of realloc.

	Do not copy default merge commit log entries into the ChangeLog.
	* scripts/gitlog-to-changelog: Skip merge commits.

2012-01-18  Ben Kibbey  <bjk@luxsci.net>

	Add the INQUIRE_MAXLEN status message.
	This status message is used to inform the client of the maximum length
	of an inquired passphrase and is used in pinentry-mode=loopback.

	* agent/command.c (pinentry_loopback): Send the INQUIRE_MAXLEN status
	message before doing the inquire.

2012-01-16  Jim Meyering  <meyering@redhat.com>

	yat2m: don't dereference pointer to freed memory.
	* doc/yat2m.c (top_parse_file): Correct macrolist-freeing loop.

	gpg-agent: fix lc-messages handling not to change Xauthority setting.
	* agent/gpg-agent.c (main): Supply omitted "break" statement for
	lc-messages option.  Otherwise, control would fall through to the
	following oXauthority case and use the same value there.

2012-01-15  Werner Koch  <wk@gnupg.org>

	Fix indentation.

2012-01-14  Ben Kibbey  <bjk@luxsci.net>

	Fix scdaemon pinentry inquire cancelation.
	Similar to commit 29af488 but also fixes PKDECRYPT and PKSIGN.

	* agent/call-scd.c (agent_card_pkdecrypt): Check for GPG_ERR_CANCELED
	when returning from the PKDECRYPT operation of scdaemon and cancel the
	inquire.
	(agent_card_pksign): Ditto.
	(cancel_inquire): New.

2012-01-11  Werner Koch  <wk@gnupg.org>

	gpg: Fix segv with RSA_S keys.
	* g10/misc.c (pubkey_get_npkey, pubkey_get_nskey)
	(pubkey_get_nsig, pubkey_get_nenc): Map all RSA algo ids to
	GCRY_PK_RSA.

	estream: Avoid printing leading zeroes by %p on 32 bit systems.
	* common/estream-printf.c (pr_pointer): Synchronize definition of
	AULONG with its use.

2012-01-11  David Shaw  <dshaw@jabberwocky.com>

	Refresh sample keys.

2012-01-10  David Shaw  <dshaw@jabberwocky.com>

	Adapt HKP fix for fingerprint/long keyid retrievals for dirmngr.
	* dirmngr/ks-engine-hkp.c (ks_hkp_get): Use the longest valid keyid form

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

	gpg: Make the double space in the middle of a fingerprint optional.
	This change might help to c+p a fingerprint from an HTML page without
	being enclosed in a "pre" tag.
	* common/userids.c (classify_user_id): Skip a second blank in the
	middle of a fingerprint.

	gpg: Allow use of a standard space separated fingerprint.
	* common/userids.c (classify_user_id): Check for space separated GPG
	fingerprint.

2012-01-06  NIIBE Yutaka  <gniibe@fsij.org>

	Merge ccid_driver_improvement branch.
	* scd/apdu.c (ccid_keypad_operation): Rename from ccid_keypad_verify.
	(open_ccid_reader): Use ccid_keypad_operation for verify and modify.

	* scd/ccid-driver.c (VENDOR_VASCO, VASCO_920): New.
	(ccid_transceive_apdu_level): Permit sending packet where
	apdulen <= 289.  Support receiving packets in a chain.
	(ccid_transceive_secure): Maximum is 15 for VASCO DIGIPASS 920.
	Support keypad_modify method such as CHANGE_REFERENCE_DATA: 0x24.

2012-01-03  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>

	Silence gcc warning.
	* sm/call-dirmngr.c (get_cached_cert): Make sure buflen is initialized.

	Revert last change, add comment about link() return values.
	* common/dotlock.c (use_hardlinks_p, dotlock_take_unix): Do not check
	return value of link().

	Fix compiler warnings.
	* common/dotlock.c (use_hardlinks_p, dotlock_take_unix): Check return
	value of link().
	* g13/g13.c: Make sure err is initialized.
	* scd/scdaemon.c (main) [!USE_GCRY_THREAD_CBS]: Do not define ERR.

	Fix last change: Only set gcrypt thread callback for older versions.
	* dirmngr/dirmngr.c, g13/g13.c: Rename FIX_GCRY_PTH_INIT to
	USE_GCRY_THREAD_CBS.

2012-01-03  Werner Koch  <wk@gnupg.org>

	Terminate csh commands with a semicolon also for dirmngr.
	* dirmngr/dirmngr.c (main): Terminate csh style output with a semicolon.

	Terminate csh commands with a semicolon.
	Fixes bug#1386.

	* agent/gpg-agent.c (main): Terminate csh style output with a semicolon.
	* scd/scdaemon.c: Ditto.

2012-01-02  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>

	Only set gcrypt thread callback for older version of gcrypt.
	* agent/gpg-agent.c, dirmngr/dirmngr.c, g13/g13.c, scd/scdaemon.c
	(USE_GCRY_THREAD_CBS): New macro, defined if
	GCRY_THREAD_OPTION_VERSION is 0.
	(fixed_gcry_pth_init) [!USE_GCRY_THREAD_CBS]: Don't define.
	(main) [!USE_GCRY_THREAD_CBS]: Do not install thread callbacks.

2011-12-28  David Shaw  <dshaw@jabberwocky.com>

	Use the longest key ID available when talking to a HKP server.
	This is issue 1340.  Now that PKSD is dead, and SKS supports long key
	IDs, this is safe to do.  Patch from Daniel Kahn Gillmor
	<dkg@fifthhorseman.net>.

2011-12-20  Werner Koch  <wk@gnupg.org>

	Post-release version number update.

	Release 2.1.0beta3.

	Prepare for the beta3 release.

	po: Update the German translation.

	Add the STEED Self-Signing Nonthority certificate.
	* doc/com-certs.pem: Install it when creating a keybox.

	faq: Add section on US export restrictions.

	Require Libassuan 2.0.3.
	* configure.ac: Require Libassuan 2.0.3.
	* agent/call-scd.c (ASSUAN_CONVEY_COMMENTS): Remove macro replacement.
	* agent/command.c (cmd_killagent) [ASSUAN_FORCE_CLOSE]: Remove
	dependency.
	(cmd_killagent) [ASSUAN_FORCE_CLOSE]: Ditto.
	* scd/command.c (cmd_killscd) [ASSUAN_FORCE_CLOSE]: Ditto.

2011-12-20  NIIBE Yutaka  <gniibe@fsij.org>

	Add error log and debug log for pcsc_keypad_verify and pcsc_keypad_modify.
	* scd/apdu.c (pcsc_keypad_verify): Add debug log and error log.
	(pcsc_keypad_modify): Likewise.

2011-12-19  Werner Koch  <wk@gnupg.org>
	    Ben Kibbey  <bjk@luxsci.net>

	scd: Fix for card change returning GPG_ERR_CARD_RESET.
	* scd/apdu.c (apdu_connect): Do not test for zero atrlen.

2011-12-16  NIIBE Yutaka  <gniibe@fsij.org>

	Don't kill pinentry by SIGKILL but let it quit by SIGINT.
	* agent/call-pinentry.c (agent_popup_message_stop): To pinentry, send
	SIGINT (was: SIGKILL).

2011-12-15  David Shaw  <dshaw@jabberwocky.com>

	Merge fix for issue 1331 from 1.4.
	* photoid.c (generate_photo_id): Check for the JPEG magic numbers
	instead of JFIF since some programs generate an EXIF header first.

2011-12-15  Werner Koch  <wk@gnupg.org>

	scd: Prefer application Geldkarte over DINSIG.
	* scd/app.c (select_application): Reorder application tests.

	scd: Add option --dump-atr to command APDU.
	* scd/atr.c: Rewrite.
	* scd/Makefile.am (scdaemon_SOURCES): Add atr.c and atr.h.
	* scd/command.c (cmd_apdu): Add option --dump-atr.

	estream: New function es_fclose_snatch.
	* common/estream.c (cookie_ioctl_function_t): New type.
	(es_fclose_snatch): New function.
	(COOKIE_IOCTL_SNATCH_BUFFER): New constant.
	(struct estream_internal): Add field FUNC_IOCTL.
	(es_initialize): Clear FUNC_IOCTL.
	(es_func_mem_ioctl): New function.
	(es_fopenmem, es_fopenmem_init): Init FUNC_IOCTL.

2011-12-14  Werner Koch  <wk@gnupg.org>

	scd: Skip S/N reading for the "undefined" application.
	* scd/app.c (select_application): Skip serial number reading.

	scd: Add more status word values for documentation.

	scd: Add the "undefined" stub application.
	* scd/app.c (select_application): Implement the "undefined"
	application.

	agent: Pass comment lines from scd verbatim thru gpg-agent.
	* agent/call-scd.c (pass_status_thru): Pass comment lines verbatim.
	* tools/gpg-connect-agent.c (help_cmd_p): New.
	(main): Treat an "SCD HELP" the same as "HELP".

	scd: Fix resetting and closing of the reader.
	* scd/command.c (update_card_removed): Do no act on an invalid VRDR.
	(do_reset): Ignore apdu_reset error codes for no and inactive card.
	Close the reader before setting the slot to -1.
	(update_reader_status_file): Notify the application before closing the
	reader.

	scd: Add debug option for reader function calls.
	* scd/scdaemon.h (DBG_READER_VALUE, DBG_READER): New.
	* scd/apdu.c (apdu_open_reader, apdu_close_reader)
	(apdu_shutdown_reader, apdu_connect, apdu_disconnect)
	(apdu_reset, apdu_get_atr, apdu_get_status): Add debug code.
	(apdu_activate): Remove this unused function.

2011-12-13  Werner Koch  <wk@gnupg.org>

	scd: New option --debug-assuan-log-cats.
	* scd/scdaemon.c (oDebugAssuanLogCats): New.
	(opts): Add option --debug-assuan-log-cats.
	(main): Implement option.
	* common/asshelp.c (set_libassuan_log_cats): New.

	scd: Introduce a virtual reader table.
	The vreader table makes the code more clear by explicitly talking
	about APDU slots and reader indices.  It also accommodates for future
	extensions.

	* scd/scdaemon.h (server_control_s): Remove READER_SLOT.
	* scd/scdaemon.c (scd_init_default_ctrl): Do not init READER_SLOT.
	* scd/app.c (check_application_conflict): Add arg SLOT.
	* scd/command.c (slot_status_s): Rename to vreader_s.
	(server_local_s): Add field VREADER_IDX as replacement for
	the READER_SLOT in server_control_s.  Change all users.
	(slot_table): Rename to vreader_table.  Change all users.
	(vreader_slot): New.
	(do_reset, cmd_apdu): Map vreader to apdu slot.
	(get_reader_slot): Rename to get_current_reader.  Return -1 on error.
	(open_card): Map vreader toapdu slot.  Pass slot to
	check_application_conflict.
	(scd_command_handler): Init VREADER_IDX.
	(update_reader_status_file): Reset SLOT field on error.

2011-12-12  Werner Koch  <wk@gnupg.org>

	scd: Retry command SERIALNO for an inactive card.
	* scd/command.c (cmd_serialno): Retry once for an inactive card.

	Fix detection of card removal and insertion.
	* scd/apdu.c (apdu_connect): Return status codes for no card available
	and inactive card.
	* scd/command.c (TEST_CARD_REMOVAL): Also test for GPG_ERR_CARD_RESET.
	(open_card): Map apdu_connect status to GPG_ERR_CARD_RESET.

	gitlog-to-changelog: New option --tear-off.
	* scripts/gitlog-to-changelog: Add option --tear-off.
	* Makefile.am (gen-ChangeLog): Use that option.

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

	gpgsm: Add new validation model "steed".
	* sm/gpgsm.h (VALIDATE_FLAG_STEED): New.
	* sm/gpgsm.c (gpgsm_parse_validation_model): Add model "steed".
	* sm/server.c (option_handler): Allow validation model "steed".
	* sm/certlist.c (gpgsm_cert_has_well_known_private_key): New.
	* sm/certchain.c (do_validate_chain): Handle the
	well-known-private-key attribute.  Support the "steed" model.
	(gpgsm_validate_chain): Ditto.
	* sm/verify.c (gpgsm_verify): Return "steed" in the trust status line.
	* sm/keylist.c (list_cert_colon): Print the new 'w' flag.

	Correct punctuation in the ChangeLog summary line.
	* Makefile.am (gen-ChangeLog): Supply --append-dot.

	Allow comments which will not show up in the ChangeLog.
	* scripts/gitlog-to-changelog: Ignore lines after a "--" line.

2011-12-06  Werner Koch  <wk@gnupg.org>

	gpgsm: Allow specification of an AuthorityKeyIdentifier.
	* sm/certreqgen.c (pAUTHKEYID): New.
	(read_parameters): Add keyword Authority-Key-Id.
	(proc_parameters): Check its value.
	(create_request): Insert an Authority-Key-Id.

	gpgsm: Allow arbitrary extensions for cert creation.
	* sm/certreqgen.c (pSUBJKEYID, pEXTENSION): New.
	(read_parameters): Add new keywords.
	(proc_parameters): Check values of new keywords.
	(create_request): Add SubjectKeyId and extensions.
	(parse_parameter_usage): Support "cert" and the encrypt alias "encr".

	gpgsm: Fix storing of the serial number.
	* sm/certreqgen.c (create_request): Fix hex-bin conversion.

2011-12-05  Werner Koch  <wk@gnupg.org>

	Fix last change.
	* agent/command.c (start_command_handler): Remove use of removed var.

	Amend the agent code with more comments.
	* agent/command.c (server_local_s): Remove unused field MESSAGE_FD.

2011-12-02  Werner Koch  <wk@gnupg.org>

	Support the Cherry ST-2000 card reader.
	* scd/ccid-driver.c (SCM_SCR331, SCM_SCR331DI, SCM_SCR335)
	(SCM_SCR3320, SCM_SPR532, CHERRY_ST2000): New constants.
	(parse_ccid_descriptor): Use them.
	(scan_or_find_usb_device, ccid_transceive_secure): Handle Cherry
	ST-2000.  Suggested by Matthias-Christian Ott.

	Avoid possible double free in export.c.
	* g10/export.c (transfer_format_to_openpgp): Avoid possible double
	  free of LIST.  Reported by NIIBE Yutaka.

2011-12-02  NIIBE Yutaka  <gniibe@fsij.org>

	Fix pinpad input support for passphrase modification.
	* apdu.c (pcsc_keypad_verify): Have dummy Lc field with value 0.
	(pcsc_keypad_modify): Likewise.
	(pcsc_keypad_modify): It's only for ISO7816_CHANGE_REFERENCE_DATA.
	bConfirmPIN value is determined by the parameter p0.

	* app-openpgp.c (do_change_pin): The flag use_keypad should be 0 when
	reset_mode is on, or resetcode is on.  use_keypad only makes sense for
	iso7816_change_reference_data_kp.

	* iso7816.h (iso7816_put_data_kp): Remove.
	(iso7816_reset_retry_counter_kp): Remove.
	(iso7816_reset_retry_counter_with_rc_kp): Remove.
	(iso7816_change_reference_data_kp): Add an argument: IS_EXCHANGE.

	* iso7816.c (iso7816_put_data_kp): Remove.
	(iso7816_reset_retry_counter_kp): Remove.
	(iso7816_reset_retry_counter_with_rc_kp): Remove.
	(iso7816_change_reference_data_kp): Add an argument: IS_EXCHANGE.

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

	Add hook to check the commit log syntax.
	* autogen.sh: Install commit-msg hook for git.

	Generate the ChangeLog from commit logs.
	* scripts/gitlog-to-changelog: New script.  Taken from gnulib.
	* scripts/git-log-fix: New file.
	* scripts/git-log-footer: New file.
	* doc/HACKING: Describe the ChangeLog policy
	* ChangeLog: New file.
	* Makefile.am (EXTRA_DIST): Add new files.
	(gen-ChangeLog): New.
	(dist-hook): Run gen-ChangeLog.

	Rename all ChangeLog files to ChangeLog-2011.

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

	NB: Changes done before December 1st, 2011 are described in
	per directory files named ChangeLog-2011.  See doc/HACKING for
	details.

        -----
	Copyright (C) 2011 Free Software Foundation, Inc.

	Copying and distribution of this file and/or the original GIT
	commit log messages, with or without modification, are
	permitted provided the copyright notice and this notice are
	preserved.
