aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Inform a user about inquire length limit.bjk/passphrase-inquireBen Kibbey2015-04-172-1/+7
| | | | | | | | | | * common/status.h (INQUIRE_MAXLEN): New. * g10/call-agent.c (default_inquire_cb): Send STATUS_INQUIRE_MAXLEN. client when inquiring a passphrase over pinentry-loopback. -- This is to inform a user about the maximum length of a passphrase. The limit is the same that gpg-agent uses.
* Allow --gen-key to inquire a passphrase.Ben Kibbey2015-04-151-3/+12
| | | | | | | * g10/gpg.c (main): test for --command-fd during --gen-key parse. When --command-fd is set then imply --batch to let gpg inquire a passphrase rather than requiring a pinentry.
* 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.
* tools: Remove trailing spaces.Werner Koch2015-04-091-20/+20
| | | | --
* gpgparsemail: Fix case of zero length continuation lines.Werner Koch2015-04-091-5/+8
| | | | | | | | | | | | | | | | | | | * tools/rfc822parse.c (parse_field): Loop after continuation line. -- Using header lines like Name:[lf] [space][lf] [lf] resulted in running into the "(s2 = strchr (delimiters2, *s)" branch and inserting a new token for the empty continuation line. This also led to one byte read after the string which is what Hanno figured. The new code should handle empty continuation lines correct. Reported-by: Hanno Böck Signed-off-by: Werner Koch <[email protected]>
* sm: Fix certificate lookup in dirmngr cache.Werner Koch2015-04-081-1/+1
| | | | | | | | | | | * sm/call-dirmngr.c (get_cached_cert): Fix typo in LOOKUP command. -- This bug has been here since the code was written. The commit message for commit 2d0ca28a226773b9779a93c39bba9bace13232fe actually had the warning that the code has not been tested. Now the funny thing is that when the code was backported to the 2.0 branch just a few minutes later that typo was fixed en passant in that branch.
* gpg: Print the user id in --fast-list-mode.Werner Koch2015-04-061-2/+2
| | | | * g10/keylist.c (list_keyblock_print, list_keyblock_colon): Change.
* gpg: Prepare to pass additional context to the list functions.Werner Koch2015-04-063-32/+71
| | | | | | | | | | | | | | | | | | | | | * 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. -- This is in preparation for the server mode and for a patch to speed up --list-sigs. Signed-off-by: Werner Koch <[email protected]>
* gpg: Merge duplicated code for get_user_id et al.Werner Koch2015-04-061-57/+45
| | | | | | | | | * 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. Signed-off-by: Werner Koch <[email protected]>
* gpg: Add new option --debug-iolbf.Werner Koch2015-04-062-1/+11
| | | | | | | | | | | | * g10/gpg.c (oDebugIOLBF): new. (opts): Add --debug-iolbf. (main): Set option. -- This option is convenient for debugging to make sure that debug output to stderr is synced with output to stdout. Signed-off-by: Werner Koch <[email protected]>
* Rename DBG_ASSUAN to DBG_IPC and add separate DBG_EXTPROG.Werner Koch2015-04-0619-53/+47
| | | | * g10/options.h (DBG_EXTPROG_VALUE): Separate from DBG_IPC_VALUE.
* Fix use of DBG_CACHE and DBG_LOOKUPWerner Koch2015-04-064-23/+26
| | | | | | * 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.Werner Koch2015-04-067-23/+23
| | | | | * g10/options.h (DBG_CIPHER_VALUE): Rename to DBG_CRYPTO_VALUE. (DBG_CIPHER): Rename to DBG_CRYPTO.
* gpg: Fix DoS while parsing mangled secret key packets.Werner Koch2015-04-051-1/+25
| | | | | | | | | | | | | | * g10/parse-packet.c (parse_key): Check PKTLEN before calling mpi_read et al. -- Due to the missing length checks PKTLEN may turn negative. Because PKTLEN is an unsigned int the malloc in read_rest would try to malloc a too large number and terminate the process with "error reading rest of packet: Cannot allocate memory". Reported-by: Hanno Böck. Signed-off-by: Werner Koch <[email protected]>
* g10: Fix keytocard.NIIBE Yutaka2015-04-035-12/+24
| | | | | | | | | | | | | | | | 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. -- This is not a perfect solution since there is a possibility user unplug card before quitting 'gpg --keyedit' session. Usually, it works well. GnuPG-bug-id: 1846
* agent: Add --force option for LEARN.NIIBE Yutaka2015-04-033-50/+10
| | | | | | | | | * 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. --
* dirmngr: Don't use alloca.Neal H. Walfield2015-03-311-2/+5
| | | | | | | | * dirmngr/ks-engine-ldap.c (ks_ldap_put): Replace use of alloca with xmalloc and xfree. -- Signed-off-by: Neal H. Walfield <[email protected]>
* dirmngr: Simplify truncation of long strings in debug code.Neal H. Walfield2015-03-311-17/+10
| | | | | | | | * dirmngr/ks-engine-ldap.c (modlist_dump): Simplify truncation of long strings. -- Signed-off-by: Neal H. Walfield <[email protected]>
* dirmngr: Correct indentation.Neal H. Walfield2015-03-311-108/+107
| | | | | -- Signed-off-by: Neal H. Walfield <[email protected]>
* dirmngr: Use a better error code.Neal H. Walfield2015-03-311-1/+1
| | | | | | | | * dirmngr/ldap-parse-uri.c (ldap_parse_uri): On error, return GPG_ERR_GENERAL, not GPG_ERR_ASS_GENERAL. -- Signed-off-by: Neal H. Walfield <[email protected]>
* gpg: Remove gratuitous extern qualifier from declaration.Neal H. Walfield2015-03-311-1/+1
| | | | | | -- Signed-off-by: Neal H. Walfield <[email protected]>
* dirmngr: Better encapsulate the keyservers variable.Neal H. Walfield2015-03-314-30/+41
| | | | | | | | | | | | | | | | | | | | * 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. -- Signed-off-by: Neal H. Walfield <[email protected]>
* gpg: Only use the last specified keyserver.Neal H. Walfield2015-03-281-1/+8
| | | | | | | | * g10/gpg.c (main): Only use the last specified keyserver. -- Signed-off-by: Neal H. Walfield <[email protected]>
* dirmngr: Fix resource leaks and check rare errors.Werner Koch2015-03-251-23/+37
| | | | | | | | | | | | | * 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. Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Minor cleanups.Werner Koch2015-03-252-25/+29
| | | | | | | | | | | | | | | | | | | | | | * 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. -- sprintf has been replaced by snprintf to avoid warnings on some platforms. xfree et al. is required so that replacement functions are used if defined. For example the Libgcrypt functions which may not be fully compatible with standard free. Impossible conditions should use GPG_ERR_INTERNAL. Signed-off-by: Werner Koch <[email protected]>
* common: Add macro GNUPG_GCC_A_USED.Werner Koch2015-03-251-0/+6
| | | | | | * common/util.h (GNUPG_GCC_A_USED): New. Signed-off-by: Werner Koch <[email protected]>
* doc: Document the changed default algos for gpgsm.Werner Koch2015-03-251-2/+2
| | | | --
* sm: Change default algos to SHA256 (CSR) and AES128 (bulk encryption).Werner Koch2015-03-252-2/+2
| | | | | | | | * sm/certreqgen.c (create_request): Change default hash algo. * sm/gpgsm.c (DEFAULT_CIPHER_ALGO): Change default bulk cipher algo. -- Signed-off-by: Werner Koch <[email protected]>
* gpg,w32: Handle forward slash in --keyring option.Werner Koch2015-03-241-2/+10
| | | | | | | * g10/keydb.c (keydb_add_resource): Allow forward slash under Windows. -- GnuPG-bug-id: 1546
* doc: Mention that --use-standard-socket-p always returns true.Werner Koch2015-03-241-2/+5
| | | | --
* common:stringhelp.c: Replace use of jblib_malloc with xtrymalloc, etc.neal/dirmngr-ldapNeal H. Walfield2015-03-231-26/+26
| | | | | -- Signed-off-by: Neal H. Walfield <[email protected]>
* Improve documentation for ks_hkp_get.Neal H. Walfield2015-03-231-1/+2
| | | | | | | * dirmngr/ks-engine-hkp.c (ks_hkp_get): Improvement documentation. -- Signed-off-by: Neal H. Walfield <[email protected]>
* Improve spelling and grammar of some comments.Neal H. Walfield2015-03-2312-18/+18
| | | | | -- Signed-off-by: Neal H. Walfield <[email protected]>