aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* po: correct label tags in Polish translationemma peel2018-04-161-34/+34
| | | | Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* po: correct label tags in Finnish translationemma peel2018-04-161-24/+24
| | | | Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* build: New target "release" to automate the release process.Werner Koch2018-04-151-2/+73
| | | | | | | | | | | | | | * Makefile.am (RELEASE_ARCHIVE_DIR): New. (RELEASE_SIGNING_KEY): New. (AM_DISTCHECK_CONFIGURE_FLAGS): Remove removed --enable-gpg2-is-gpg, (RELEASE_NAME, RELEASE_W32_STEM_NAME): New. (release, sign-release): New. -- This requires GNU make and also some other decent utilities; however, they are anyway required for building the W32 installer. Signed-off-by: Werner Koch <[email protected]>
* g10: Fix memory leak in check_sig_and_print.NIIBE Yutaka2018-04-131-0/+1
| | | | | | | | | * g10/mainproc.c (check_sig_and_print): Free the public key. -- GnuPG-bug-id: 3900 Signed-off-by: NIIBE Yutaka <[email protected]>
* g10: Push compress filter only if compressed.NIIBE Yutaka2018-04-131-5/+8
| | | | | | | | | | | | * g10/compress.c (handle_compressed): Fix memory leak. -- All other calls of push_compress_filter checks ALGO, so, do it here, too. GnuPG-bug-id: 3898 Signed-off-by: NIIBE Yutaka <[email protected]>
* po: Update Spanish translationemma peel2018-04-121-2183/+1536
| | | | | | -- Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* gpg: Extend the "sig" record in --list-mode.Werner Koch2018-04-1210-21/+55
| | | | | | | | | | | | | | | | | | | | | | | | * g10/getkey.c (get_user_id_string): Add arg R_NOUID. Change call callers. (get_user_id): Add arg R_NOUID. Change call callers. * g10/mainproc.c (issuer_fpr_string): Make global. * g10/keylist.c (list_keyblock_colon): Print a '?' for a missing key also in --list-mode. Print the "issuer fpr" field also if there is an issuer fingerprint subpacket. -- Scripts used to rely on the "User ID not found" string even in the --with-colons listing. However, that is not a good idea because that string is subject to translations etc. Now we have an explicit way of telling that a key is missing. For example: gpg --list-sigs --with-colons | \ awk -F: '$1=="sig" && $2=="?" {if($13){print $13}else{print $5}}' Prints all keyids or fingerprint of signing keys for which we do not have the key in our local keyring. Signed-off-by: Werner Koch <[email protected]>
* gpg: Extend the ERRSIG status line with a fingerprint.Werner Koch2018-04-123-23/+50
| | | | | | | | | | | | | | * g10/mainproc.c (issuer_fpr_raw): New. (issuer_fpr_string): Re-implement using issuer_fpr_rtaw. (check_sig_and_print): Don't free ISSUER_FPR. Use ISSUER_FPR_RAW. Use write_status_printf. Extend ERRSIG status. -- Modern OpenPGP implementations put the ISSUER_FPR into the signature to make it easier to discover the, public needed to check the signature. This is also useful in error messages and thus we add it. Signed-off-by: Werner Koch <[email protected]>
* gpg: Relax printing of STATUS_FAILURE.Werner Koch2018-04-121-1/+1
| | | | | | | | | | | | | | | | * g10/gpg.c (g10_exit): Print STATUS_FAILURE only based on passed return code and not on the presence of any call to log_error. -- This fixes an actual regression in GPGME where FAILURE is considered for example by a signature verify operation. The operation will simply fail and not just record that that a signature could not be verified. In particular for files with more than one signature a log_error if often called to show that a pubkey is missing for one of the signatures. Using that log_error is correct in that case. Fixes-commit: 0336e5d1a7b9d46e06c838e6a98aecfcc9542882 Signed-off-by: Werner Koch <[email protected]>
* agent,dirmngr: Add "getenv" to the getinfo command.Werner Koch2018-04-122-1/+37
| | | | | | | | | | | * agent/command.c (cmd_getinfo): Add sub-command getenv. * dirmngr/server.c (cmd_getinfo): Ditto. -- It is sometimes helpful to be able to inspect certain envvars in a running agent. For example "http_proxy". Signed-off-by: Werner Koch <[email protected]>
* build: Update getswdb version check to 2.2Andre Heinecke2018-04-121-2/+2
| | | | | * build-aux/getswdb.sh: Check for gnupg22_ver gnupg21_ver no longer exists.
* po: Update Japanese translation.NIIBE Yutaka2018-04-121-53/+48
| | | | | | -- Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg: New option --no-symkey-cache.Werner Koch2018-04-115-2/+22
| | | | | | | | | | * g10/gpg.c (oNoSymkeyCache): New. (opts): Add that option. (main): Set var. * g10/options.h (struct opt): New field no_symkey_cache. * g10/passphrase.c (passphrase_to_dek): Implement that feature. Signed-off-by: Werner Koch <[email protected]>
* agent: Improve the unknown ssh flag detection.Werner Koch2018-04-101-24/+31
| | | | | | | | * agent/command-ssh.c (ssh_handler_sign_request): Simplify detection of flags. -- Signed-off-by: Werner Koch <[email protected]>
* agent: unknown flags on ssh signing requests cause an error.T3880-fixT3880Daniel Kahn Gillmor2018-04-091-1/+9
| | | | | | | | | | | | | | | | | | * agent/command-ssh.c (ssh_handler_sign_request): if a flag is passed during an signature request that we do not know how to apply, return GPG_ERR_UNKNOWN_OPTION. -- https://tools.ietf.org/html/draft-miller-ssh-agent-02#section-4.5 says: If the agent does not support the requested flags, or is otherwise unable or unwilling to generate the signature (e.g. because it doesn't have the specified key, or the user refused confirmation of a constrained key), it must reply with a SSH_AGENT_FAILURE message. Signed-off-by: Daniel Kahn Gillmor <[email protected]> GnuPG-bug-id: 3880
* agent: change documentation reference for ssh-agent protocol.Daniel Kahn Gillmor2018-04-091-2/+4
| | | | | | | | | | * agent/command-ssh.c: repoint documentation reference. -- Damien Miller is now documenting the ssh-agent protocol via the IETF. Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* Post release updatesWerner Koch2018-04-092-1/+5
| | | | --
* Release 2.2.6gnupg-2.2.6Werner Koch2018-04-091-1/+44
|
* po: Auto-update.Werner Koch2018-04-0925-893/+2284
| | | | --
* po: Update German translationWerner Koch2018-04-091-41/+82
| | | | | | -- Signed-off-by: Werner Koch <[email protected]>
* doc: Typo fix in gpg.texiWerner Koch2018-04-091-1/+1
| | | | | | -- Reported-by: Cody Brownstein
* gpg,w32: Fix empty homedir when only a drive letter is used.Werner Koch2018-04-091-32/+63
| | | | | | | | | | | | | | | | | * common/homedir.c (copy_dir_with_fixup): New. (default_homedir): Use here. (gnupg_set_homedir): And here . -- This actually fixes a couple of cases for Windows. Both --home-dir and GNUPGHOME. The interpretation of "c:" -> "c:/" might not be the correct one but because we need an absolute dir anyway it is the less surprising one. Note that this does not include a full syntax check and fixup and thus it is very well possible that the result is not an absolute directory. GnuPG-bug-id: 3720 Signed-off-by: Werner Koch <[email protected]>
* doc: Add an example for --default-new-key-algoWerner Koch2018-04-092-5/+14
| | | | --
* doc: Document --key-edit:change-usageWerner Koch2018-04-092-3/+14
| | | | | | | | * g10/keyedit.c (menu_changeusage): Make strings translatable. -- GnuPG-bug-id: 3816 Signed-off-by: Werner Koch <[email protected]>
* gpg: Check that a key may do certifications.Werner Koch2018-04-061-0/+21
| | | | | | | | | | * g10/sig-check.c (check_signature_end_simple): Check key usage for certifications. (check_signature_over_key_or_uid): Request usage certification. -- GnuPG-bug-id: 3844 Signed-off-by: Werner Koch <[email protected]>
* gpg: Emit FAILURE stati now in almost all cases.Werner Koch2018-04-063-11/+65
| | | | | | | | | | | | | | | | * g10/cpr.c (write_status_failure): Make it print only once. * g10/gpg.c (wrong_args): Bump error counter. (g10_exit): Print a FAILURE status if we ever did a log_error etc. (main): Use log_error instead of log_fatal at one place. Print a FAILURE status for a bad option. Ditto for certain exit points so that we can see different error locations. -- This makes it easier to detect errors by tools which have no way to get the exit code (e.g. due to double forking). GnuPG-bug-id: 3872 Signed-off-by: Werner Koch <[email protected]>
* doc: Add a code comment about back signatures.Werner Koch2018-04-061-1/+3
| | | | --
* gpg: Re-indent sig-check.c and use signature class macros.Werner Koch2018-04-062-387/+372
| | | | | | | | | | * g10/keydb.h (IS_BACK_SIG): New. * g10/sig-check.c: Re-indent and use macros. -- This makes the code easier to understand. Signed-off-by: Werner Koch <[email protected]>
* agent: Support SSH signature flags.NIIBE Yutaka2018-04-061-1/+16
| | | | | | | | | | | | | * agent/command-ssh.c (SSH_AGENT_RSA_SHA2_256): New. (SSH_AGENT_RSA_SHA2_512): New. (ssh_handler_sign_request): Override SPEC when FLAGS is specified. -- GnuPG-bug-id: 3880 Reported-by: Daniel Kahn Gillmor <[email protected]> Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg: Add new OpenPGP card vendor.Werner Koch2018-04-051-0/+1
| | | | | | -- Signed-off-by: Werner Koch <[email protected]>
* g10: Let card-edit/key-attr show message when change.NIIBE Yutaka2018-04-051-8/+14
| | | | | | | * g10/card-util.c (ask_card_rsa_keysize): Don't show message here. (ask_card_keyattr): Show message when change, also for ECC. Signed-off-by: NIIBE Yutaka <[email protected]>
* tests: Fix no gpg-agent upon removal of GNUPGHOME.NIIBE Yutaka2018-04-047-13/+28
| | | | | | | | | | | | | | | | | | | | | | * tests/gpgscm/gnupg.scm (with-ephemeral-home-directory): Add teadown-fn. * tests/gpgsm/export.scm: Use -no-atexit version and stop-agent. * tests/openpgp/decrypt-session-key.scm: Likewise. * tests/openpgp/decrypt-unwrap-verify.scm: Likewise. * tests/openpgp/defs.scm (have-opt-always-trust): Likewise. (setup-environment-no-atexit): New. (start-agent): Support no use of atexit. * tests/gpgsm/gpgsm-defs.scm (setup-gpgsm-environment-no-atexit): New. * tests/migrations/common.scm (untar-armored): Follow the change of with-ephemeral-home-directory. -- When gpg-agent detects homedir removal, it will automatically exit. Then, call of 'gpgconf --kill all' will fail. So, stop-agent should be called before the removal of homedir. Signed-off-by: NIIBE Yutaka <[email protected]>
* scd: Writing KDF resets auth state.NIIBE Yutaka2018-04-031-1/+7
| | | | | | * scd/app-openpgp.c (do_setattr): Clear auth state. Signed-off-by: NIIBE Yutaka <[email protected]>
* g10: Fix filtering by PK->REQ_USAGE.NIIBE Yutaka2018-04-021-0/+2
| | | | | | | | | * g10/getkey.c (get_pubkey_byfprint): Filter by PK->REQ_USAGE. -- GnuPG-bug-id: 3844 Signed-off-by: NIIBE Yutaka <[email protected]>
* po: Update Japanese translation.NIIBE Yutaka2018-03-301-39/+73
| | | | | | -- Signed-off-by: NIIBE Yutaka <[email protected]>
* g10: Fix card-edit/kdf-setup for single salt.NIIBE Yutaka2018-03-301-1/+3
| | | | | | * g10/card-util.c (gen_kdf_data): Use SALT_USER. Signed-off-by: NIIBE Yutaka <[email protected]>
* g10,scd: Support single salt for KDF data object.NIIBE Yutaka2018-03-302-23/+54
| | | | | | | | | | | | | | * g10/card-util.c (gen_kdf_data): Support single salt. (kdf_setup): Can have argument for single salt. * scd/app-openpgp.c (pin2hash_if_kdf): Support single salt. -- Gnuk has "admin-less" mode. To support "admin-less" mode with KDF feature, salt should be same for user and admin. Thus, I introduce a valid use of single salt. Signed-off-by: NIIBE Yutaka <[email protected]>
* g10: Add "key-attr" command for --card-edit.NIIBE Yutaka2018-03-301-53/+52
| | | | | | | | | | | * g10/card-util.c (key_attr): New explicit command. (generate_card_keys, card_generate_subkey): Don't ask key attr change. (card_edit): Add for cmdKEYATTR. -- GnuPG-bug-id: 3781 Signed-off-by: NIIBE Yutaka <[email protected]>
* scd: Support changing key attribute back to RSA.NIIBE Yutaka2018-03-301-6/+18
| | | | | | | | | | | | | | | | | * scd/app-openpgp.c (change_rsa_keyattr): Try usual RSA. -- In the OpenPGP card specification, there are multiple options to support RSA (having P and Q or not, etc.), and it is implementation dependent. Since GnuPG doesn't have knowledge which card implementation support which option and there is no way (yet) for card to express itself which key attributes are supported, we haven't supported key attribute change back to RSA. But, many card implementation uses P and Q, try this option. If other cases, factory-reset would be easier option. Signed-off-by: NIIBE Yutaka <[email protected]>
* g10: Support key attribute change at --card-edit/generate.NIIBE Yutaka2018-03-293-77/+169
| | | | | | | | | | | | | | | | * g10/card-util.c (ask_card_rsa_keysize): Drop support for magic number 25519 for ed25519/cv25519. Rename from ask_card_keyattr. (ask_card_keyattr): Support ECC, as well as RSA. (do_change_keyattr): Support ECC dropping magical number 25519. * g10/keygen.c (ask_curve): Allow call from outside, adding last arg of CURRENT. (generate_keypair): Follow the change of ask_curve. (generate_subkeypair): Likewise. -- GnuPG-bug-id: 3781 Signed-off-by: NIIBE Yutaka <[email protected]>
* g10: check_pin_for_key_operation should be just before genkey.NIIBE Yutaka2018-03-291-7/+7
| | | | | | | | | | | | | * g10/card-util.c (generate_card_keys): Check PIN later. (card_generate_subkey): Likewise. -- Changing key attribute resets PIN authentication status. So, CHECKPIN should be after that, before key generation. Note that CHECKPIN is done for binding signature. Signed-off-by: NIIBE Yutaka <[email protected]>
* g10: Change ask_curve so that it can be used outside.NIIBE Yutaka2018-03-282-30/+23
| | | | | | | | | | | | | | * g10/call-agent.h (struct key_attr): New. * g10/keygen.c (ask_curve): Return const char *. No allocation. (quick_generate_keypair): Follow the change. (generate_keypair, generate_subkeypair): Likewise. (parse_algo_usage_expire): Return const char *. -- This change is intended for using ask_curve from card-util.c. Signed-off-by: NIIBE Yutaka <[email protected]>
* agent,scd: Use pointer to represent HANDLE.NIIBE Yutaka2018-03-272-8/+12
| | | | | | | * agent/call-scd.c [HAVE_W32_SYSTEM] (start_scd): Format with %p. * scd/command.c [HAVE_W32_SYSTEM] (option_handler): Use void *. Signed-off-by: NIIBE Yutaka <[email protected]>
* agent: Make the request origin a part of the cache items.Werner Koch2018-03-278-43/+51
| | | | | | | | | | | | | | | | | | | | * agent/cache.c (agent_put_cache): Add arg 'ctrl' and change all callers to pass it. (agent_get_cache): Ditto. * agent/cache.c (struct cache_items_s): Add field 'restricted'. (housekeeping): Adjust debug output. (agent_flush_cache): Ditto. (agent_put_cache): Ditto. Take RESTRICTED into account. (agent_get_cache): Ditto. -- If requests are coming from different sources they should not share the same cache. This way we make sure that a Pinentry pops up for a remote request to a key we have already used locally. GnuPG-bug-id: 3858 Signed-off-by: Werner Koch <[email protected]>
* gpg: Auto-fix a broken trustdb with just the version record.Werner Koch2018-03-261-0/+14
| | | | | | | * g10/tdbio.c (get_trusthashrec): Create hashtable on error. GnuPG-bug-id: 3839 Signed-off-by: Werner Koch <[email protected]>
* gpg: Pass CTRL arg to get_trusthashrec.Werner Koch2018-03-264-11/+15
| | | | | | | | * g10/tdbio.c (get_trusthashrec): Add arg CTRL. (tdbio_search_trust_byfpr): Ditto. (tdbio_search_trust_bypk): Ditto. Signed-off-by: Werner Koch <[email protected]>
* gpg: Return better error codes in case of a too short trustdb.Werner Koch2018-03-261-15/+16
| | | | | | | | | | | | | * g10/tdbio.c (tdbio_read_record): Return GPG_ERR_EOF. (tdbio_new_recnum): Never return on error. (lookup_hashtable): Print a more descriptive error in case of !TABLE. -- Also: tdbio_new_recnum had a bug in that it returned an error code and not a record number in the error case. The function is expected to always return a valid new record number. Signed-off-by: Werner Koch <[email protected]>
* gpg: Fix trustdb updates without lock held.Werner Koch2018-03-261-10/+29
| | | | | | | | | | | | | | | | | | | | | | | * g10/tdbio.c (is_locked): Turn into a counter. (take_write_lock, release_write_lock): Implement recursive locks. -- On trustdb creation we have this call sequence: init_trustdb -> takes lock tdbio_set_dbname create_version_record tdbio_write_record put_record_into_cache -> takes lock put_record_into_cache -> releases lock init_trustdb -> releases lock The second take lock does noting but the first release lock has already released the lock and the second release lock is a thus a NOP. This is likely the cause for the corrupted trustdb as reported in GnuPG-bug-id: 3839 Signed-off-by: Werner Koch <[email protected]>
* gpg: Disable unused code parts in tdbio.cWerner Koch2018-03-261-3/+7
| | | | | | | | * g10/tdbio.c (in_transaction): Comment this var. (put_record_into_cache): Comment the transaction code. (tdbio_sync): Ditto Signed-off-by: Werner Koch <[email protected]>
* sm: Add OPTION request-origin.Werner Koch2018-03-231-0/+12
| | | | | | | | | | | * sm/server.c: Include shareddefs.h. (option_handler): Add option. -- This is required when running gpgsm in server mode as done by GPGME. Noet that a command line option takes precedence. Signed-off-by: Werner Koch <[email protected]>