aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* gpg: Add variant of 'key "%s" not found: %s' error message.Werner Koch2015-12-032-3/+2
| | | | | | | * g10/gpg.c (check_user_ids): Change error message. * g10/delkey.c (do_delete_key): Ditto. Signed-off-by: Werner Koch <[email protected]>
* gpg: Make keyidlist more robust in case of errors.Werner Koch2015-12-031-1/+4
| | | | | | * g10/keyserver.c (keyidlist): Clear *KLIST on error. Signed-off-by: Werner Koch <[email protected]>
* gpg: Take care of keydb_new returning NULL.Werner Koch2015-12-0316-37/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/keydb.c (keydb_new): Print an error message if needed. Also use xtrycalloc because we return an error anyway. * g10/delkey.c (do_delete_key): Handle error retruned by keydb_new. * g10/export.c (do_export_stream): Ditto. * g10/getkey.c (get_pubkey): Ditto. (get_pubkey_fast): Ditto. (get_pubkeyblock): Ditto. (get_seckey): Ditto. (key_byname): Ditto. (get_pubkey_byfprint): Ditto. (get_pubkey_byfprint_fast): Ditto. (parse_def_secret_key): Ditto. (have_secret_key_with_kid): Ditto. * g10/import.c (import_one): Ditto. (import_revoke_cert): Ditto. * g10/keyedit.c (keyedit_quick_adduid): Ditto. * g10/keygen.c (quick_generate_keypair): Ditto. (do_generate_keypair): Ditto. * g10/trustdb.c (validate_keys): Ditto. * g10/keyserver.c (keyidlist): Ditto. * g10/revoke.c (gen_desig_revoke): Ditto. (gen_revoke): Ditto. * g10/gpg.c (check_user_ids): Ditto. (main): Do not print an error message for keydb_new error. * g10/keylist.c (list_all): Use actual error code returned by keydb_new. * g10/t-keydb-get-keyblock.c (do_test): Abort on keydb_new error. * g10/t-keydb.c (do_test): Ditto. * g10/keyring.c (keyring_new): Actually return an error so that the existing keydb_new error checking makes sense for a keyring resource. (keyring_rebuild_cache): Take care of keyring_new returning an error. -- Commit 04a6b903 changed keydb_new to return an error. However the error was not checked at most places which we fix with this patch. To make things easier keydb_new prints an error message itself. Signed-off-by: Werner Koch <[email protected]>
* gpg: Change some error messages.Werner Koch2015-12-036-43/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/getkey.c (parse_def_secret_key): Change error message. Replace log_debug by log_info. * g10/gpg.c (check_user_ids): Make function static. Change error messages. (main): Change error messages. * g10/revoke.c (gen_revoke): Ditto. -- There are other smaller changes not described above. This change tries to avoid new error messages so not to increase the the number of translated strings or break too many existing translations. It also tries to use existing strings and changes the quoting to the most common style used in gpg. Key specifications should in general use double quotes. Other values should use single quotes. However. sometimes it is not easy to distinguish between values given on the command line and key specifications. According to old GNU coding standards diagnostics should not start capitalized - whether this is a good idea is a different thing but we used this rules for most strings. However, strings which are used interactively should be properly capitalized and end with a dot. Signed-off-by: Werner Koch <[email protected]>
* scd: Fix "Conflicting usage" bug.NIIBE Yutaka2015-12-033-28/+11
| | | | | | | | | | | | | | | | | | | | * scd/apdu.c (apdu_close_reader): Call CLOSE_READER method even if we got an error from apdu_disconnect. * scd/app-common.h (no_reuse): Remove. * scd/app.c (application_notify_card_reset): Deallocate APP here. (select_application, release_application): Don't use NO_REUSE. -- Reproducible scenario: Invoke gpg --card-edit session from a terminal. Invoke another gpg --card-edit session from another. Remove a token. Insert a token again. Type RET on both terminals. One of terminal answers "Conflicting usage". Perhaps, having NO_REUSE field was to avoid race conditions. Now, APP can be safely deallocated by application_notify_card_reset. Thanks to the2nd.
* scd: Fix for Curve25519 prefix handling.NIIBE Yutaka2015-12-021-1/+26
| | | | | * scd/app-openpgp.c (do_decipher): More condition for AES decipher. Handle the prefix in cipher text. Always add the prefix in result.
* gpg: Use the matching key if the search description is exact.Neal H. Walfield2015-12-0211-8/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/gpg.c (check_user_ids): If the search description is for an exact match (a keyid or fingerprint that ends in '!'), then use the matching key, not the primary key. * tests/openpgp/Makefile.am (TESTS): Add use-exact-key.test. (priv_keys): Add privkeys/00FE67F28A52A8AA08FFAED20AF832DA916D1985.asc, privkeys/1DF48228FEFF3EC2481B106E0ACA8C465C662CC5.asc, privkeys/A2832820DC9F40751BDCD375BB0945BA33EC6B4C.asc, privkeys/ADE710D74409777B7729A7653373D820F67892E0.asc and privkeys/CEFC51AF91F68A2904FBFF62C4F075A4785B803F.asc. (sample_keys): Add samplekeys/E657FB607BB4F21C90BB6651BC067AF28BC90111.asc. * tests/openpgp/privkeys/00FE67F28A52A8AA08FFAED20AF832DA916D1985.asc: New file. * tests/openpgp/privkeys/1DF48228FEFF3EC2481B106E0ACA8C465C662CC5.asc: New file. * tests/openpgp/privkeys/A2832820DC9F40751BDCD375BB0945BA33EC6B4C.asc: New file. * tests/openpgp/privkeys/ADE710D74409777B7729A7653373D820F67892E0.asc: New file. * tests/openpgp/privkeys/CEFC51AF91F68A2904FBFF62C4F075A4785B803F.asc: New file. * tests/openpgp/samplekeys/E657FB607BB4F21C90BB6651BC067AF28BC90111.asc: New file. * tests/openpgp/use-exact-key.test: New file. * tests/openpgp/version.test: Install the new private keys. -- Signed-off-by: Neal H. Walfield <[email protected]> Reported-by: Reported-by: Kristian Fiskerstrand <[email protected]> Fixes-commit: 10cca02
* build: Require at least Libassuan 2.4.1.Werner Koch2015-12-025-65/+2
| | | | | | | | | | | | | | | * configure.ac (NEED_LIBASSUAN_VERSION): Set to 2.4.1. * agent/gpg-agent.c (create_server_socket): Remove check for libassuan >= 2.3.0 and >= 2.1.4. (main): Remove check for libassuan >= 2.1.4. * scd/scdaemon.c (create_server_socket): Remove check for libassuan >= 2.1.4. * dirmngr/dirmngr.c (set_tor_mode): Remove check for libassuan >= 2.3.0. * dirmngr/http.c (http_raw_connect, send_request): Remove checks for libassuan >= 2.3.0. Signed-off-by: Werner Koch <[email protected]>
* gpg: Improve documentation.Neal H. Walfield2015-12-021-2/+1
| | | | | | | * g10/tofu.c (initdb): Improve documentation. -- Signed-off-by: Neal H. Walfield <[email protected]>
* gpg: Fix type mismatch resulting in a buffer overflow.Neal H. Walfield2015-12-021-1/+4
| | | | | | | | | | | * g10/tofu.c (record_binding): Change policy_old's type from an enum tofu_policy to a long: this variable is passed by reference and a long is expected. -- Signed-off-by: Neal H. Walfield <[email protected]> Reported-by: Justus Winter <[email protected]> Fixes-commit: f77913e
* dirmngr: Switch to an onion address if Tor is running.Werner Koch2015-12-025-31/+132
| | | | | | | | | | | | | | | | | | | | | | | | * dirmngr/dirmngr.h (opt): Turn field 'keyserver' into an strlist. * dirmngr/dirmngr.c (parse_rereadable_options): Allow multiple --keyserver options. * dirmngr/server.c (server_local_s): Add field 'tor_state'. (release_uri_item_list): New. (release_ctrl_keyservers): Use it. (start_command_handler): Release list of keyservers. (is_tor_running): New. (cmd_getinfo): Re-implement "tor" subcommand using new fucntion. (ensure_keyserver): Rewrite. * g10/dirmngr-conf.skel: Add two keyserver options. -- This feature is independent of --use-tor and automagically uses Tor if available. The dirmngr.conf file needs to specify two keyservers to make this work. For new installations this is done using the skeleton file. This feature requires the Libassuan 2.4.2 to work. This patch also fixes a memory leak of opt.keyserver en passant. Signed-off-by: Werner Koch <[email protected]>
* http: Enhance parser to detect .onion addresses.Werner Koch2015-12-023-33/+45
| | | | | | | | * dirmngr/http.h (parsed_uri_s): Add flag 'onion'. * dirmngr/http.c (do_parse_uri): Set that flag. * dirmngr/t-http.c (main): Print flags. Signed-off-by: Werner Koch <[email protected]>
* common,gpg: Fix processing of search descriptions ending in '!'.Neal H. Walfield2015-12-022-5/+25
| | | | | | | | | | | | | | | * g10/gpg.c (check_user_ids): If the search description describes a keyid or fingerprint and ends in a '!', include the '!' in the rewritten description. * common/userids.c (classify_user_id): Accept keyids and fingerprints ending in '!'. -- Signed-off-by: Neal H. Walfield <[email protected]> Reported-by: Kristian Fiskerstrand <[email protected]> Fixes-commit: f99830b7 Fixes-commit: e8c53fca
* dirmngr: Improve error handling.Justus Winter2015-12-011-3/+2
| | | | | | | | | | * dirmngr/dns-stuff.c (getsrv): Avoid looking at 'header' before checking for errors, but silently ignore errors when looking up SRV records. -- This is a follow-up to 946faaff. Signed-off-by: Justus Winter <[email protected]>
* Update NEWS fileWerner Koch2015-12-011-0/+54
| | | | --
* build: Let configure show the the status of Tor supportWerner Koch2015-12-011-1/+26
| | | | | | * configure.ac (show_tor_support): New Signed-off-by: Werner Koch <[email protected]>
* doc: Clarify dirmngr's --keyserver option.Werner Koch2015-11-301-2/+2
| | | | | -- GnuPG-bug-id: 2165
* doc: Typo fix.Werner Koch2015-11-301-1/+1
| | | | --
* doc: Make make distcheck work again.Werner Koch2015-11-301-1/+1
| | | | | | * doc/Makefile.am (DISTCLEANFILES): Add gpgkey2ssh.1 Signed-off-by: Werner Koch <[email protected]>
* yat2m: Add keyword @url.Werner Koch2015-11-301-0/+1
| | | | | | * doc/yat2m.c (proc_texi_cmd): Add keyword @url. Signed-off-by: Werner Koch <[email protected]>