aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* agent: Fix possible release of unitialize var in a genkey error case.Werner Koch2018-10-241-1/+1
| | | | | | | | | * agent/command.c (cmd_genkey): Initialize 'value'. -- GnuPG-bug-id: 4222 Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 2bdc4b6ed97770ed15ec6c5afa02c2e44568a3bc)
* ssh: Fix possible infinite loop in case of an read error.Werner Koch2018-10-241-3/+4
| | | | | | | | | | * agent/command-ssh.c (ssh_handler_add_identity): Handle other errors than EOF. -- GnuPG-bug-id: 4221 Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 7385e1babf6eef586c79ad23f8e541aaf608c4e5)
* tools: Fix FILE memory leak in gpg-connect-agent.Werner Koch2018-10-241-2/+4
| | | | | | | | | * tools/gpg-connect-agent.c (do_open): dup the fileno and close the stream. GnuPG-bug-id: 4220 Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 378719f25fe00d46393541f4a4f79e04484c3000)
* sm: Use the correct string in an error message.Werner Koch2018-10-241-1/+1
| | | | | | | | * sm/gpgsm.c (main): Fix error message. -- GnuPG-bug-id: 4219 (cherry picked from commit 793fd8d876777c24c4d5072301fa530333d6e1d9)
* dirmngr: Only print info for no ldapserver fileAndre Heinecke2018-10-241-1/+5
| | | | | | | | | * dirmngr/dirmngr.c (parse_ldapserver_file): Only print info for ENOENT. -- It is very common that there is no ldapserver file. In that case users are confused by an error printed at dirmngr startup.
* sm: Fix dirmngr loadcrl for intermediate certsAndre Heinecke2018-10-231-2/+26
| | | | | | | | | | * sm/call-dirmngr.c (run_command_inq_cb): Support ISTRUSTED. (inq_certificate): Distinguish unsupported inquiry error. -- When loading a CRL through "gpgsm --call-dirmngr loadcrl foo" dirmngr can ask gpgsm back if a certificate used ISTRUSTED, which previously resulted in an error.
* dirmngr: Prepare for updated WKD specs with ?l= paramWerner Koch2018-10-221-12/+21
| | | | | | | | | | | | | | | | | | * dirmngr/server.c (proc_wkd_get): Tack the raw local address to the request. -- We append the raw non-canonicalized local address part to the hash. Servers who serve the requests from static files will ignore the parameters and a test with posteo shows that also services using a database ignore the parameter. The general idea is that service providers may use their own canonicalization rules. The problem is that we currently filter the returned key for the full mail address and thus we will never see a key if the service did a different canonicalization than we. So consider this to be an experiment. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 256a280c51f9ea862e4bfb0bb530c2a96f9088f9)
* gpg: Fix extra check for sign usage of a data signature.Werner Koch2018-10-221-1/+2
| | | | | | | | | | | | * g10/sig-check.c (check_signature_end_simple): -- Obviously we should not ignore a back signature here. Fixes-commit: 214b0077264e35c079e854a8b6374704aea45cd5 GnuPG-bug-id: 4014 Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit b6275f3bda8edff34274c5b921508567f491ab9c)
* scd: Fix signing authentication status.NIIBE Yutaka2018-10-151-1/+4
| | | | | | | | | | | | | | | | * scd/app-openpgp.c (do_sign): Clear DID_CHV1 after signing. -- Cherry-picked from master commit of: 78f542e1f4495195db2e668f9cd41657fb1afc77 We have a corner case: In "not forced" situation and authenticated, and it is changed to "forced", card implementaiton can actually accept signing, but GnuPG requires authentication, because it is "forced". GnuPG-bug-id: 4177 Signed-off-by: NIIBE Yutaka <[email protected]>
* common: Fix gnupg_reopen_std.NIIBE Yutaka2018-10-021-6/+5
| | | | | | | | | | | | | | | | | * common/sysutils.c (gnupg_reopen_std): Use fcntl instead of fstat. -- Cherry-pick from master commit of: 50b02dba2060a8969da47b18d9c0ecdccbd30db4 When gpg was invoked by a Perl web application on FreeBSD, fstat in gnupg_reopen_std failed with EBADF. Using fcntl, which is considered lighter than fstat, it works fine. Since uur purpose is to check if file descriptor is valid or not, lighter operation is better. Reported-by: Marcin Gryszkalis <[email protected]> Signed-off-by: NIIBE Yutaka <[email protected]>
* po: Update Japanese translation.NIIBE Yutaka2018-09-181-11/+8
| | | | | | -- Signed-off-by: NIIBE Yutaka <[email protected]>
* common: Use iobuf_get_noeof to avoid undefined behaviors.NIIBE Yutaka2018-09-101-3/+3
| | | | | | | | | | | | | | | | * common/iobuf.c (block_filter): Use iobuf_get_noeof. -- Cherry-pick from master commit of: f80346f42df4bdc7d0a9741c3922129aceae4f81 When singed integer has negative value, left shift computation is undefined in C. GnuPG-bug-id: 4093 Reported-by: Philippe Antoine Signed-off-by: NIIBE Yutaka <[email protected]>
* agent: Fix error code check from npth_mutex_init.NIIBE Yutaka2018-09-101-2/+6
| | | | | | | | | | | | | | | | * agent/call-pinentry.c (initialize_module_call_pinentry): It's an error when npth_mutex_init returns non-zero. -- Cherry-pick from master commit of: adce73b86fd49d5bbb8884231a26cc7533d400e2 Actually, initialize_module_call_pinentry is only called once from main. So, this bug had no harm and having the static variable INITIALIZED is not needed. Signed-off-by: NIIBE Yutaka <[email protected]>
* g10: Fix memory leak.NIIBE Yutaka2018-09-071-0/+2
| | | | | | | | | | | | | * g10/import.c (read_block): Call free_packet to skip the packet. -- Cherry-pick of master commit of: 7c96cc67e108f3a9514a4222ffac2f9f9a2ab19e Reported-by: Philippe Antoine GnuPG-bug-id: 3916 Signed-off-by: NIIBE Yutaka <[email protected]>
* Fix use of strncpy, which is actually good to use memcpy.NIIBE Yutaka2018-09-062-2/+2
| | | | | | | | | | | | * common/ssh-utils.c (get_fingerprint): Use memcpy. * g10/build-packet.c (string_to_notation): Use memcpy. -- Cherry-pick of master commit of: 625ced6e672daa892d334323cce6b3d42a6f929f Signed-off-by: NIIBE Yutaka <[email protected]>
* Post release updates.Werner Koch2018-08-3027-803/+813
| | | | --
* Release 2.2.10gnupg-2.2.10Werner Koch2018-08-301-2/+16
|
* po: Update Russian translation.Ineiev2018-08-301-31/+18
|
* po: Update German translationWerner Koch2018-08-301-42/+46
| | | | --
* gpg: Explain error message in key generation with --batchWerner Koch2018-08-291-1/+3
| | | | | | | | | * g10/keygen.c (generate_keypair): Show more info. -- GnuPG-bug-id: 3912 Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 1bfe766bcf3959135333900934f1a15c9b96c3cf)
* doc: Minor additions to the gpg man pageWerner Koch2018-08-291-4/+10
| | | | | | | | | | -- Includes a fix for GnuPG-bug-id: 3906 Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 420dc2b49ad816bdd27b40db45d900551c71476f)
* gpg: Remove unused function get_pubkeys.Werner Koch2018-08-292-274/+4
| | | | | | | | | * g10/getkey.c (get_pubkeys): Remove. (pubkey_free): Remove and use code directly ... (pubkeys_free): ... here. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit ed8fe21e6612401846fc4af8631f0136dc633c67)
* doc: Show how to list envvars send to gpg-agent.Werner Koch2018-08-291-0/+9
| | | | | | | | -- GnuPG-bug: 3353 Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 53bbac0865719076f7ad7bb57e13f656bd6edf39)
* gpg: New option --known-notation.Werner Koch2018-08-294-7/+64
| | | | | | | | | | | | | | | * g10/gpg.c (oKnownNotation): New const. (opts): Add option --known-notation. (main): Set option. * g10/parse-packet.c (known_notations_list): New local var. (register_known_notation): New. (can_handle_critical_notation): Rewrite to handle the new feature. Also print the name of unknown notations in verbose mode. -- GnuPG-bug-id: 4060 Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 3da835713fb6220112d988e1953f3d84beabbf6a)
* po: Update Russian translation.Ineiev2018-08-281-10/+11
|
* assuan: Fix exponential decay for first second.Werner Koch2018-08-283-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | * common/asshelp.c (wait_for_sock): Round SECSLEFT. * dirmngr/dirmngr.c (main): Take care of --debug-wait also in dameon mode. * common/sysutils.c (gnupg_usleep) [HAVE_NANOSLEEP]: Fix nanosleep use. -- Without the rounding we saw in verbose mose [...]to come up ... (5s) [...]to come up ... (4s) immediately without the expected one second delay. Waiting for the next seconds did not work if nanosleep was used due to improper passed parameters in gnupg_usleep. Adding --debug-wait for dirmngr in daemon mode is required to test this change. GnuPG-bug-id: 3490 Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 0cfdd3b57d592fb6baa7dafe8fde124e8a6c7798) Fixes-commit: 1189df2cd7d4b6896ba22aa204c159ff2a425ead Signed-off-by: Werner Koch <[email protected]>
* assuan: Use exponential decay for first 1s of spinlock.Daniel Kahn Gillmor2018-08-281-5/+26
| | | | | | | | | | | | | | * common/asshelp.c (wait_for_sock): instead of checking the socket every second, we check 10 times in the first second (with exponential decay). -- This cuts the wall clock time for the standard test suite roughly by half. GnuPG-bug-id: 3490 Signed-off-by: Daniel Kahn Gillmor <[email protected]> (cherry picked from commit 149041b0b917f4298239fe18b5ebd5ead71584a6)
* assuan: Reorganize waiting for socket.Daniel Kahn Gillmor2018-08-281-42/+30
| | | | | | | | | | | | | | | * common/asshelp.c (wait_for_sock): New function, collecting codepaths from... (start_new_gpg_agent) here and... (start_new_dirmngr) here. -- This has no functional change, but makes it easier to make this function more efficient. GnuPG-bug-id: 3490 Signed-off-by: Daniel Kahn Gillmor <[email protected]> (cherry picked from commit 0471ff9d3bf8d6b9a359f3c426d70d0935066907)
* gpg: Refresh expired keys originating from the WKD.Werner Koch2018-08-282-17/+99
| | | | | | | | | | | | | | | | | | | | | | | | | * g10/getkey.c (getkey_ctx_s): New field found_via_akl. (get_pubkey_byname): Set it. (only_expired_enc_subkeys): New. (get_best_pubkey_byname): Add support to refresh expired keys from the WKD. -- A little drawback of that code is that if the WKD has no update for an expired key each access of the key will trigger a WKD lookup (unless cached by the dirmngr). To avoid this we need to record the last time we have checked for an update but that would in turn require that we update the keyring for each check. We defer this until we have a better key database which allows for fast updates of meta data. Testing the code is currently a bit cumbersome because it requires to update a key in the WKD several times. Eventually we we need a network emulation layer to provide sample data for the regression tests. GnuPG-bug-id: 2917 Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 7f172404bfcf719b9b1af4a182d4803525ebff7c)
* gpg: Remove unused arg from a function.Werner Koch2018-08-284-5/+5
| | | | | | | | * g10/getkey.c (get_best_pubkey_byname): Remove unused arg 'no_akl'. Change both callers. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit db67ccb759426c1173761574b14bdfe6a76394c2)
* po: Update Japanese translation.NIIBE Yutaka2018-08-221-9/+10
| | | | | | -- Signed-off-by: NIIBE Yutaka <[email protected]>
* g10: Fix undefined behavior when EOF in parsing packet for S2K.NIIBE Yutaka2018-08-101-2/+2
| | | | | | | | | | | | | | | | | | * g10/parse-packet.c (parse_symkeyenc): Use iobuf_get_noeof. (parse_key): Likewise. -- Cherry picked from master commit: 1b309d9f6199a91caa0ca0b97b92d599e00b736e When EOF comes at parsing s2k.count, it is possible the value will be (unsigned long)-1. Then, the result of S2K_DECODE_COUNT will be undefined. This patch fixes undefined behavior. Reported-by: Philippe Antoine GnuPG-bug-id: 4093 Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg: Set a limit for a WKD import of 256 KiB.Werner Koch2018-07-291-1/+9
| | | | | | | | | | | | | * g10/call-dirmngr.c (MAX_WKD_RESULT_LENGTH): New. (gpg_dirmngr_wkd_get): Use it. -- WKD should return only a single key with just one UID. For key rollover 2 keys may be send. A total of 256 KiB seems to be a generous limit here. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit e88f56f1937ac92f6a3b94e50b6db2649ec0be41)
* dirmngr: Validate SRV records in WKD queries.Werner Koch2018-07-291-0/+12
| | | | | | | | | | | | | * dirmngr/server.c (proc_wkd_get): Check the returned SRV record names to mitigate rogue DNS servers. -- I am not sure wether this really is very useful because the security relies on a trustworthy DNS system anyway. However, that check is easy enough to do. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit ebe727ef596eefebb5eff7d03a98649ffc7ae3ee)
* common: New function to validate domain names.Werner Koch2018-07-293-2/+93
| | | | | | | | * common/mbox-util.c (is_valid_domain_name): New. * common/t-mbox-util.c (run_dns_test): New test. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit ddee9f9409fb5a089883eab0fadef7b9b7e61e72)
* scd: Add support for Trustica Cryptoucan.Jiří Keresteš2018-07-293-3/+13
| | | | (cherry picked from commit 967d3649d24aba623133808e8d01675dff389fbb)
* Post release updatesWerner Koch2018-07-122-1/+5
| | | | --
* Release 2.2.9gnupg-2.2.9Werner Koch2018-07-121-1/+40
|
* po: Fix one fuzzy in German translation.Werner Koch2018-07-121-4/+3
| | | | --
* po: auto updateWerner Koch2018-07-1226-2099/+9025
| | | | --
* gpg: Remove multiple subkey bindings during export-clean.Werner Koch2018-07-091-5/+84
| | | | | | | | | | * g10/key-clean.c (clean_one_subkey_dupsigs): New. (clean_all_subkeys): Call it. -- GnuPG-bug-id: 3804 Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 76989d5bd89ed11f5b3656dc4748fcfc939a46dc)
* gpg: Let export-clean remove expired subkeys.Werner Koch2018-07-094-12/+125
| | | | | | | | | | | | | | | | * g10/key-clean.h (KEY_CLEAN_NONE, KEY_CLEAN_INVALID) (KEY_CLEAN_ENCR, KEY_CLEAN_AUTHENCR, KEY_CLEAN_ALL): New. * g10/key-clean.c (clean_one_subkey): New. (clean_all_subkeys): Add arg CLEAN_LEVEL. * g10/import.c (import_one): Call clean_all_subkeys with KEY_CLEAN_NONE. * g10/export.c (do_export_stream): Call clean_all_subkeys depedning on the export clean options. -- GnuPG-bug-id: 3622 Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit c2fd65ec8498a08ee36ca52d99b6b014f6db8d93)
* gpg: Split key cleaning function for clarity.Werner Koch2018-07-094-16/+54
| | | | | | | | | | | | | * g10/key-clean.c (clean_key): Rename to clean_all_uids and split subkey cleaning into ... (clean_all_subkeys): new. Call that always after the former clean_key invocations. -- Note that the clean_all_subkeys function will later be extended. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 6c3567196f7e72552f326ce07dccbcce31926e5d)
* gpg: Move key cleaning functions to a separate file.Werner Koch2018-07-0910-429/+495
| | | | | | | | | | | | | | | | * g10/trust.c (mark_usable_uid_certs, clean_sigs_from_uid) (clean_uid_from_key, clean_one_uid, clean_key): Move to ... * g10/key-clean.c: new file. * g10/key-clean.h: New. * g10/Makefile.am (gpg_sources): Add new files. * g10/export.c, g10/import.c, g10/keyedit.c, g10/trustdb.c: Include new header. * g10/trustdb.h (struct key_item, is_in_klist): Move to ... * g10/keydb.h: here. -- Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 135e46ea480d749b8a9692f71d4d0bfdadd8ee2f)
* gpg: Allow decryption using several passphrases in may cases.Werner Koch2018-07-061-0/+15
| | | | | | | | | | | | | * g10/mainproc.c (symkey_decrypt_seskey): Check for a valid algorithm. (proc_symkey_enc): Clear passpharse on error from above function. -- This does not work reliable as stated in bug 3795 but we can try to fix ~95% of all cases. The real fix is to use AEAD which will come with 2.3 GnuPG-bug-id: 3795, 4050 Signed-off-by: Werner Koch <[email protected]>
* po: Add flag options for xgettext.Werner Koch2018-07-051-1/+55
| | | | | | | | * po/Makevars (XGETTEXT_OPTIONS): Add --flag options. -- GnuPG-bug-id: 4053, 4054 Signed-off-by: Werner Koch <[email protected]>
* gpg: Prepare for signatures with ISSUER_FPR but without ISSUER.Werner Koch2018-07-056-8/+60
| | | | | | | | | | | | | | | | | | | * g10/getkey.c (get_pubkey_for_sig): New. (get_pubkeyblock_for_sig): New. * g10/mainproc.c (issuer_fpr_raw): Give global scope. (check_sig_and_print): Use get_pubkeyblock_for_sig. * g10/pkclist.c (check_signatures_trust): Use get_pubkey_for_sig. * g10/sig-check.c (check_signature2): Ditto. (check_signature_over_key_or_uid): Ditto. -- GnuPG-bug-id: 4046 The whole getkey stuff is still a mess with way to much duplication and missing caching of already fetched data. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit f7526c7bc754acf68bde0b79c785e875a9365d60)
* po: Fix bug in german translationAndre Heinecke2018-07-041-1/+1
| | | | | | | | | | * po/de.po (decryption forced to fail!): Fix translation. -- The unmatched %s actually produced a crash on Windows. GnuPG-Bug-Id: T4053 GnuPG-Bug-Id: T4054
* gpg: Ignore too large user ids during import.Werner Koch2018-07-041-1/+30
| | | | | | | | | | | | | * g10/import.c (read_block): Add special treatment for bad user ids and comment packets. -- See GnuPG-bug-id: 4022 for an example of a bogus user id. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 01cd66f9faf1623833e6afac84164de5a136ecff)
* indent: Fix indentation of read_block in g10/import.cWerner Koch2018-07-041-66/+67
| | | | | | | -- Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 60e7e102a153a246d7e887a64e30dbb4c4f7b6dd)