aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* agent: Add option --debug-pinentry.Werner Koch2015-05-114-1/+15
| | | | | | | | | | | | | | * 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. -- This option is quite useful to see the IPC between gpg-agent and Pinentry. Note that "debug 1024" is also required. Signed-off-by: Werner Koch <[email protected]>
* gpg: Avoid cluttering stdout with trustdb info in verbose mode.Werner Koch2015-05-081-1/+1
| | | | | | | | | | | | | * g10/trustdb.c (validate_keys): Call dump_key_array only in debug mode. -- I guess that is a left-over from an early attempt to output information on the trustdb for use by other tools. Maybe related to the former --list-trust-path command. Sending it to stdout is probably useful so we do this now only in debug mode. Signed-off-by: Werner Koch <[email protected]>
* gpg: Fix wrong output in list mode.Werner Koch2015-05-081-1/+1
| | | | | | | | | | | | | * g10/parse-packet.c (parse_gpg_control): Replace puts by es_fputs to LISTFP. -- Reported-by: Daniel Kahn Gillmor <[email protected]> This was an oversight from the conversion to estream or a separate listing stream. Signed-off-by: Werner Koch <[email protected]>
* gpg: New command --quick-adduid.Werner Koch2015-05-086-30/+185
| | | | | | | | | | | | | | | * 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. -- GnuPG-bug-id: 1956 Signed-off-by: Werner Koch <[email protected]>
* gpg: Add push/pop found state feature to keydb.Werner Koch2015-05-084-5/+88
| | | | | | | | | | | | | | * 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. -- We have the same feature in gpgsm. It is very useful to check for an unambiguous user id with a follow up update of the keyblock. Signed-off-by: Werner Koch <[email protected]>
* gpg: Minor code merging in keyedit.Werner Koch2015-05-081-17/+26
| | | | | | | | | | | * 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. Signed-off-by: Werner Koch <[email protected]>
* Typo fixesWerner Koch2015-05-081-1/+4
| | | | --
* agent: Minor change for 56b5c9f.Werner Koch2015-05-071-12/+14
| | | | | | | * agent/call-pinentry.c (agent_askpin): Move option setting to ... (start_pinentry): here. Fix error code check. Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Fix segfault in ldap engineKristian Fiskerstrand2015-05-071-1/+3
| | | | | (ks-engine-ldap.c) Fix segfault caused by missing check whether uri is initialized
* agent: Improve some comments.Neal H. Walfield2015-05-071-7/+7
| | | | | | -- Signed-off-by: Neal H. Walfield <[email protected]>
* agent: Improve support for externally cached passwords.Neal H. Walfield2015-05-071-12/+35
| | | | | | | | | | | | | | | | * 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. -- Signed-off-by: Neal H. Walfield <[email protected]>
* agent: Or in the value; don't overwrite the variable.Neal H. Walfield2015-05-071-1/+1
| | | | | | | | | * agent/call-pinentry.c (pinentry_status_cb): Or in PINENTRY_STATUS_CLOSE_BUTTON; don't overwrite *FLAG. -- Signed-off-by: Neal H. Walfield <[email protected]>
* agent: Avoid magic numbers. Use more accurate names.Neal H. Walfield2015-05-071-12/+20
| | | | | | | | | | | | | * 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. -- Signed-off-by: Neal H. Walfield <[email protected]>
* gpg: Improve 'General key info' line of --card-status.Werner Koch2015-05-076-40/+35
| | | | | | | | | | | | | | | | | * 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. -- This now prints "sub" if the first used card key is actually a subkey. Signed-off-by: Werner Koch <[email protected]>
* gpg: Fix regression not displaying the card serial numberWerner Koch2015-05-071-1/+1
| | | | | | | | | | | * g10/call-agent.c (keyinfo_status_cb): Detect KEYINFO. -- This regression is due to commit 585d5c62eece23911a768d97d11f159be138b13d from February 2013! Signed-off-by: Werner Koch <[email protected]>
* speedo,w32: Install a native pinentry.Werner Koch2015-05-062-15/+21
| | | | | | | | | * 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. Signed-off-by: Werner Koch <[email protected]>
* g10: fix cmp_public_key.NIIBE Yutaka2015-05-011-5/+8
| | | | | | | | | | | * g10/free-packet.c (cmp_public_keys): Compare opaque data at the first entry of the array when it's unknown algo. -- (forwardported from 2.0 commit 43429c7869152f301157e4b24790b3801dce0f0a) GnuPG-bug-id: 1962
* scd: PC/SC reader selection by partial string match.NIIBE Yutaka2015-04-301-4/+8
| | | | | | | | | | | | | | | | | * scd/apdu.c (open_pcsc_reader_direct): Partial string match. -- The card reader name by PC/SC service might include USB bus, which varies (on some platform like GNU/Linux). Thus, it's better to match partial string. Original patch was submitted by anstein. I changed it to fallback to the first reader if no match found. Note that we need to change pcsc-wrapper.c in 2.0 backport. GnuPG-bug-id: 1618, 1930
* common: Remove JNLIB from boiler plate (jnlib merge).Werner Koch2015-04-2431-220/+124
| | | | | | | * common/README.jnlib: Remove. -- This is the final part of merging jnlib into gnupg/common.
* common: Rename log and gcc attribute macros (jnlib merge).Werner Koch2015-04-2421-112/+112
| | | | | | | | | | | * common/logging.h: Rename JNLIB_LOG_* to GPGRT_LOG_*. * common/mischelp.h: Rename JNLIB_GCC_* to GPGRT_GCC_*. -- JNLIB has no more meaning. Thus we switch to a GPGRT_ prefix in anticipation that some code may eventually be moved to libgpg-error. Signed-off-by: Werner Koch <[email protected]>
* common: Remove two JNLIB_ macros (jnlib merge).Werner Koch2015-04-2424-55/+19
| | | | | | | | | | * 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. -- Signed-off-by: Werner Koch <[email protected]>
* common: Remove libjnlib-config.h (jnlib merge).Werner Koch2015-04-2415-324/+197
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. -- This is part 1 of the patches to merge the jnlib files into common/. It does not make much sense to keep jnlib/ files separate. They are not often use elsewhere and maintaining the complex marcos stuff is too troublesome for the future. Signed-off-by: Werner Koch <[email protected]>
* gpg: Move all DNS access to Dirmngr.Werner Koch2015-04-2316-292/+517
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. -- With this patch gpg does not do any network access itself but uses dirmngr for that. Note that we need to keep linking to NETLIBS due to the logging code and because we need TCP for our socket emulation under Windows. Probably also required for Solaris etc. Signed-off-by: Werner Koch <[email protected]>
* common: Minor change of hex2str to allow for embedded nul.Werner Koch2015-04-232-46/+57
| | | | | | | | | | | | | | | | | | | | | | * common/convert.c (hex2str): Set ERRNO. Return adjusted COUNT. -- hex2str is only used at one place for in-place converting an hex encoded passphrase. This change does not affect this use. The change is however useful to use the function for in-place conversion of arbitrary hex encoded strings. Take care for in-place conversion of a hex string encoding binary data you need to use it this way: if (hex2str (string, string, strlen (string) + 1, &length) oops ("probably out of memory but see ERRNO"); for (i=0; i < length; i++) foo (string[i)); Note that strlen() + 1. Signed-off-by: Werner Koch <[email protected]>
* common: removal of t-support.c from t_jnlib_src.NIIBE Yutaka2015-04-231-1/+1
| | | | | | | | | | | * common/Makefile.am (t_jnlib_src): Remove t-support.c. -- Since test programs are linked to libgcrypt and libgpg-error, there is no need to include t-support.c. GnuPG-bug-id: 1862, 1915
* gpg: Make keyserver-option http_proxy work.Werner Koch2015-04-213-5/+26
| | | | | | | * 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.Werner Koch2015-04-211-3/+48
| | | | | | | | * common/http.c (is_hostname_port): New. (send_request): Fix proxy name parsing. -- Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Add http proxy support for keyservers.Werner Koch2015-04-217-16/+36
| | | | | | | | | | | | | | | | * 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. Signed-off-by: Werner Koch <[email protected]>
* gpg: Do not use honor-keyserver-url sub-option by default.Werner Koch2015-04-212-4/+5
|
* gpg: Make preferred keyservers work.Werner Koch2015-04-213-36/+102
| | | | | | | | | | | | | | * 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. -- It used to ignore the given server but showed a diagnostics that it will be used.
* gpg: Update sub-options of --keyserver-optionsWerner Koch2015-04-215-56/+53
| | | | | | | | | | | | | | | | | | | | | * 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. -- Note that many of these options where implicitly used by passing any unknown option down to the former keyserver helpers. The don't exist anymore thus we need to make them explicit. Another patch will convey them to dirmngr. Temp files are not anymore used thus they can be removed and will be ignored when used. Signed-off-by: Werner Koch <[email protected]>
* Remove the obsolete keyserver directory from the repo.Werner Koch2015-04-2016-7207/+811
| | | | | | | -- We also merge dirmngr/ChangeLog.1 into dirmngr/ChangeLog-2011 and rename keyserver/ChangeLog-2011 to dirmngr/ChangeLog-2011-ks.
* agent: Send the new SETKEYINFO command to the Pinentry.Werner Koch2015-04-147-12/+33
| | | | | | | | | | * 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. Signed-off-by: Werner Koch <[email protected]>
* scd: better handling of extended APDU.NIIBE Yutaka2015-04-143-83/+87
| | | | | | | | | | | | | | | | * 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. -- With this patch, we won't need PC/SC library/service any more. GnuPG-bug-id: 1947
* gpg: Fix NULL-segv due to invalid imported data.Werner Koch2015-04-131-4/+18
| | | | | | | | | * g10/free-packet.c (my_mpi_copy): New. (copy_public_key, copy_signature): Use instead of mpi_copy. -- Reported-by: Hanno Böck Signed-off-by: Werner Koch <[email protected]>
* dirmngr: If LDAP is not enable, don't build the LDAP bits.Neal H. Walfield2015-04-133-28/+72
| | | | | | | | | | | | | | | | | | | | | | * 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. -- Signed-off-by: Neal H. Walfield <[email protected]> GnuPG-bug-id: 1949
* common: Do without nested fucntions to support non-gcc.Werner Koch2015-04-131-52/+54
| | | | | | * common/t-stringhelp.c (test_strsplit): Remove nested function. Signed-off-by: Werner Koch <[email protected]>
* build: Update gpg-error.m4.Werner Koch2015-04-121-5/+7
| | | | --
* Post release updates.Werner Koch2015-04-112-1/+5
| | | | --
* Release 2.1.3.gnupg-2.1.3Werner Koch2015-04-111-1/+30
|
* po: Update Ukrainian translationYuri Chornoivan2015-04-111-29/+17
|
* po: Update and review Russian translationIneiev2015-04-111-82/+72
|
* dirmngr,w32: Make it build for Windows.Werner Koch2015-04-101-2/+4
| | | | * dirmngr/Makefile.am (t_common_ldadd): Add missing libs.
* Remove obsolete directories from AM_CPPFLAGS.Werner Koch2015-04-109-11/+9
|
* dirmngr,w32: Replace functions not available under Windows.Werner Koch2015-04-101-4/+5
| | | | | * dirmngr/ks-engine-ldap.c (extract_attributes): Replace isoptime and gmtime_r.
* common: Add new function gnupg_gmtime.Werner Koch2015-04-102-8/+31
| | | | | | | | | | | | | * common/gettime.c (gnupg_gmtime): New. (gnupg_get_isotime): Use it. Also take care of an gmtime_t returning an error. -- The fix in gnupg_get_isotime is only to cover up a theoretical broken time (e.g. a value of (time_t)(-2) which is not mapped beyond 2038 on 32 bit systems). Signed-off-by: Werner Koch <[email protected]>
* common: Add new function isodate_human_to_tmWerner Koch2015-04-103-4/+114
| | | | | | | | | | | | | | * 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. -- This function in intended as replacement for strptime (foo, "%Y-%m-%d", &bar) which is not available under Windows.
* dirmngr,w32: Avoid name clash with existing functionWerner Koch2015-04-101-6/+7
| | | | * dirmngr/ks-engine-ldap.c (ldap_connect): Rename to my_ldap_connect.
* gpgparsemail: Fix last commit (3f2bdac)Werner Koch2015-04-101-1/+2
| | | | | | | | | | | * tools/rfc822parse.c (parse_field): Replace break by goto. -- Brown paper bag bug: Changing an IF to a WHILE inside another loop requires to fix the inner break. Reported-by: Hanno Böck Signed-off-by: Werner Koch <[email protected]>
* speedo: Fix libgpg-error build in w64 buildsWerner Koch2015-04-091-1/+1
| | | | | | -- This typo was recently introduced.