aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* tools: Use platform abstraction for I/O.Justus Winter2017-01-241-10/+10
| | | | | | | | | | | | * tools/gpg-connect-agent.c (main): Use a gpgrt_stream_t for 'script_fp'. Adapt accordingly. -- Werner asked me to make gpgconf use the platform abstractions that were introduced after gpgconf's inception. After doing that, I realized that 'read_line' is only used in two more places, one of which this patch takes care of. Signed-off-by: Justus Winter <[email protected]>
* tools: Use platform abstraction for I/O.Justus Winter2017-01-241-96/+95
| | | | | | | | | | | | | | * tools/gpgconf-comp.c (retrieve_options_from_file): Use a gpgrt_stream_t for 'list_file'. Adapt accordingly. (copy_file): Likewise for 'src' and 'dst'. (change_options_file): Likewise for 'src_file' and 'dest_file'. (change_options_program): Likewise for 'src_file' and 'dest_file'. (gc_process_gpgconf_conf): Likewise for 'config'. -- Werner asked me to make gpgconf use the platform abstractions that were introduced after gpgconf's inception. Signed-off-by: Justus Winter <[email protected]>
* tools: Use platform abstraction for renaming files.Justus Winter2017-01-241-22/+16
| | | | | | | | | | | * tools/gpgconf-comp.c (gc_component_change_options): Use 'gnupg_rename_file'. Also, block signals across all renames in an attempt to make the whole process atomic. -- Werner asked me to make gpgconf use the platform abstractions that were introduced after gpgconf's inception. Signed-off-by: Justus Winter <[email protected]>
* tools: Add comments explaining the functions parameters.Justus Winter2017-01-241-2/+27
| | | | | | | | | | | | | | | | * tools/gpgconf-comp.c (change_options_file): Add comments explaining the functions parameters. (change_options_program): Likewise. -- From reading those two functions it is not clear why we write the new configuration to the source file, and read the current configuration from the destination file. The identifiers are named for the benefit of the callee. Note that identifiers that require that much explanation are poorly chosen. Signed-off-by: Justus Winter <[email protected]>
* tools: Improve error handling.Justus Winter2017-01-241-0/+2
| | | | | | | | | | * tools/gpgconf-comp.c (gp_component_change_options): Improve error handling when reading from stdin. -- Previously, errors encountered while reading the configuration changes were ignored. Signed-off-by: Justus Winter <[email protected]>
* tools: Fix memory leak.Justus Winter2017-01-241-0/+2
| | | | | | | | | * tools/gpgconf-comp.c (change_options_file): Fix leak. -- Previously, 'src_filename' and 'orig_filename' leaked if creating the backup file failed. Signed-off-by: Justus Winter <[email protected]>
* tests: Add test demonstrating issue2929.Justus Winter2017-01-242-1/+34
| | | | | | | | | | * tests/openpgp/Makefile.am (XTESTS): Add new test. * tests/openpgp/issue2929.scm: New file. -- This test demonstrates a problem with the TOFU trust model when a new key is created. Signed-off-by: Justus Winter <[email protected]>
* tests: Enable gpgconf test.Justus Winter2017-01-241-4/+1
| | | | | | | | | | | * tests/openpgp/Makefile.am (XTESTS): Re-add gpgconf.scm. -- This partially reverts 25e029823813e190a18b601af60efcb1fb3b84af. That change was not sufficiently motivated, and our continuous integration server shows no recent distcheck failures. Signed-off-by: Justus Winter <[email protected]>
* speedo: Remove the unused ADNS package.Werner Koch2017-01-232-22/+1
| | | | --
* Update NEWS with link to release announcement.Werner Koch2017-01-231-0/+2
| | | | --
* Post release updatesWerner Koch2017-01-232-1/+5
| | | | --
* Release 2.1.18gnupg-2.1.18Werner Koch2017-01-231-1/+61
| | | | Signed-off-by: Werner Koch <[email protected]>
* build: Change make distcheck configure and temp. remove gpgconf.scm.Werner Koch2017-01-232-2/+5
| | | | | | | | * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Also test gpgtar and wks-tools. Disable ntbtls. * tests/openpgp/Makefile.am (XTESTS): Temporary remove gpgconf.scm. Signed-off-by: Werner Koch <[email protected]>
* po: Auto updateWerner Koch2017-01-2325-0/+174
| | | | --
* po: Translate two new strings to GermanWerner Koch2017-01-231-1/+7
| | | | | | -- Signed-off-by: Werner Koch <[email protected]>
* Update copyright notices for 2017.Werner Koch2017-01-239-17/+17
| | | | | | | | -- Also some http:// -> https:// fixes. Signed-off-by: Werner Koch <[email protected]>
* Fix format string errors and some missing error case initialization.Werner Koch2017-01-2310-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | * common/logging.c (do_logv): Remove extra parentheses in comparison. * dirmngr/dns-stuff.c (resolve_addr_libdns): Init RES so that dns_res_close is given a defined value in the error case. * dirmngr/http.c (cookie_read, cookie_write) [HTTP_USE_NTBTLS]: Fix format string char. * dirmngr/ks-engine-hkp.c (ks_hkp_help): Remove duplicate "const". * dirmngr/ks-engine-http.c (ks_http_help): Ditto. * dirmngr/ks-engine-kdns.c (ks_kdns_help): Ditto. * dirmngr/ks-engine-ldap.c (ks_ldap_help): Ditto. * scd/app-p15.c (send_keypairinfo, do_getattr): Fix format string char. * tools/gpgconf-comp.c (gpg_agent_runtime_change): Init PID for the error case. (scdaemon_runtime_change): Ditto. (dirmngr_runtime_change): Ditto. * tools/gpgconf.c (query_swdb): Init VALUE_SIZE_UL. Signed-off-by: Werner Koch <[email protected]>
* dirmngr: On SIGHUP mark all keyservers alive.Werner Koch2017-01-233-0/+25
| | | | | | | * dirmngr/ks-engine-hkp.c (ks_hkp_reload): New. * dirmngr/dirmngr.c (dirmngr_sighup_action): Call it. Signed-off-by: Werner Koch <[email protected]>
* libdns: Hack to skip negation term.Gaetan Bisson2017-01-231-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | * dirmngr/dns.c (dns_nssconf_loadfile): Skip negation terms in nsswitch.conf parser. -- This small patch was submitted along with this comment: We've been having issues over at Arch Linux with the new libdns code. Our /etc/nsswitch.conf contains the following line: hosts: files mymachines resolve [!UNAVAIL=return] dns myhostname And it turns out dirmngr fails to parse the negation statement (the bang in !UNAVAIL). This results in gnupg not being able to resolve any name. Looking at dirmngr/dns.c it was unclear to me how to properly handle such negations. The dns_anyconf_scan calls used in dns_nssconf_loadfile do not allow to store a negation bit easily... In the meantime, I wrote the attached patch which ignores those statements altogether. It makes libdns work as expected for us. Commit log written by wk
* dirmngr: Print debug message only with --debug.Werner Koch2017-01-231-1/+2
| | | | | | | | * dirmngr/dns-stuff.c (libdns_init): Call log_debug only if opt_debug is set. -- Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Handle missing nsswitch.conf.Phil Pennock2017-01-231-1/+10
| | | | | | | | | | | | | | | | | | | * dirmngr/dns-stuff.c (libdns_init): Fallback to files,dns. -- Signed-off-by: Phil Pennock <[email protected]> ChangeLog entry by wk. This fixed the problem: Short version: macOS doesn't include /etc/nsswitch.conf and GnuPG's dirmngr is hard-erroring when that file is missing, such that no DNS operations succeed and --recv-key returns ENOENT type errors to the caller. Signed-off-by: Werner Koch <[email protected]>
* dco: Register Phil Pennock.Werner Koch2017-01-231-0/+4
| | | | --
* gpg: Fix misleading log message when checking regexp.Damien Goutte-Gattat2017-01-231-2/+2
| | | | | | | | | | | | | * src/trustdb.c (check_regexp): Correctly print whether the regexp matched or not. -- This patch fixes the log message displayed when gpg attempts to match the regexp associated with a trust signature with an user ID. The current message interprets the 'ret' variable backwards, and displays 'YES' when the regexp actually fails to match. Signed-off-by: Damien Goutte-Gattat <[email protected]>
* po: Fixes to the German translationWerner Koch2017-01-231-9/+9
| | | | | | | | | | | | | | | | | | | | | | -- Justus reported that the German translation for the key listing in --edit-key does "usage: E" -> "Aufruf: E" which is clearly wrong. It turnd out that this translation was once marked as fuzzy and accidentally unfuzzied by me. "Aufruf" (bug) -> "Nutzung" "Leistungsfähigkeit" -> "Nutzung" "Signaturfähigkeit" -> "Signaturnutzbarkeit" etc. The last two are in the key generation menu. Also changed the key code for "Umschalten der Signaturnutzbarkeit" from "U" to "S". "Nutzung" is here better than "Fähigkeit" because the latter is more connected to the property of the algorithm, where the former better expresses an arbitrary choice. Signed-off-by: Werner Koch <[email protected]>
* gpg: New export and import options "backup" and "restore".Werner Koch2017-01-234-5/+52
| | | | | | | | | | | | | | | | * g10/export.c (parse_export_options): Add "backup" and its alias "export-backup". (do_export_one_keyblock): Export ring trust packets in backup mode. * g10/import.c (parse_import_options): Add "restore" and its alias "import-restore". (read_block): Import ring trust packets. -- These options are intended to, well, backup and restore keys between GnuPG implementations. These options may eventually be enhanced to backup and restore all public key related information. Signed-off-by: Werner Koch <[email protected]>
* scd: Fix INTERRUPT transfer.NIIBE Yutaka2017-01-231-5/+6
| | | | | | | | * scd/ccid-driver.c (find_endpoint): Don't return Bulk endpoint as Interrupt endpoint. (ccid_poll): Call libusb_interrupt_transfer. Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Print a commit id in the generated ChangeLogWerner Koch2017-01-191-1/+4
| | | | | | | * build-aux/gitlog-to-changelog: Print an extra line with the commit id. Signed-off-by: Werner Koch <[email protected]>
* common: Fix buffer copy code again.Werner Koch2017-01-191-20/+14
| | | | | | | | | | | | * common/exectool.c (my_error_from_errno): Remove. (copy_buffer_do_copy): Do without var RC. (copy_buffer_flush): Ditto. Use ERRNO instead of es_write return code. (gnupg_exec_tool): Correctly return errors from es_read. -- Fixes-commit: 55c9212a2338bf0b07c8cf3a69bcedaa28d48d43 Signed-off-by: Werner Koch <[email protected]>
* gpg: Allow to freeze faked system time.Damien Goutte-Gattat2017-01-193-3/+16
| | | | | | | | | | | | | | | | * g10/gpg.c (main): If the parameter for --faked-system-time ends with a '!', freeze time at the specified point. * common/gettime.c (gnupg_set_time): Allow to freeze the time at an arbitrary time instead of only the current time. * doc/gpg.texi: Update documentation for --faked-system-time. -- This patch allows the user to modify the behavior of the --faked-system-time option: by appending a '!' to the parameter, time in GnuPG will be frozen at the specified time, instead of advancing normally from that time onward. Signed-off-by: Damien Goutte-Gattat <[email protected]>
* common: Clarify use of vars in buffer copy code.Werner Koch2017-01-191-16/+26
| | | | | | | | | | | | | | | * common/exectool.c (my_error_from_errno): New. (copy_buffer_do_copy): Use separate vars for errno values and gpg-error values for clarity. s/assert/log_assert/. (copy_buffer_flush): Ditto. (gnupg_exec_tool_stream): Use gpg_err_code when testing. -- NB: It is surprising that es_write seems not to set ERRNO but only returns the ERRNO value. Need to check whether this is really the case. Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Add setup of CA for NTBTLS.NIIBE Yutaka2017-01-191-1/+78
| | | | | | | * dirmngr/http.c [HTTP_USE_NTBTLS] (http_session_new): Add CA by ntbtls_set_ca_chain. Signed-off-by: NIIBE Yutaka <[email protected]>
* common: Fix flushing copy buffers.Justus Winter2017-01-181-7/+19
| | | | | | | | | * common/exectool.c (copy_buffer_flush): Write and flush the data, but do not hide EAGAIN from the caller. (gnupg_exec_tool_stream): Retry on EAGAIN. GnuPG-bug-id: 2425 Signed-off-by: Justus Winter <[email protected]>
* agent: Reduce sleep time in the progress callback.Werner Koch2017-01-181-2/+10
| | | | | | | | | | * agent/gpg-agent.c (agent_libgcrypt_progress_cb): Reduce sleep time from 100ms to 1ms or use gpgrt_yield when build against a recent libgpg-error. -- Debian-bug-id: 851298 Signed-off-by: Werner Koch <[email protected]>
* gpgconf: Allow "all" for --launch, --kill, and --reload.Werner Koch2017-01-183-9/+41
| | | | | | | | | | * tools/gpgconf-comp.c (gc_component_launch): Allow -1 for COMPONENT. (gc_component_kill): Ditto. (gc_component_reload): For robustness change the condition to < 0. * tools/gpgconf.c (main) <aLaunch, aKill, aReload>: Support argument "all". Signed-off-by: Werner Koch <[email protected]>
* gpg: Remove unused definitions.Werner Koch2017-01-181-22/+2
| | | | | | | * g10/keydb.h (rt_UNKNOWN, rt_RING): Remove constants. (keyblock_pos_struct, KBPOS): Remove struct and type. Signed-off-by: Werner Koch <[email protected]>
* scd: Cleanup SERIALNO protocol.NIIBE Yutaka2017-01-185-69/+41
| | | | | | | | | | | | | | | | | | | | * scd/app.c (app_get_serial_and_stamp): Remove. (app_get_serialno): New. (app_write_learn_status): Use send_status_direct. (app_getattr): Use app_get_serialno for SERIALNO and send with send_status_direct. * scd/app-openpgp.c (do_getattr): Likewise. * scd/command.c (cmd_serialno): Don't send TIMESTAMP of 0. (cmd_learn): Likewise. Don't inquire with TIMESTAMP of 0. -- In the SERIALNO protocol, timestamp used to be considered, but had never used at all. In the new implementation, removed card/token is always detected and connection becomes invalid, no timestamp is required any more. Examined scute and poldi as well for this protocol change. Signed-off-by: NIIBE Yutaka <[email protected]>
* scd: Add "card_list" sub command for GETINFO.NIIBE Yutaka2017-01-183-4/+33
| | | | | | | | * scd/app.c (app_send_card_list): New. * scd/command.c (cmd_getinfo): Fix "status" sub command. Add "card_list" sub command. Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Handle packages with dashes in --find-version.Werner Koch2017-01-171-5/+22
| | | | | | | * autogen.sh (--find-version): Improve version extraction. * (--help): Extend. Signed-off-by: Werner Koch <[email protected]>
* gpg: Clean bogus subkey binding when cleaning a key.Werner Koch2017-01-172-7/+28
| | | | | | | | * g10/trust.c (clean_key): Also clean bogus subkey bindings. -- GnuPG-bug-id: 2922 Signed-off-by: Werner Koch <[email protected]>
* gpg: Sync print of additional sig data in --edit-key.Werner Koch2017-01-172-48/+45
| | | | | | | | | | | | | | | * g10/keylist.c (show_policy_url): Implement MODE -1. (show_keyserver_url): Ditto. (show_notation): Ditto. * g10/keyedit.c (print_one_sig): Print policy URL, keyserver URL and notation data to the tty. -- With this change the listing of signatures in the key edit menu does now include policy URLs et al in order and not possible after leaving the menu (it used to go to stdout and not the tty). Signed-off-by: Werner Koch <[email protected]>
* common: Remove unused function tty_print_string.Werner Koch2017-01-172-83/+46
| | | | | | | | * common/ttyio.c (tty_print_string): Rename to ... (do_print_string): this. Make local. Simplify FP case by using print_utf8_buffer. Change caller. Signed-off-by: Werner Koch <[email protected]>
* gpg: Prepare some key cleaning function for use with secret key packets.Werner Koch2017-01-171-7/+14
| | | | | | | | | | | | | | | | * g10/trust.c (mark_usable_uid_certs): Allow use of secret key packets. (clean_sigs_from_uid): Ditto. (clean_uid_from_key): Ditto. (clean_one_uid): Ditto. (clean_key): Ditto. -- Since 2.1 secret keys and public keys use identical data structure and thus we should not restrict those key cleaning functions to work only with public key packets. This change has no immediate effect but may come handy in the future. Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Implement hkps lookups using literal addresses.Werner Koch2017-01-161-1/+29
| | | | | | | * dirmngr/ks-engine-hkp.c (map_host): For literal addresses do a reverse lookup. Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Allow reverse DNS lookups in Tor-mode.Werner Koch2017-01-161-31/+182
| | | | | | | | | | | | | * dirmngr/dns-stuff.c (resolve_dns_name): Move up in the file. (resolve_addr_libdns): New. (resolve_dns_addr): Divert to resolve_dns_addr. -- In the old code reverse lookups where disabled in Tor mode. By implementing the reverse lookups via libdns it is now possible to do them also in Tor mode. Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Avoid network queries for literal IP addresses.Werner Koch2017-01-161-0/+4
| | | | | | | | * dirmngr/dns-stuff.c (resolve_name_libdns): USe flags AI_NUMERICHOST for literal IP addresses. (resolve_name_standard): Ditto. Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Fix URL creation for literal IPv6 addresses in HKP.Werner Koch2017-01-162-31/+39
| | | | | | | | | | | | | | * dirmngr/dns-stuff.c (is_ip_address): Make the return value depend on the address family. * dirmngr/ks-engine-hkp.c (map_host): Rename arg R_POOLNAME to R_HTTPHOST because that is its purpose. Note that the former behaviour of storing a NULL to indicate that it is not a pool has not been used. (make_host_part): Ditto. (make_host_part): Make sure that literal v6 addresses are correclty marked in the constructed URL. Signed-off-by: Werner Koch <[email protected]>
* tests: Improve GPGHOME handling.Justus Winter2017-01-163-12/+6
| | | | | | | | * tests/openpgp/defs.scm (GPGHOME): New variable. * tests/openpgp/ssh-import.scm: Remove redundant code, use 'path-join'. * tests/openpgp/tofu.scm: Likewise. Signed-off-by: Justus Winter <[email protected]>
* agent: Ask specific SERIALNO for pksign/pkdecrypt.NIIBE Yutaka2017-01-165-7/+19
| | | | | | | | | * agent/call-scd.c (agent_card_serialno): Add DEMAND argument. * agent/command-ssh.c (card_key_available): Follow the change. * agent/learncard.c (agent_handle_learn): Likewise. * agent/divert-scd.c (ask_for_card): Use DEMAND argument. Signed-off-by: NIIBE Yutaka <[email protected]>
* scd: Add --demand option for SERIALNO.NIIBE Yutaka2017-01-163-39/+91
| | | | | | | | | | | | | | | * scd/app.c (select_application): Add SERIALNO_BIN and SERIALNO_BIN_LEN arguments. Return matched APP with a serial number when specified. * scd/command.c (open_card): Modify for the implicit open only. (open_card_with_request): New for explicit open and support match with a serial number. (cmd_serialno): Support --demand option. (cmd_learn, cmd_readcert, cmd_readkey, cmd_pksign, cmd_pkauth) (cmd_pkdecrypt, cmd_getattr, cmd_setattr, cmd_writecert, cmd_writekey) (cmd_genkey, cmd_random, cmd_passwd, cmd_checkpin, cmd_apdu): Follow the change of open_card. Signed-off-by: NIIBE Yutaka <[email protected]>
* build: Make autogen.sh more POSIX friendly (next try)Werner Koch2017-01-121-1/+1
| | | | | | | | * autogen.sh: Fix dd count to 5. -- Fixes-commit: 3c00b52f7cb0fbd756c0bbe5134b8f2d69c60dd1 Signed-off-by: Werner Koch <[email protected]>