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.
