aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* http: Add flag to force use of TOR (part 1)Werner Koch2015-09-183-1/+22
| | | | | | | | * common/http.h (HTTP_FLAG_FORCE_TOR): New. * common/http.c (http_raw_connect, send_request): Detect flag and return an error for now. Signed-off-by: Werner Koch <[email protected]>
* po: Update Japanese translation.NIIBE Yutaka2015-09-171-113/+110
|
* scd: Fix ccid-driver timeout for OpenPGPcard v2.1.NIIBE Yutaka2015-09-171-3/+6
| | | | | | | | | | | | * scd/ccid-driver.c (CCID_CMD_TIMEOUT): New. (ccid_transceive_apdu_level, ccid_transceive): Use. -- It is reported that key generation causes timeout with OpenPGPcard v2.1. Ideally, timeout value could be determined at run-time by examining card's ATR. Compile-time fixed value is OK for internal CCID driver.
* agent: New option --pinentry-invisible-char.Werner Koch2015-09-164-3/+39
| | | | | | | | | | * agent/gpg-agent.c (oPinentryInvisibleChar): New. (opts): Add option. (parse_rereadable_options): Set option. * agent/agent.h (opt): Add field pinentry_invisible_char. * agent/call-pinentry.c (start_pinentry): Pass option to pinentry. Signed-off-by: Werner Koch <[email protected]>
* g13: Move some code to a separate module.Werner Koch2015-09-166-101/+190
| | | | | | | | | | | | * g13/g13-common.c, g13/g13-common.h: New. * g13/Makefile.am (g13_SOURCES): Add new files. * g13/g13.c (g13_errors_seen): Move to g13-common.c. (cmdline_conttype): New. (main): Use g13_init_signals and g13_install_emergency_cleanup. (emergency_cleanup, g13_exit): Move to g13-common.c. * g13/g13.h: Move OPT and some other code to g13-common.h. Signed-off-by: Werner Koch <[email protected]>
* gpg: Fix skip function dummy parameter.Werner Koch2015-09-161-2/+2
| | | | | | | | | | * g10/trustdb.c (search_skipfnc): Fix dummy argument -- This is required due to the prototype change in commit 9acbeac23668a1d0dabca27d7825430d76e095c2 Signed-off-by: Werner Koch <[email protected]>
* gpg: Change last commit to avoid extra translations.Werner Koch2015-09-161-4/+20
| | | | | | | * g10/keyedit.c (keyedit_menu): Do not print usage hints in expert mode. Signed-off-by: Werner Koch <[email protected]>
* g10: Improve error message.Neal H. Walfield2015-09-161-4/+4
| | | | | | | | * g10/keyedit.c (keyedit_menu): When complaining that a user ID or key must be selected, indicate what command to use to do this. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* g10: Be more careful when merging self-signed data.Neal H. Walfield2015-09-161-3/+21
| | | | | | | | | | | * g10/getkey.c (merge_selfsigs_main): Stop looking for self-signed data belonging to the public key when we encounter an attribute packet or a subkey packet, not just a user id packet. When looking for self-signed data belonging to a user id packet, stop when we see a user attribute packet. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* g10: Simplify some complicated boolean expressions.Neal H. Walfield2015-09-161-8/+29
| | | | | | | * g10/getkey.c (finish_lookup): Simplify logic. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* g10: Also mark revoked and expired keys as unusable.Neal H. Walfield2015-09-161-2/+6
| | | | | | | | * g10/getkey.c (skip_unusable): Also mark the key as unusable if it has been revoked or has expired. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* g10: Release resources when returning an error in get_seckey.Neal H. Walfield2015-09-161-1/+5
| | | | | | | | * g10/getkey.c (get_seckey): If the key doesn't have a secret key, release *PK. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* g10: Improve documentation and comments for getkey.c.Neal H. Walfield2015-09-162-179/+661
| | | | | | | | | * g10/getkey.c: Improve documentation and comments for most functions. Move documentation for public functions from here... * g10/keydb.h: ... to here. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* g10: Remove unused function have_any_secret_key.Neal H. Walfield2015-09-161-14/+0
| | | | | | | * g10/getkey.c (have_any_secret_key): Remove function. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* g10: Bring cache semantics closer to non-cache semantics.Neal H. Walfield2015-09-161-3/+7
| | | | | | | | * g10/getkey.c (get_pubkey_fast): When reading from the cache, only consider primary keys. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* g10: Break out of the loop earlier.Neal H. Walfield2015-09-161-6/+9
| | | | | | | | | | * g10/getkey.c (have_secret_key_with_kid): Once we find the relevent key or subkey, stop searching. -- Signed-off-by: Neal H. Walfield <[email protected]>. Only a single key or subkey will ever be selected per keyblock.
* g10: Don't skip legacy keys if the search mode is KEYDB_SEARCH_MODE_NEXTNeal H. Walfield2015-09-161-1/+2
| | | | | | | | | | | | | * g10/getkey.c (lookup): Also don't skip legacy keys if the search mode is KEYDB_SEARCH_MODE_NEXT. -- Signed-off-by: Neal H. Walfield <[email protected]>. We currently don't skip keys if the search mode is KEYDB_SEARCH_MODE_FIRST. Since we change KEYDB_SEARCH_MODE_FIRST to KEYDB_SEARCH_MODE_NEXT (to avoid a reset), it only makes sense to have the same semantics for KEYDB_SEARCH_MODE_NEXT.
* g10: Remove unused function get_seckeyblock_byfprint.Neal H. Walfield2015-09-162-32/+0
| | | | | | | | * g10/keydb.h (get_seckeyblock_byfprint): Remove prototype. * g10/getkey.c (get_seckeyblock_byfprint): Remove function. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* g10: Remove unused function get_seckey_byfprint.Neal H. Walfield2015-09-162-38/+0
| | | | | | | | * g10/keydb.h (get_seckey_byfprint): Remove prototype. * g10/getkey.c (get_seckey_byfprint): Remove function. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* g10: Simplify get_seckey_byname: it was never called with NAME not NULL.Neal H. Walfield2015-09-163-9/+4
| | | | | | | | | | | | * g10/keydb.h (get_seckey_byname): Rename from this... (get_seckey_default): ... to this. Drop the parameter name. Update users. * g10/getkey.c (get_seckey_byname): Rename from this... (get_seckey_default): ... to this. Drop the parameter name. Drop the code which assumed that NAME is not NULL. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* g10: Eliminate the redundant function get_keyblock_byfprint.Neal H. Walfield2015-09-163-33/+1
| | | | | | | | | * g10/keydb.h (get_keyblock_byfprint): Remove prototype. Replace use of this function with get_pubkey_byfprint. * g10/getkey.c (get_pubkey_byname): Remove function. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* g10: Simplify semantics of get_pubkey_byname.Neal H. Walfield2015-09-161-8/+6
| | | | | | | | | | | * g10/getkey.c (get_pubkey_byname): If R_KEYBLOCK is not NULL, return the keyblock in R_KEYBLOCK independent of whether PK is set or not. -- Signed-off-by: Neal H. Walfield <[email protected]>. Currently, no caller invokes get_pubkey_byname with PK==NULL and R_KEYBLOCK != NULL. Thus, this change does not change any behavior.
* g10: Eliminate the redundant function get_pubkey_byname.Neal H. Walfield2015-09-161-30/+2
| | | | | | | | * g10/getkey.c (get_pubkey_byname): Remove function. (lookup): Replace use of get_pubkey_byname by get_pubkey_byfprint. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* g10: Eliminate the redundant function get_pubkey_end.Neal H. Walfield2015-09-163-22/+14
| | | | | | | | | * g10/keydb.h (get_pubkey_end): Remove declaration. Replace use of function with getkey_end. * g10/getkey.c (get_pubkey_byname): Remove function. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* g10: Eliminate the redundant function get_pubkey_next.Neal H. Walfield2015-09-163-8/+1
| | | | | | | | | | * g10/keydb.h (get_pubkey_next): Remove prototype. * g10/getkey.c (get_pubkey_next): Remove function. * g10/keylist.c (locate_one): Use getkey_next instead of get_pubkey_next. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* kbx: Change skipfnc's prototype so that we can provide all information.Neal H. Walfield2015-09-164-14/+31
| | | | | | | | | | | | | | | | * kbx/keybox-search-desc.h (struct keydb_search_desc.skipfnc): Change third parameter to be the index of the user id packet in the keyblock rather than the packet itself. Update users. -- Signed-off-by: Neal H. Walfield <[email protected]>. The keybox code doesn't work directly with keyblocks. As such, the matched user packet is not readily available to pass to DESC[n].SKIPFNC. But, we do know the index of the user id packet that matched. Thus, pass that instead. If the skip function needs the user id packet, it can use the key id to look up the key block and find the appropriate packet.
* g10: Remove unused prototype (get_pubkey_byfpr).Neal H. Walfield2015-09-161-1/+0
| | | | | | | * g10/keydb.h (get_pubkey_byfpr): Remove unused prototype. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* g10: Remove unused function (get_pubkey_bynames).Neal H. Walfield2015-09-162-18/+1
| | | | | | | | * g10/keydb.h (get_pubkey_bynames): Remove prototype. * g10/getkey.c (get_pubkey_bynames): Remove function. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* g10: Simplify code. Turn struct getkey_ctx_s.found_key into an argumentNeal H. Walfield2015-09-161-30/+48
| | | | | | | | | | | | | * g10/getkey.c (struct getkey_ctx_s): Remove field found_key. (lookup): Add argument ret_found_key. If not NULL, set it to the found key. Update callers. (pk_from_block): Add argument found_key. Use it instead of CTX->FOUND_KEY. Update callers. (finish_lookup): Return a KBNODE (the found key) instead of an int. Don't set CTX->FOUND_KEY. Return the found key instead. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* g10: Remove unused field struct getkey_ctx_s.kbpos.Neal H. Walfield2015-09-161-2/+0
| | | | | | | | * g10/getkey.c (struct getkey_ctx_s): Remove field kbpos. (getkey_end): Don't clear CTX->KBPOS. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* g10: Simplify code: remove field struct getkey_ctx_s.keyblock.Neal H. Walfield2015-09-161-13/+12
| | | | | | | | | | * g10/getkey.c (struct getkey_ctx_s): Remove field keyblock. (finish_lookup): Add parameter keyblock. Update caller to pass this. (lookup): Add new local variable keyblock. Use this instead of ctx->keyblock for referencing the keyblock. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* agent: Fix registering SSH Key of Ed25519.NIIBE Yutaka2015-09-161-6/+8
| | | | | | | | * agent/command-ssh.c (stream_read_string): Add the prefix of 0x40. -- GnuPG-bug-id: 2096
* po: Update Japanese translation.NIIBE Yutaka2015-09-151-26/+16
|
* Post release updates.Werner Koch2015-09-102-1/+5
| | | | --
* Release 2.1.8.gnupg-2.1.8Werner Koch2015-09-101-1/+24
|
* tests: Silence the 5gb-packet test.Werner Koch2015-09-101-1/+1
| | | | | | * tests/openpgp/4gb-packet.test: Send output to /dev/null. Signed-off-by: Werner Koch <[email protected]>
* g10: Fix make distcheck problem.Werner Koch2015-09-103-3/+36
| | | | | | | | | | | | | | | | * g10/test.c: Include string.h. (prepend_srcdir): New. Taken from Libgcrypt. (test_free): New. * g10/t-keydb.c (do_test): Malloc the filename. * g10/Makefile.am (AM_CPPFLAGS): Remove -DSOURCE_DIR (EXTRA_DIST): Add t-keydb-keyring.kbx. -- Using SOURCE_DIR should in general work but we have seen problems when doing this in Libgcrypt. Using the srcdir variable gives us anyway more flexibility and aligns with the way we do it in tests/openpgp. Signed-off-by: Werner Koch <[email protected]>
* g10: Improve portability of the new test driver.Werner Koch2015-09-102-9/+27
| | | | | | | | | | | | | | | | | | | | * g10/test.c: Include stdio.h and stdlib.h. (verbose): New. (print_results): Rename to exit_tests. (main): Remove atexit and call exit_tests. Set verbose. (ASSERT, ABORT): Call exit_tests instead of exit. -- Calling exit from an exit handler is undefined behaviour. It works on Linux but other systems will hit an endless loop. That is indeed unfortunate but we can't do anything about it. Calling _exit() would be possible but that may lead to other problems. Thus we change to call a custom exit function :-(. Using "make check verbose=1" is supported by tests/openpgp and thus we add the same mechanism here. Signed-off-by: Werner Koch <[email protected]>
* po: Auto-updateWerner Koch2015-09-1025-584/+1272
| | | | --
* po: Update Russian translationIneiev2015-09-101-14/+9
| | | | --
* dirmngr: Allow sending much larger keyblocks.Werner Koch2015-09-091-4/+9
| | | | | | | * dirmngr/server.c (MAX_CERT_LENGTH): Increase to 16k. (MAX_KEYBLOCK_LENGTH): Increase to 20M. Signed-off-by: Werner Koch <[email protected]>
* doc: Minor comment fixes.Werner Koch2015-09-092-7/+10
| | | | --
* scd: Force key attribute change for writekey.NIIBE Yutaka2015-09-071-33/+62
| | | | | | | * scd/app-openpgp.c (change_rsa_keyattr): New. (change_keyattr_from_string): Use change_rsa_keyattr. (rsa_writekey): Call change_rsa_keyattr when different size. (ecc_writekey): Try to change key attribute.
* scd: KEYNO cleanup.NIIBE Yutaka2015-09-071-70/+67
| | | | | | | * scd/app-openpgp.c (get_public_key, send_keypair_info, do_readkey) (change_keyattr, change_keyattr_from_string, ecc_writekey, do_genkey) (compare_fingerprint, check_against_given_fingerprint): KEYNO starts from 0.
* g10: Remove unused field req_algo.Neal H. Walfield2015-09-022-5/+0
| | | | | | | | | | * g10/packet.h (PKT_public_key): Remove unused field req_algo. Remove users. * g10/getkey.c (struct getkey_ctx_s): Remove unused field req_algo. Remove users. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* g10: Use a symbolic constant instead of a literal.Neal H. Walfield2015-09-021-10/+13
| | | | | | | | | | | * g10/trustdb.c (KEY_HASH_TABLE_SIZE): Define. (new_key_hash_table): Use KEY_HASH_TABLE_SIZE instead of a literal. (release_key_hash_table): Likewise. (test_key_hash_table): Likewise. (add_key_hash_table): Likewise. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* g10: Add test for keydb as well as new testing infrastructure.Neal H. Walfield2015-09-025-3/+647
| | | | | | | | | | | | | | | * g10/Makefile.am (EXTRA_DIST): Add test.c. (AM_CPPFLAGS): Add -DSOURCE_DIR="\"$(srcdir)\"". (module_tests): Add t-keydb. (t_keydb_SOURCES): New variable. (t_keydb_LDADD): Likewise. * g10/t-keydb.c: New file. * g10/t-keydb-keyring.kbx: New file. * g10/test-stubs.c: New file. * g10/test.c: New file. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* g10: Make the keyblock cache per-handle rather than global.Neal H. Walfield2015-09-021-54/+57
| | | | | | | | | | | | * g10/keydb.c (keyblock_cache): Don't declare this variable. Instead... (struct keyblock_cache): ... turn its type into this first class object... (struct keydb_handle): ... and instantiate it once per database handle. Update all users. (keydb_rebuild_caches): Don't invalidate the keyblock cache. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* g10: If iobuf_seek fails when reading from the cache, do a hard read.Neal H. Walfield2015-09-021-11/+19
| | | | | | | | | * g10/keydb.c (keydb_get_keyblock): If the iobuf_seek fails when reading from the cache, then simply clear the cache and try reading from the database. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* iobuf: Reduce verbosity of test.Neal H. Walfield2015-09-021-0/+2
| | | | | | | * common/t-iobuf.c (main): Reduce verbosity. -- Signed-off-by: Neal H. Walfield <[email protected]>.