aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Flag the L_() function with attribute format_arg.Werner Koch2015-06-304-3/+26
| | | | | | | | | | | | * agent/agent.h (LunderscorePROTO): New. * common/util.h (GNUPG_GCC_ATTR_FORMAT_ARG): New. * common/i18n.h (GNUPG_GCC_ATTR_FORMAT_ARG): New. Use for i18n_localegettext. Expand LunderscorePROTO. * agent/genkey.c (check_passphrase_constraints): Use xtryasprintf again to keep the old translations. -- Signed-off-by: Werner Koch <[email protected]>
* agent: Use different translation func for Pinentry strings.Werner Koch2015-06-3010-105/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * po/Makevars (XGETTEXT_OPTIONS): Add keyword "L_". * common/i18n.c (i18n_localegettext): New stub. * common/i18n.h: Expand the LunderscoreIMPL macro. * agent/agent.h (L_): New. (LunderscoreIMPL): New. * agent/call-pinentry.c (setup_qualitybar): Add arg ctrl anc change caller. * agent/findkey.c (try_unprotect_cb): Add local var ctrl. * agent/genkey.c (check_passphrase_constraints): Replace xtryasprintf by xtrystrdup to avoid gcc warning. Unfortinately this changes the string. (agent_ask_new_passphrase): Cleanup the use of initial_errtext. -- Static strings in gpg-agent need to be translated according to the locale set by the caller. This is required so that a gpg-agent can be started in one locale and a gpg can be run in another. If we don't do this the static strings (prompt, buttons) are not or in the wrong locale translated while dynamic strings (e.g. key description) uses the locale of gpg. This is only the first part of the change the actual local switching still needs to be implemented. Debian-bug-id: 788983 Signed-off-by: Werner Koch <[email protected]>
* Remove obsolete file g10/comment.c.Werner Koch2015-06-301-108/+0
| | | | --
* doc: Updated HACKING.Werner Koch2015-06-303-41/+50
| | | | | | | -- Added used commit keywords. Add some comments to the list of files.
* gpg: Make show-sig-subpackets work again.Werner Koch2015-06-301-1/+1
| | | | | | | | | * g10/gpg.c (parse_list_options): Fix offset for subpackets. -- Regression-due-to: 7d0492075ea638607309b3ea6a792b0e95ea7d98 GnuPG-bug-id: 2008 Signed-off-by: Werner Koch <[email protected]>
* agent: Improve a comment.Werner Koch2015-06-301-1/+2
| | | | --
* agent: Prepare for Libassuan with Cygwin support.Werner Koch2015-06-292-8/+15
| | | | | | | | * agent/gpg-agent.c (create_server_socket): Add arg "cygwin". Call assuan_sock_set_flag if Assuan version is recent enough. (main): Create ssh server socket with Cygwin flag set. Signed-off-by: Werner Koch <[email protected]>
* Show passphrase constraints errors as password prompt errorsNeal H. Walfield2015-06-294-25/+49
| | | | | | | | | | | | | | | | | | | | * agent/agent.h (check_passphrase_constraints): Add parameter failed_constraint and remove parameter silent. Update callers. * agent/genkey.c (check_passphrase_constraints): Add parameter failed_constraint and remove parameter silent. If FAILED_CONSTRAINT is not NULL and OPT.ENFORCE_PASSPHRASE_CONSTRAINTS is FALSE, save the error text in *FAILED_CONSTRAINT and don't call take_this_one_anyway or take_this_one_anyway2. If FAILED_CONSTRAINT is NULL, act as if SILENT was set. (agent_ask_new_passphrase): Change initial_errtext's type from a const char * to a char *. Pass it to check_passphrase_constraints. If it contains malloc's memory, free it. -- Signed-off-by: Neal H. Walfield <[email protected]> Based on a patch provided by Watson Yuuma Sato <[email protected]> in issue 2018.
* Improve documentation for default-cache-ttl and default-cache-ttl-ssh.Neal H. Walfield2015-06-291-3/+7
| | | | | | | * doc/gpg-agent.texi (Agent Options): Improve documentation for default-cache-ttl and default-cache-ttl-ssh. -- Signed-off-by: Neal H. Walfield <[email protected]>
* Don't raise max-cache-ttl to default-cache-ttl.Neal H. Walfield2015-06-291-6/+0
| | | | | | | | | | | * agent/gpg-agent.c (finalize_rereadable_options): Don't raise max-cache-ttl to default-cache-ttl. Likewise for max-cache-ttl-ssh and default-cache-ttl-ssh. -- Signed-off-by: Neal H. Walfield <[email protected]> This closes issue #2009.
* Improve the description of old packets with an indeterminate length.Neal H. Walfield2015-06-291-1/+1
| | | | | | | | | * g10/parse-packet.c (parse): Make the description more accurate when listing packets: old format packets don't support partial lengths, only indeterminate lengths (RFC 4880, Section 4.2). -- Signed-off-by: Neal H. Walfield <[email protected]>
* agent: Add --verify to the PASSWD command.Werner Koch2015-06-291-5/+15
| | | | | | | | * agent/command.c (cmd_passwd): Add option --verify. -- GnuPG-bug-id: 1951 Signed-off-by: Werner Koch <[email protected]>
* agent,w32: Do not create a useless socket with --enable-putty-support.Werner Koch2015-06-293-15/+23
| | | | | | | | | * agent/agent.h (opt): Remove field ssh_support. * agent/gpg-agent.c (ssh_support): New. Replace all opt.ssh_support by this. (main): Do not set ssh_support along with setting putty_support. Signed-off-by: Werner Koch <[email protected]>
* gpgsm: Add command option "offline".Werner Koch2015-06-296-8/+151
| | | | | | | | | | | | | | | | | * sm/server.c (option_handler): Add "offline". (cmd_getinfo): Ditto. * sm/certchain.c (is_cert_still_valid): (do_validate_chain): * sm/gpgsm.c (gpgsm_init_default_ctrl): Default "offline" to the value of --disable-dirmngr. * sm/call-dirmngr.c (start_dirmngr_ext): Better also check for ctrl->offline. -- Adding this option makes it easier to implement the corresponding feature in gpgme. Signed-off-by: Werner Koch <[email protected]>
* scd: Support button flag and AES key data for OpenPGPcard v3.0.NIIBE Yutaka2015-06-261-8/+28
| | | | | | * scd/app-openpgp.c (do_getattr, show_caps, app_select_openpgp): Support button and symmetric decryption. (do_setattr): Support setting AESKEY.
* sm: Fix cert storage for ephemeral certsAndre Heinecke2015-06-251-2/+20
| | | | | | | | | | | | | | | * sm/keydb.c (keydb_store_cert): Clear ephemeral flag for existing certs if store should not be ephemeral. -- Previously keydb_store_cert would ignore ephemeral certificates when asked to store a non ephemeral certificate and insert it again without the flags. This resulted in duplicated certificates in the keybox. GnuPG-bug-id: 1921 Signed-off-by: Andre Heinecke <[email protected]>
* Allow use of debug flag names for all tools.Werner Koch2015-06-235-48/+111
| | | | | | | | | | * g13/g13.c: Make use of debug_parse_flag. * scd/scdaemon.c: Ditto. * sm/gpgsm.c: Ditto * agent/gpg-agent.c: Ditto. But do not terminate on "help" * dirmngr/dirmngr.c: Ditto. Signed-off-by: Werner Koch <[email protected]>
* common: Improve fucntion parse_debug_flag.Werner Koch2015-06-231-2/+13
| | | | | | | * common/miscellaneous.c (parse_debug_flag): Add hack not to call exit. Add "none" and "all" flags. Signed-off-by: Werner Koch <[email protected]>
* scd: pinpad workaround for PC/SC implementations.NIIBE Yutaka2015-06-231-4/+12
| | | | | | | | | | | | * scd/adpu.c (pcsc_pinpad_verify, pcsc_pinpad_modify): Bigger buffer for TPDU card reader. -- GnuPG-bug-id: 2003, 2004 This is needed for PC/SC on Debian Jessie. Note that it's not only for Cherry ST-2000, but also, for any TPDU card readers.
* gpg: Allow debug flag names for --debug.Werner Koch2015-06-222-49/+39
| | | | | | | | | | * g10/gpg.c (opts): Change arg for oDebug to a string. (debug_flags): New; factored out from set_debug. (set_debug): Remove "--debug-level help". Use parse_debug_flag to print the used flags. (main): Use parse_debug_flag for oDebug. Signed-off-by: Werner Koch <[email protected]>
* common: Add function parse_debug_flagWerner Koch2015-06-222-0/+89
| | | | | | | * common/miscellaneous.c (parse_debug_flag): New. * common/util.h (struct debug_flags_s): New. Signed-off-by: Werner Koch <[email protected]>
* common: Add function strtokenize.Werner Koch2015-06-223-0/+212
| | | | | | | | * common/stringhelp.c: Include assert.h. (strtokenize): New. * common/t-stringhelp.c (test_strtokenize): New. Signed-off-by: Werner Koch <[email protected]>
* gpg: Fix regression due to recent commit 6500f33Werner Koch2015-06-221-28/+59
| | | | | | | | | | | * g10/keydb.c (kid_list_s): Keep a state in the table. (kid_not_found_table): Rename to kid_found_table. (n_kid_not_found_table): Rename to kid_found_table_count. (kid_not_found_p): Return found state. (kid_not_found_insert): Add arg found. (keydb_search): Store found state in the table. Signed-off-by: Werner Koch <[email protected]>
* scd: Fix Cherry ST-2000 support for pinpad input.NIIBE Yutaka2015-06-222-6/+16
| | | | | | | | | | * scd/apdu.c (pcsc_vendor_specific_init): Set pinmax to 15. * scd/ccid-driver.c (ccid_transceive_secure): Add zero for the template of APDU. -- GnuPG-bug-id: 2003, 2004
* gpg: Print number of good signatures with --check-sigs.Werner Koch2015-06-201-7/+15
| | | | | | | | | * g10/keylist.c (keylist_context): Add field good_sigs. (list_keyblock_print): Updated good_sigs. (print_signature_stats): Print number of good signatures and use log_info instead of tty_printf. Signed-off-by: Werner Koch <[email protected]>
* gpg: Improve speed of --check-sigs and --lish-sigs.Werner Koch2015-06-203-0/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/keydb.c (kid_list_t): New. (kid_not_found_table, n_kid_not_found_table): New. (kid_not_found_p, kid_not_found_insert, kid_not_found_flush): New. (keydb_insert_keyblock): Flush the new cache. (keydb_delete_keyblock): Ditto. (keydb_update_keyblock): Ditto. (keydb_search): Use the new cache. (keydb_dump_stats): New. * g10/gpg.c (g10_exit): Dump keydb stats. -- What we do here is to keep track of key searches by long keyids (as stored in all signatures) so that we do not need to scan the keybox again after we already found that this keyid will result in not-found. As soon as we change gpg to run as a co-process we should store this table per session because other instances of gpg may have updated the keybox without us knowing. On a test ring with gpg: 94721 good signatures gpg: 6831 bad signatures gpg: 150703 signatures not checked due to missing keys gpg: 5 signatures not checked due to errors gpg: keydb: kid_not_found_table: total: 14132 this new cache speeds a --check-sigs listing up from 28 minutes to less than 3 minutes. Signed-off-by: Werner Koch <[email protected]>
* gpg: Add more log_clock calls to keydb.cWerner Koch2015-06-191-0/+9
| | | | * g10/keydb.c (keydb_get_keyblock): Add log_clock calls.
* gpg: Print available debug flags using "--debug-level help".Werner Koch2015-06-192-18/+46
| | | | | | | * g10/gpg.c (set_debug): Add "help" option and use a table for the flags. Signed-off-by: Werner Koch <[email protected]>
* gpg: Fix export problem in case an old keyring has PGP-2 keys.Werner Koch2015-06-191-1/+8
| | | | | | * g10/export.c (do_export_stream): Skip legacy keys. Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Fix the cleanup zombies fix (685b782).Werner Koch2015-06-182-9/+6
| | | | | | | | | | | | | | | | | | * dirmngr/ldap-wrapper.c (ldap_wrapper_thread): Do not close the stdout reader after EOF from read_log_data. * dirmngr/crlcache.c (crl_cache_reload_crl): Close the reader before the next iteration. -- I assumed that the log_fd also has a reader object but that reader object is used for stdout and needs to be closed by the consumer. The real bug with the non-released ldap_wrapper control objects was that when looping over distribution points we did not closed the used reader object before the next iteration. Now, the test case had more than one DP and thus we lost one reader object. Signed-off-by: Werner Koch <[email protected]>
* agent: Print a warning for obsolete options.Werner Koch2015-06-175-18/+24
| | | | | | | | | | | * g10/misc.c (obsolete_scdaemon_option): Move to * common/miscellaneous.c (obsolete_option): ... here. * agent/gpg-agent.c (main): Use obsolete_option for the 3 obsolete options. -- GnuPG-bug-id: 2016 Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Cleanup zombies and fix hang on shutdown.Werner Koch2015-06-161-34/+29
| | | | | | | | | | | | | | | * dirmngr/ldap-wrapper.c (ldap_wrapper_thread): Move nfds computation into the loop. Check the queue also on timeout. Close log_fd and reader context on EOF or error. -- The major bug here was that on an EOF of the log fd the log fd was not closed and thus the final queue item removal could not work. Checking the queue on a timeout is not really necessary but it help in case there is a race condition lingering. GnuPG-bug-id: 1838, 1978 Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Add missing cast for use of pid_t in printf.Werner Koch2015-06-161-1/+1
| | | | --
* dirmngr: Avoid accessing uninitialized memory in log callback.Werner Koch2015-06-161-2/+6
| | | | | | | | | | | | | | | | | | | | | * dirmngr/dirmngr.c (pid_suffix_callback): Clear int_and_ptr_u before use. (start_connection_thread): Ditto. (handle_connections): Ditto. -- Example valgrind output: ==2921== Conditional jump or move depends on uninitialised value(s) ==2921== at 0x5BBDEF4: pthread_getspecific (pthread_getspecific.c:57) ==2921== by 0x40AAEE: pid_suffix_callback (dirmngr.c:614) ==2921== by 0x433F5A: do_logv (logging.c:684) This is because on 64 bit systems "sizeof aptr > sizeof aint" and thus Valgrind complains about this. It is no a real problem because we don't use the unitialized bits. Signed-off-by: Werner Koch <[email protected]>
* build: Distribute swdb.lst with the w32-source target.Werner Koch2015-06-161-3/+5
| | | | --
* Don't prompt for the password multiple times in pinentry loopback mode.Neal H. Walfield2015-06-161-0/+7
| | | | | * g10/gpg.c (main): If OPT.PINENTRY_MODE is PINENTRY_MODE_LOOPBACK, clear OPT.PASSPHRASE_REPEAT.
* po: Update Japanese Translation.NIIBE Yutaka2015-06-161-33/+17
|
* doc: Add defs.inc to BUILT_SOURCESWerner Koch2015-06-151-1/+1
|
* doc: Update the record description of the trustdb.Werner Koch2015-06-151-206/+125
| | | | | | | -- This now reflects the used version of the trustdb. However, it still missed a detailed description on how it works.
* Added release date of older versions to NEWS.Werner Koch2015-06-152-18/+1512
| | | | --
* Post release updates.Werner Koch2015-06-112-1/+5
| | | | --
* Release 2.1.5gnupg-2.1.5Werner Koch2015-06-111-1/+11
|
* w32: Adjust mkdefsinc.c for WindowsWerner Koch2015-06-111-0/+10
| | | | | | | | | -- Under Windows the file names are determined at runtime. To have somewhat useful names in the manuals, we provide replacements using the strings "INSTDIR" and "APPDATA" for the installation directory and the user specific application data.
* po: Auto-updateWerner Koch2015-06-1125-219/+292
| | | | --
* po: Update German translationWerner Koch2015-06-111-9/+12
| | | | --
* po: Update Russian translationIneiev2015-06-111-26/+12
| | | | --
* agent: Fix --extra-socket on Windows.Werner Koch2015-06-111-11/+25
| | | | | | | | | | | | | | * 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. -- Although not tested, the code did not worked on Windows becuase we were checning the wrong nonce. Signed-off-by: Werner Koch <[email protected]>
* agent: Add experimental option --browser-socket.Werner Koch2015-06-113-8/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. -- This is very similar to --extra-socket but intended to be used by a web browser session. AS of now it only displays a different "Note: in the Pinentry than --extra-socket but it may eventually be tweaked for the use by browser extensions making use of gpg-agent. It is marked experimental and and thus may be removed in later versions. To better support the different "client classes", it would be useful to add corresponsing cache classes so that each class has its own cache. Signed-off-by: Werner Koch <[email protected]>
* agent: Add option --allow-emacs-pinentryDaiki Ueno2015-06-105-1/+34
| | | | | | | | | | | | | | * 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. -- gpgconf-comp and manual entry added by wk. Signed-off-by: Werner Koch <[email protected]>
* doc: Do not used fixed file names in the manuals.Werner Koch2015-06-0915-45/+376
| | | | | | | | | | | | | | | | | | | | | | * 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. -- GnuPG-bug-id: 1661 Signed-off-by: Werner Koch <[email protected]>