aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gpg: Use more descriptive names.Neal H. Walfield2015-12-151-111/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/keyring.c (KR_NAME): Rename this... (KR_RESOURCE): ... to this. Update users. (struct keyring_name): Rename this... (struct keyring_resource): ... to this. Update users. (struct off_item): Rename this... (struct key_present): ... to this. Update users. (OffsetHashTable): Rename this... (key_present_hash_t): ... to this. Update users. (kr_offtbl): Rename this... (key_present_hash): ... to this. Update users. (kr_offtbl_ready): Rename this... (key_present_hash_ready): ... to this. Update users. (KEY_PRESENT_HASH_BUCKETS): New define. Replace use of literals with this. (new_offset_item): Rename this... (key_present_value_new): ... to this. Update users. (release_offset_items): Drop dead code. (new_offset_hash_table): Rename this... (key_present_hash_new): ... to this. Update users. (release_offset_hash_table): Drop dead code. (lookup_offset_hash_table): Rename this... (key_present_hash_lookup): ... to this. Update users. (update_offset_hash_table): Rename this... (key_present_hash_update): ... to this. Drop unused parameter off. Update users. (update_offset_hash_table_from_kb): Rename this... (key_present_hash_update_from_kb): ... to this. Drop unused parameter off. Update users. -- Signed-off-by: Neal H. Walfield <[email protected]>
* sm: Handle gcry_pk_encrypt return value.NIIBE Yutaka2015-12-151-2/+5
| | | | | | | | | | * sm/encrypt.c (encrypt_dek): Don't ignore failure of gcry_pk_encrypt. -- Thanks to Sami Farin. GnuPG-bug-id: 2154
* common: Change license of isascii.c to all-premissive,Werner Koch2015-12-141-13/+6
| | | | | | | * common/isascii.c: Change. -- Actually this code is too trivial to claim any copyright at all.
* common: Change license of some modules to LGPLv3+/GPLv2+.Werner Koch2015-12-146-30/+90
| | | | | | | | | | | | | | | | * common/status.c: Change from GPLv3 to LGPLv3+/GPLv2+. * common/status.h: Ditto. * common/yesno.c: Ditto. * common/common-defs.h: Ditto. * common/gettime.h: Ditto. * common/keyserver.h: Ditto. -- This is shared code and trivial enough to allow use under GPLv2+ so to allow use by GPLv2only software. Some of the headers are simply adjusted to the license of their implementation. Signed-off-by: Werner Koch <[email protected]>
* common: Change license for exectool to LGPLv3+/GPLv2+.Werner Koch2015-12-142-10/+30
| | | | | | | | | | * common/exectool.c, common/exectool.h: Change license. -- We always try to use this license for shared code. Signed-off-by: Werner Koch <[email protected]>
* common: Rename sh-exectool to exectool.Werner Koch2015-12-146-30/+30
| | | | | | | | | | | | | | | | | | | * common/sh-exectool.c: Rename to exectool.c. * common/sh-exectool.h: Rename to exectool.h. * common/Makefile.am (common_sources): Adjust for rename. * common/exectool.c (sh_exec_tool_stream): Rename to gnupg_exec-tool-stream. (sh_exec_tool): Rename to gnupg_exec_tool. * tools/gpgtar-create.c (gpgtar_create): Adjust for changes. * tools/gpgtar-extract.c: Adjust for changes. * tools/gpgtar-list.c: Adjust for changes. -- The "sh-" presifx is used by g13 for system helpers which are used by processes created via userv. A generic function in common/ should also have a generic name. Signed-off-by: Werner Koch <[email protected]>
* gpg: Print ownertrust in TOFU+PGP trust model.Damien Goutte-Gattat2015-12-141-2/+3
| | | | | | | | | | | | * g10/keyedit.c: Print ownertrust in TOFU+PGP trust model. -- The key editor currently prints out the ownertrust value assigned to a key only when using the classic or PGP trust models; but that value is also meaningful in the recently introduced TOFU+PGP combined model. Signed-off-by: Damien Goutte-Gattat <[email protected]>
* gpg: Fix --default-key checks.Neal H. Walfield2015-12-141-3/+59
| | | | | | | | | | | | * g10/getkey.c (parse_def_secret_key): Don't just check if a secret key is available for the public key, also consider subkeys. Also check that the key has the signing capability, is not revoked, is not expired and is not disabled. Print a warning if there was a least one value passed to --default-key and all were ignored. -- Signed-off-by: Neal H. Walfield <[email protected]> Regression-due-to: e16d7168
* scd: Fix regression for generating RSA keys on card.NIIBE Yutaka2015-12-141-0/+5
| | | | | | | | | | | | | * scd/app-openpgp.c (do_genkey): Strip leading zeros for fingerprint computation. -- This bug is difficult to reproduce because the probability is 1/256, and key generation takes long time. The regression was introduced when we add the support for ECC. GnuPG-bug-id: 2150
* gpg: Use a regular type instead of a void* for import stats.Werner Koch2015-12-123-31/+36
| | | | | | | | | * g10/import.c (struct stats_s): Rename to import_stats_s. Change all users. * g10/main.h (import_stats_t): New. Change fucntions to use this instead of a void pointer. Signed-off-by: Werner Koch <[email protected]>
* Remove replacements for libgpg-error < 1.21.Werner Koch2015-12-127-166/+5
| | | | | | | | | | | | | | | | * common/util.h: Remove replacement macros for libgpg-error<1.21. * common/types.h: Ditto. * common/mischelp.h: Ditto. * common/t-mapstrings.c: Include t-support.h before stringhelp.h * common/t-stringhelp.c: Ditto. * common/t-support.h: Always include gpg-error.h. * kbx/keybox-search.c: Do not include stringhelp.h so that keybox-defs comes first. -- This patch enhances commit d6e0149 from Dec 10. Signed-off-by: Werner Koch <[email protected]>
* gpg: Fix buffer overflow.Neal H. Walfield2015-12-111-1/+1
| | | | | | | | | | | * g10/keydb.c (keydb_search_desc_dump): Fix buffer overflow. -- Signed-off-by: Neal H. Walfield <[email protected]> Regression-due-to: 11ec478 Note: this buffer overflow will only occur if --debug=lookup is passed to gpg and a search by fingerprint is done.
* agent: Improve error handling.Justus Winter2015-12-111-1/+2
| | | | | | * agent/pksign.c (agent_pksign_do): Improve error handling. Signed-off-by: Justus Winter <[email protected]>
* agent: Fix typo.Justus Winter2015-12-111-1/+1
| | | | | -- Signed-off-by: Justus Winter <[email protected]>
* Fix required libgpg-error version.Justus Winter2015-12-111-1/+1
| | | | | | | * configure.ac (NEED_GPG_ERROR_VERSION): We need version 1.21 for the poll interface. Signed-off-by: Justus Winter <[email protected]>
* gpg: Don't error out if a key occurs multiple times in the keyring.Neal H. Walfield2015-12-111-32/+82
| | | | | | | | | * g10/gpg.c (check_user_ids): Don't error out if a key occurs multiple times in the keyring. Instead, print a warning. When printing out fingerprint prints, use format_hexfingerprint to format them. -- Signed-off-by: Neal H. Walfield <[email protected]>
* scd: Fix removal of unplugged usb readers on Windows.Daniel Hoffend2015-12-101-0/+3
| | | | | | | | | | | | | | * scd/apdu.c (pcsc_error_to_sw): map PCSC_E_NO_SERVICE and PCSC_E_SERVICE_STOPPED to the internal SW_HOST_NO_READER error code. -- Signed-off-by: Daniel Hoffend <[email protected]> GnuPG-bug-id: 2167 In Windows 8 (and later), PC/SC service only runs when reader/token is plugged in. After its removal, it returns PCSC_E_NO_SERVICE error. This error should be handled as no reader. This comment is by gniibe.
* tests: Add some more gpgtar tests.Justus Winter2015-12-071-3/+24
| | | | | | * tests/openpgp/gpgtar.test: Add more tests. Signed-off-by: Justus Winter <[email protected]>
* po: Update Russion translationIneiev2015-12-071-73/+50
| | | | | | -- Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Initialize http status code.Justus Winter2015-12-071-1/+1
| | | | | | | | | * dirmngr/ks-action.c (ks_action_search): Initialize 'http_status' as it is unused if LDAP is used to search for keys. -- This amends 6ac57a48. Signed-off-by: Justus Winter <[email protected]>
* gpg: Write ERROR status on delete-key cancellationDaiki Ueno2015-12-041-1/+4
| | | | | | | | | * g10/delkey.c (do_delete_key): Write ERROR status code with the error location "delete_key.secret", when the user cancelled the operation on Pinentry. -- I changed the original patch to emit the full gpg_error_t code. -wk
* dirmngr: Stricter handling of http error codes.Justus Winter2015-12-043-13/+21
| | | | | | | | | | | * dirmngr/ks-action.c (ks_action_search): Only retry if the keyserver responded with a '404 Not Found'. * dirmngr/ks-engine-hkp.c (send_request): Return http status code. (ks_hkp_search): Likewise. (ks_hkp_{get,put}): Adapt call to 'send_request'. * dirmngr/ks-engine.h (ks_hkp_search): Update prototype. Signed-off-by: Justus Winter <[email protected]>
* dirmngr: Really search all keyservers for patterns.Justus Winter2015-12-041-1/+14
| | | | | | | | * dirmngr/ks-action.c (ks_action_search): Search all configured keyservers for the given patterns. Signed-off-by: Justus Winter <[email protected]> GnuPG-bug-id: 1038
* dirmngr: Handle http status '501 Not Implemented'.Justus Winter2015-12-041-0/+4
| | | | | | | | * dirmngr/ks-engine-hkp.c (send_request): Handle status 501 and return GPG_ERR_NOT_IMPLEMENTED. Signed-off-by: Justus Winter <[email protected]> GnuPG-bug-id: 1221
* tools/gpgtar: Implement symmetric encryption.Justus Winter2015-12-043-3/+20
| | | | | | | | | * tests/openpgp/gpgtar.test: Add test case. * tools/gpgtar-create.c (gpgtar_create): Pass '--symmetric' flag to gpg. * tools/gpgtar.c (parse_arguments): We do handle the argument now. Signed-off-by: Justus Winter <[email protected]>
* tools/gpgtar: Implement signing.Justus Winter2015-12-044-18/+60
| | | | | | | | | | | | | * tests/openpgp/gpgtar.test: Test signing. * tools/gpgtar-create.c (gpgtar_create): Add 'sign' option, add the appropriate gpg arguments to implement signing and selecting the local user. * tools/gpgtar.c (parse_options): We do handle '--local-user' now. (main): Handle signing, encrypting, and doing both when creating an archive. * tools/gpgtar.h (gpgtar_create): Update prototype. Signed-off-by: Justus Winter <[email protected]>
* tools/gpgtar: Use the new exectool helper.Justus Winter2015-12-045-29/+82
| | | | | | | | | | | | * tools/Makefile.am: gpgtar now requires neither npth nor libassuan. * tools/gpgtar-create.c (gpgtar_create): Use the new 'sh-exectool' helper. * tools/gpgtar-extract.c (gpgtar_extract): Likewise. * tools/gpgtar-list.c (gpgtar_list): Likewise. * tools/gpgtar.c (main): Set default gpg program. Drop the initialization of npth and libassuan. Signed-off-by: Justus Winter <[email protected]>
* common: Add a stream interface to 'sh-exectool'.Justus Winter2015-12-042-86/+217
| | | | | | | | | | | | * common/sh-exectool.c (struct copy_buffer): Add infrastructure for copying between streams. (copy_buffer_{init,shred,do_copy,flush}): New functions. (sh_exec_tool_stream): Rework 'sh_exec_tool' to operate on streams. (nop_free): New function. (sh_exec_tool): Express this in terms of 'sh_exec_tool_stream'. * common/sh-exectool.h (sh_exec_tool_stream): New prototype. Signed-off-by: Justus Winter <[email protected]>
* common: Add header file and build the new code.Justus Winter2015-12-043-2/+38
| | | | | | | * common/Makefile.am (common_sources): Add new files. * common/sh-exectool.h: New file. Signed-off-by: Justus Winter <[email protected]>
* common: Add code to execute a helper.Werner Koch2015-12-041-0/+303
| | | | | | * common/sh-exectool.c: New file. Signed-off-by: Justus Winter <[email protected]>
* Merge branch 'STABLE-BRANCH-2-2' into wk-masterWerner Koch2015-12-044-169/+142
|\ | | | | | | | | | | | | -- I forgot to merge the updated Japanese translation into the release branch thus we need to fix it up here.
| * Post release updates.Werner Koch2015-12-042-1/+5
| | | | | | | | --
| * Release 2.1.10gnupg-2.1.10Werner Koch2015-12-041-3/+3
| |
| * po: Update Ukrainian translationYuri Chornoivan2015-12-041-82/+61
| | | | | | | | | | | | -- Merged with current POT - wk
| * po: Update Russian translationIneiev2015-12-041-83/+73
| | | | | | | | | | | | | | | | | | -- Signed-off-by: Werner Koch <[email protected]> The patch was from October 12 and thus 6 strings could not be applied due to chnaged original strings.
* | po: Japanese translation.NIIBE Yutaka2015-12-041-99/+49
|/
* speedo,w32: Improve installer.Werner Koch2015-12-041-0/+3
| | | | | | | | * build-aux/speedo/w32/inst.nsi (SEC_gnupg): Install dirmngr.conf and distsigkey.gpg. (un.gnupglast): Stop dirmngr. Signed-off-by: Werner Koch <[email protected]>
* gpg: Do not pre-check keys given on the command line.Werner Koch2015-12-044-21/+61
| | | | | | | | | | | | | | | | | | | | * g10/keydb.h (PK_LIST_ENCRYPT_TO, PK_LIST_HIDDEN, PK_LIST_CONFIG) (PK_LIST_SHIFT): New. * g10/pkclist.c (build_pk_list): Use them here. * g10/gpg.c (check_user_ids, main): Ditto. * g10/gpg.c (main): Set PK_LIST_CONFIG for REMUSR and LOCUSR. (check_user_ids): Skip check for command line specified options. -- If a key has been given on the command line and it has not been given by one of the encrypt-to options, we now skip the checks. The reason is that the actual key selection code does its own checks and provides proper status message to the caller to detect the wrong keys. Without this we would break most frontends because they expect for example STATUS_INV_RECP. Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Add command to print the resolver version.Werner Koch2015-12-041-0/+12
| | | | * dirmngr/server.c (cmd_getinfo): Add sub-command "dnsinfo".
* po: Auto-update.Werner Koch2015-12-0425-1175/+4764
| | | | --
* po: Update German translation.Werner Koch2015-12-041-47/+191
| | | | --
* gpg: Allow "help" as value for --tofu-policy.Werner Koch2015-12-041-15/+33
| | | | | | | | * g10/gpg.c (parse_tofu_policy): Add keyword "help". (parse_tofu_db_format): Ditto. -- Signed-off-by: Werner Koch <[email protected]>
* Do not translate messages printed with log_debug.Werner Koch2015-12-042-4/+5
| | | | | | | | | * common/asshelp.c (start_new_gpg_agent): Do not i18n string. (start_new_dirmngr): Ditto. * g10/mainproc.c (proc_encrypted): Ditto. Print only if debug is enabled. Signed-off-by: Werner Koch <[email protected]>
* scd: Fix for removing the prefix.NIIBE Yutaka2015-12-041-1/+1
| | | | * scd/app-openopg.c (do_decipher): Fix the condition.
* scd: Simplify saving application context.NIIBE Yutaka2015-12-041-62/+41
| | | | | | | | | | | | | | | * scd/app.c (lock_table): Remove LAST_APP field. (lock_reader, app_dump_state, application_notify_card_reset) (release_application): Follow the change. (check_conflict): New. (check_application_conflict): Lock the slot and call check_conflict. (select_application): Call check_conflict and not use LAST_APP. -- We don't need LAST_APP field but just keep the application context by APP field. Since we have a reference counter, it is possible if we can deallocate or not.
* scd: More fix for Curve25519 prefix handling.NIIBE Yutaka2015-12-041-11/+31
| | | | | | | | | | | | * scd/app-openpgp.c (do_decipher): Handle trancated cipher text. Also fix xfree bug introduced. -- In old format with no prefix, cipher text can be trancated when it is parsed as MPI. Recover the value adding back zeros. Fixes-commit: 11b2691eddc42e91651e4f95dd2731255a3e9211
* scd: Another fix for Curve25519 prefix handling.Werner Koch2015-12-031-6/+9
| | | | | | | | | | | | | * scd/app-openpgp.c (do_decipher): Check 0x02 also for 16+1 byte long INDATA. (do_decipher): Fix integer arithmetic in void pointer. (do_decipher): Add missing memcpy. -- I have not tested this fix but it is obvious. Fixes-commit: 11b2691eddc42e91651e4f95dd2731255a3e9211 Signed-off-by: Werner Koch <[email protected]>
* build: Avoid dependecy problems in "make distcheck".Werner Koch2015-12-031-0/+2
| | | | | | | | * doc/Makefile.am (gnupg.texi): Depend on defs.inc. -- Reported-by: Justus Winter Signed-off-by: Werner Koch <[email protected]>
* build: Change how caller provided CFLAGS are used by configure.Werner Koch2015-12-031-18/+16
| | | | | | | | * configure.ac: Append instead of prepend caller provided CFLAGS. -- Suggested-by: Justus Winter Signed-off-by: Werner Koch <[email protected]>
* gpg: Additional comment on commit a28ac99e.Werner Koch2015-12-030-0/+0
| | | | | | | | | | -- My statement that commit 04a6b903 changed the semantics of keydb_new was plainly wrong. Not Neal broke it but me when I initially wrote that function or copied it from gpgsm. Sorry.