aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Release 2.2.29gnupg-2.2.29Werner Koch2021-07-041-3/+28
|
* Update OpenPGP card vendor list.Werner Koch2021-07-041-1/+4
| | | | --
* po: Remove removed files.Werner Koch2021-07-021-1/+0
| | | | --
* dirmngr: Change the default keyserver.Werner Koch2021-06-257-57/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac (DIRMNGR_DEFAULT_KEYSERVER): Change to keyserver.ubuntu.com. * dirmngr/certcache.c (cert_cache_init): Disable default pool cert. * dirmngr/http-ntbtls.c (gnupg_http_tls_verify_cb): Ditto. * dirmngr/http.c (http_session_new): Ditto. * dirmngr/server.c (make_keyserver_item): Use a different mapping for the gnupg.net names. -- Due to the unfortunate shutdown of the keyserver pool, the long term defaults won't work anymore. Thus it is better to change them. For https access keyserver.ubuntu.com is now used because it can be expected that this server can stand the load from newer gnupg LTS versions. For http based access the Dutch Surfnet keyserver is used. However due to a non-standard TLS certificate this server can not easily be made the default for https. Note: that the default server will be changed again as soon as a new connected keyserver infrastructure has been established.
* gpg: Let --fetch-key return an exit code on failure.Werner Koch2021-06-252-4/+20
| | | | | | | | * g10/keyserver.c (keyserver_fetch): Return an error code. * g10/gpg.c (main) <aFetchKeys>: Return 1 in case of no data. -- GnuPG-bug-id: 5376
* scd:ccid: Handle LIBUSB_TRANSFER_OVERFLOW interrupt transfer.NIIBE Yutaka2021-06-231-0/+5
| | | | | | | | | * scd/ccid-driver.c (intr_cb): Ignore LIBUSB_TRANSFER_OVERFLOW. -- Backport-master-commit: 25ae80b8eb6e9011049d76440ad7d250c1d02f7c Signed-off-by: NIIBE Yutaka <[email protected]>
* scd:ccid:spr532: Extend abort_cmd for initialization time.NIIBE Yutaka2021-06-231-11/+18
| | | | | | | | | | | | | | | * scd/ccid-driver.c (abort_cmd): Add INIT argument to support synchronize until success, even ignoring timeout. (bulk_in): Normal use case of abort_cmd. (ccid_vendor_specific_init): Initial use case of abort_cmd. -- Another backport to stabilize SCM SPR332/SPR532 card reader. GnuPG-bug-id: 5297 Backport-master-commit: a9aa30ed2c2c399c2baa6a5aa2624d8fdee6286f Signed-off-by: NIIBE Yutaka <[email protected]>
* tests: Cope with broken Libgcrypt versionsWerner Koch2021-06-221-11/+27
| | | | | | | | | | | | | | * common/t-sexputil.c (test_ecc_uncompress): Ignore unknwon curve errors. -- For unknown reasons some versions of Fedora or RHEL provide a patched version of Libgcrypt with Brainpool support removed. We better ignore this error because it is a regression in 2.2.28 although that older versions could not used Brainpool keys. GnuPG-bug-id: 5502 Signed-off-by: Werner Koch <[email protected]>
* w32: Add fallback in case the Windows console can't cope with Unicode.Werner Koch2021-06-221-4/+18
| | | | | | | | | | | | | | | | | | | | | * common/ttyio.c (w32_write_console): Fallback to WriteConsoleA on error. -- To test this switch the Windows Console to "legacy mode" set LANG=de gpg --card-edit and enter an invalid command. The response contains an Umlaut and old Windows versions (and the legacy console) don't have a proper font installed for this. Without this patch this runs into a log_fatal error. The mitigation we implement is to fallback to WriteConsoleA, that is accepting wrong encoding and to print a note about the problem. GnuPG-bug-id: 5491
* dirmngr: Fix regression in KS_GET for mail address pattern.Werner Koch2021-06-211-1/+39
| | | | | | | | | | | | | | | * dirmngr/ks-engine-hkp.c (ks_hkp_search): Munge mail address pattern. (ks_hkp_get): Allow for mail addresses. - Before the keyserver changes in 2.2.28 gpg passed dirmngr a pail address as an exact pattern (e.g. "[email protected]"). Since 2.2.28 the mail address is detected gpg gpg and we see for example "<[email protected]>". This patch fixes this to turn a mail address into an exact match again. GnuPG-bug-id: 5497 Signed-off-by: Werner Koch <[email protected]>
* po: Update Simplified Chinese Translation.NIIBE Yutaka2021-06-171-32/+24
| | | | | | | | | -- Backport-master-commit: 448ccd7f1da0324bd2d8dea1bc018895b165cfba GnuPG-bug-id: 5477 Reported-by: Zhongren Gu Signed-off-by: NIIBE Yutaka <[email protected]>
* scd: Error code map fix for older Yubikey.NIIBE Yutaka2021-06-141-0/+1
| | | | | | | | | | | | | | * scd/iso7816.c (map_sw): Recognize 6A86. -- Yubikey NEO does not support the YK4_GET_CAPA command (001D000000), and it will be screwed up with the command. GnuPG-bug-id: 5487 Back-port-master-commit: 13bc0431ff1ce51246694208df611cc4561fb4b3 Fixes-commit: ec56996029d95d4bd26e1badfe207232270c6247 Signed-off-by: NIIBE Yutaka <[email protected]>
* dirmngir: Fix build with --disable-ldap.NIIBE Yutaka2021-06-111-0/+2
| | | | | | | | | | * dirmngr/dirmngr.c (parse_rereadable_options) [USE_LDAP]: Conditionalize. -- Reported-by: Phil Pennock Signed-off-by: NIIBE Yutaka <[email protected]>
* dirmngr: Remove use of USE_LDAPWRAPPER.NIIBE Yutaka2021-06-115-607/+5
| | | | | | | | | | | | | * configure.ac (USE_LDAPWRAPPER): Remove. * dirmngr/Makefile.am: Use USE_LDAP instead of USE_LDAPWRAPPER. * dirmngr/ldap-wrapper-ce.c: Remove. * dirmngr/ldap-wrapper.h, dirmngr/ldap-wrapper.c: Remove USE_LDAPWRAPPER things. -- Backported-from-master: 4c295646ba0e175743e6be13457308c1e6d21dd3 Signed-off-by: NIIBE Yutaka <[email protected]>
* Post release updatesWerner Koch2021-06-102-1/+5
| | | | --
* Release 2.2.28gnupg-2.2.28Werner Koch2021-06-101-1/+112
|
* po: Auto updatesWerner Koch2021-06-101-2/+4
| | | | --
* po: Fix typo in Simplified Chinese Translation.NIIBE Yutaka2021-06-101-2/+2
| | | | | | | | -- GnuPG-bug-id: 5477 Reported-by: Zhongren Gu Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg: Partial fix for Unicode problem in output files.Werner Koch2021-06-102-2/+2
| | | | | | | | | | * g10/openfile.c (overwrite_filep): Use gnupg_access. -- As said, this is just an obvious but partial fix. We need to review things for the output module. Signed-off-by: Werner Koch <[email protected]>
* scd: Fix serial number detection for Yubikey 5.Werner Koch2021-06-101-4/+5
| | | | | | | | | | * scd/app.c (app_new_register): Handle serial number correctly. -- GnuPG-bug-id: 5442 Signed-off-by: NIIBE Yutaka <[email protected]> Backported-from-master: c3a9ee0b658887ca9baa4514187b17857fdf6586
* speedo,w32: Remove a leftover directory during uninstallWerner Koch2021-06-101-0/+1
| | | | --
* gpgtar,w32: Fix file size computationWerner Koch2021-06-091-1/+1
| | | | | | | | | | | | | * tools/gpgtar-create.c (fillup_entry_w32): Move parentheses. -- Fixes-commit: 8b8925a2bdbb12dd537dde20a27cdb1416c2f1ae The bug is so obvious that I wonder why it was not reported more often on Windows. (Adding 1 to MAXDWORD (0xfffffff) always gives 0 for the product). Signed-off-by: Werner Koch <[email protected]>
* sm: New option --ldapserver as an alias for --keyserver.Werner Koch2021-06-092-1/+14
| | | | | | | | | | | | * sm/gpgsm.c (opts): Add option --ldapserver and make --keyserver an alias. -- We should use "keyserver" for OpenPGP and thus it is better to allow for "ldapserver" here - it is the same convention as now used in dirmngr. Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Allow to pass no filter args to dirmngr_ldap.Werner Koch2021-06-091-5/+11
| | | | | | | | | | * dirmngr/dirmngr_ldap.c (main): Handle no args case. -- This is required for example for CRLs. The old code did not require this because the hos was taken from the URL given has arg. Signed-off-by: Werner Koch <[email protected]>
* po: Update Japanese Translation.NIIBE Yutaka2021-06-091-7/+7
| | | | | | -- Signed-off-by: NIIBE Yutaka <[email protected]>
* po: Auto updateWerner Koch2021-06-0825-4029/+3445
| | | | | | | -- There are now a few new translatable strings due to adding ttyio.c to POTFILES. Not regression thus no hard need to translate them too.
* po: Update German translationWerner Koch2021-06-081-156/+152
| | | | --
* w32: Change spawn functions to use Unicode version of CreateProcess.Werner Koch2021-06-082-53/+112
| | | | | | | | | | | | | | | | | | * common/exechelp-w32.c (gnupg_spawn_process): Change to use CreateProcessW. (gnupg_spawn_process_fd): Ditto. (gnupg_spawn_process_detached): Ditto. * g10/exec.c (w32_system): Ditto. -- GnuPG-bug-id: 4398 We do not use this weirdo CREATE_UNICODE_ENVIRONMENT flag because it does not make any sense to have non-ASCII names in the environment. I can't imagine why this should be used at all and rationale for this API features is, well, sparse. (cherry picked from commit cf2f6d8a3f0594c03c383b4989a3041e9c4536d7)
* common,w32: Breakaway detached childs when in jobAndre Heinecke2021-06-081-0/+45
| | | | | | | | | | | | | | | | | | | | * common/exechelp-w32.c (gnupg_spawn_process_detached): Add CREATE_BREAKAWAY_FROM_JOB creation flag if required. -- When the gpg process is assigned to a W32 "Job" the child processes are killed once the Job is finished. As we want our detached processes to linger e.g. gpg-agent the breakaway flag is required in that case. GnuPG-Bug-Id: T4333 Thanks to Jan Echternach for reporting this and providing a patch. Signed-off-by: Andre Heinecke <[email protected]> (cherry picked from commit 03df28b18b92b3fd3d2ba1000903c088dc5b0fcf)
* w32: Always use Unicode for console input and output.Werner Koch2021-06-083-8/+36
| | | | | | | | | | | | | | | | | * common/init.c (_init_common_subsystems) [W32]: Set the codepage to UTF-8 for input and putput. Switch gettext to UTF-8. * g10/gpg.c (utf8_strings) [W32]: Make sure this is always set. -- With this patch the former patch to use ReadConsoleW and WriteConsoleW in ttyio.c are kind of superfluous because the ANSI version of these functions are also able to read/write UTF-8 directly given the console code page has been set correctly. However, this seems to work only with recent versions of Windows-10. GnuPG-bug-id: 4365 (cherry picked from commit 8c41b8aac3efb78178fe1eaf52d8d1bbc44941a8) Removed changes for "gpgconf --show-codepages" of the original patch.
* w32: Free memory allocated by new function w32_write_console.Werner Koch2021-06-081-0/+1
| | | | | | | * common/ttyio.c (w32_write_console): Free buffer. -- (cherry picked from commit 31b708e268ebb725307856865f34a61670a35586)
* common,w32: Allow Unicode input and output with the console.Werner Koch2021-06-081-31/+73
| | | | | | | | | | | | | | * common/ttyio.c (do_get) [W32]: Use ReadConsoleW. (w32_write_console): New. (tty_printf, tty_fprintf) [W32]: Use new function. -- Note that due this change fixed stings (i.e. gettext translations) printed to the console will not be rendered correctly unless "chcp 65001" has been used. This needs to be fixed by followup patch. GnuPG-bug-id: 4365 (cherry picked from commit f165c8a737cc968554c9d78932c69869456108ff)
* common: Re-indent ttyio.c and remove EMX, RISCOS, and CE supportWerner Koch2021-06-082-310/+275
| | | | | | | | * common/ttyio.c: Remove cruft like EMX and RISCOS support. Translate a few strings. Re-indent. -- Backported-from-master: 8622f53994249d8fb49a488cfe480ffbeb8cbfba
* common: Rename w32-misc.c to w32-cmdline.cWerner Koch2021-06-083-4/+4
| | | | | | | | | * common/w32-misc.c: Rename to .... * common/w32-cmdline.c: this. * common/Makefile.am: Adjust. -- (cherry picked from commit 7262d602d802c4a3840097d5de217fcfb9728b49)
* common,w32: Implement globing of command line args.Werner Koch2021-06-086-18/+380
| | | | | | | | | | | | | | | | | | | | | | * common/w32-misc.c [W32]: Include windows.h (struct add_arg_s): New. (add_arg): New. (glob_arg): New. (parse_cmdstring): Add arg argvflags and set it. (w32_parse_commandline): Add arg r_itemsalloced. Add globing. * common/init.c (prepare_w32_commandline): Mark glob created items as leaked. * common/t-w32-cmdline.c : Include windows.h (test_all): Add simple glob test for Unix. (main): Add manual test mode for Windows. * common/xasprintf.c (xtryreallocarray): New. -- GnuPG-bug-id: 4398 Backported-from-master: 089c9439674e8ecbc64f0ba924e6fb447bbc2b9d)
* common,w32: Refine the command line parsing for \ in quotes.Werner Koch2021-06-082-6/+33
| | | | | | | | | | | * common/t-w32-cmdline.c (test_all): Add new test cases. * common/w32-misc.c (strip_one_arg): Add arg endquote. (parse_cmdstring): Take care of backslashes in quotes. -- I found some new test vectors from Microsoft. (cherry picked from commit 20c60076866904187a09393de596deef286116f8)
* common: First take on handling Unicode command line args.Werner Koch2021-06-085-6/+459
| | | | | | | | | | | | | | | | | | | | | | | | | | | * common/w32-misc.c: New. * common/t-w32-cmdline.c: New. * common/init.c: Include w32help.h. (prepare_w32_commandline): New. (_init_common_subsystems) [W32]: Call prepare_w32_commandline. * common/Makefile.am (common_sources) [W32]: Add w32-misc.c (module_tests): Add t-w32-cmdline (t_w32_cmdline_LDADD): New. -- The rules for the command line parser are not cleary specified - if at all. See the comment in t-w32-cmdline.c. We can't use the mingw version because that would require to change all argv handling to be wchar_t and that only for Windows. That would be too ugly. Parsing the command line into argv by us is much easier and we can do that only if needed - i.e. if globing is required (we are prepared for this) or a non-ASCII character has been encountered. This way we keep things stable and only fix the currently not working Unicode problem. GnuPG-bug-id: 4398 (cherry picked from commit deb6c94362c0f179de1cac18707aad2f51a21e10)
* gpg: Prepare for globing with UTF-8.Werner Koch2021-06-081-4/+4
| | | | | | | | | | | | | | * g10/gpg.c (_dowildcard): Remove. (my_strusage): Enable wildcards using our new system. -- This patch actually removes the current globing using a mingw feature. We are not able to use this because it does not handle Unicode filenames. The plan is to implement this in init.c. This patch merely configures gpg to request globing. GnuPG-bug-id: 4398 (cherry picked from commit 8e15506d6680bbee85bc01453da28fc90b4cb673)
* dirmngr: Rewrite the LDAP wrapper toolWerner Koch2021-06-0812-699/+1264
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dirmngr/ldap-misc.c: New. * dirmngr/ldap-misc.h: New. * dirmngr/ks-engine-ldap.c: Include ldap-misc.h. (ldap_err_to_gpg_err, ldap_to_gpg_err): Move to ldap-misc.c. * dirmngr/ldap-wrapper.c (ldap_wrapper): Print list of args in debug mode. * dirmngr/server.c (lookup_cert_by_pattern): Handle GPG_ERR_NOT_FOUND the saqme as GPG_ERR_NO_DATA. * dirmngr/ldap.c (run_ldap_wrapper): Add args tls_mode and ntds. Remove arg url. Adjust for changes in dirmngr_ldap. (url_fetch_ldap): Remove args host and port. Parse the URL and use these values to call run_ldap_wrapper. (attr_fetch_ldap): Pass tls flags to run_ldap_wrapper. (rfc2254_need_escape, rfc2254_escape): New. (extfilt_need_escape, extfilt_escape): New. (parse_one_pattern): Rename to ... (make_one_filter): this. Change for new dirmngr_ldap calling convention. Make issuer DN searching partly work. (escape4url, make_url): Remove. (start_cert_fetch_ldap): Change for new dirmngr_ldap calling convention. * dirmngr/dirmngr_ldap.c: Major rewrite. * dirmngr/t-ldap-misc.c: New. * dirmngr/t-support.h (DIM, DIMof): New. * dirmngr/Makefile.am (dirmngr_ldap_SOURCES): Add ldap-misc.c (module_tests) [USE_LDAP]: Add t-ldap-misc. (t_ldap_parse_uri_SOURCES): Ditto. (t_ldap_misc_SOURCES): New. -- This rewrite allows to properly handle TLS and avoids some code duplication. Signed-off-by: Werner Koch <[email protected]>
* agent: Appropriate error code for importing key with no passwd.NIIBE Yutaka2021-06-081-0/+2
| | | | | | | | | | | | | | | | | * agent/cvt-openpgp.c (convert_from_openpgp_main): Return GPG_ERR_BAD_SECKEY. -- Backport master commit of: 21ef425e222ddfa460b37dece63adb67ff2e4dd1 When non-protected case, error at gcry_pk_testkey results GPG_ERR_BAD_PASSPHRASE. Here, it should be converted to GPG_ERR_BAD_SECKEY, or else, user will be asked passwd even if it's not protected. Signed-off-by: NIIBE Yutaka <[email protected]>
* dirmngr: Remove useless code.Werner Koch2021-06-041-5/+0
| | | | | | | | | * dirmngr/ks-engine-ldap.c (my_ldap_connect): Remove the password_param thing because we set the password directly without an intermediate var. -- Reported-by: Ingo Kloecker
* sm: Support AES-GCM decryption.Werner Koch2021-06-023-8/+89
| | | | | | | | | | | | | | | | | * sm/gpgsm.c (main): Use gpgrt_fcancel on decryption error if gpgrt supports this. * sm/decrypt.c (decrypt_gcm_filter): New. (gpgsm_decrypt): Use this filter if requested. Check authtag. * common/compliance.c (gnupg_cipher_is_allowed): Allow GCM for gpgsm in consumer (decrypt) de-vs mode. -- Backported-from-master: 4980fb3c6dde8c1dda975e8a36d6086c8456a631 We allow GCM in de-vs mode for decryption although this has not been evaluation. It is decryption and thus no serious harm may happen. Signed-off-by: Werner Koch <[email protected]>
* gpgconf: Make runtime changes with different homedir work.Werner Koch2021-05-281-12/+12
| | | | | * tools/gpgconf-comp.c (dirmngr_runtime_change): Pass --homedir first. Remove unused variable.
* doc: Update description of LDAP keyserversWerner Koch2021-05-281-10/+25
| | | | --
* dirmngr: Fix default port for our redefinition of ldaps.Werner Koch2021-05-282-31/+43
| | | | | | | | | * dirmngr/server.c (make_keyserver_item): Fix default port for ldaps. Move a tmpstr out of the blocks. * dirmngr/ks-engine-ldap.c (my_ldap_connect): Improve diagnostics. -- Signed-off-by: Werner Koch <[email protected]>
* build: _DARWIN_C_SOURCE should be 1.NIIBE Yutaka2021-05-271-1/+1
| | | | | | | | | | * configure.ac (*-apple-darwin*): Set _DARWIN_C_SOURCE 1. -- GnuPG-bug-id: 5440 Reported-by: Jay Freeman Signed-off-by: NIIBE Yutaka <[email protected]>
* dirmngr: Use --ldaptimeout for OpenPGP LDAP keyservers.Werner Koch2021-05-263-9/+27
| | | | | | | | | | | | | | * dirmngr/ks-engine-ldap.c (my_ldap_connect): Use LDAP_OPT_TIMEOUT. * dirmngr/dirmngr.c (main): Move --ldaptimeout setting to ... (parse_rereadable_options): here. -- Note that this has not yet been tested. In fact a test with OpenLDAP using a modified route got stuck in the connection attempt. Maybe it works on Windows - will be tested later. Signed-off-by: Werner Koch <[email protected]>
* dirmngr: New option --ldapserverWerner Koch2021-05-264-10/+127
| | | | | | | | | | | | | | | | * dirmngr/dirmngr.c (opts): Add option --ldapserver. (ldapserver_list_needs_reset): New var. (parse_rereadable_options): Implement option. (main): Ignore dirmngr_ldapservers.conf if no --ldapserver is used. * dirmngr/server.c (cmd_ldapserver): Add option --clear and list configured servers if none are given. -- This option allows to specify LDAP keyserver in dirmngr instead of using gpgsm.conf. Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Allow for non-URL specified ldap keyservers.Werner Koch2021-05-266-148/+379
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dirmngr/server.c (cmd_ldapserver): Strip an optional prefix. (make_keyserver_item): Handle non-URL ldap specs. * dirmngr/dirmngr.h (struct ldap_server_s): Add fields starttls, ldap_over_tls, and ntds. * dirmngr/ldapserver.c (ldapserver_parse_one): Add for an empty host string. Improve error messages for the non-file case. Support flags. * dirmngr/ks-action.c (ks_action_help): Handle non-URL ldap specs. (ks_action_search, ks_action_get, ks_action_put): Ditto. * dirmngr/ks-engine-ldap.c: Include ldapserver.h. (ks_ldap_help): Handle non-URL ldap specs. (my_ldap_connect): Add args r_host and r_use_tls. Rewrite to support URLs and non-URL specified keyservers. (ks_ldap_get): Adjust for changes in my_ldap_connect. (ks_ldap_search): Ditto. (ks_ldap_put): Ditto. -- The idea here is to unify our use of URLS or colon delimited ldap keyserver specification. The requirement for percent escaping, for example the bindname in an URLs, is cumbersome and prone to errors. This we allow our classic colon delimited format as an alternative. That format makes it also easy to specify flags to tell dirmngr whether to use starttls or ldap-over-tls. The code is nearly 100% compatible to existing specification. There is one ambiguity if the hostname for CRL/X509 searches is just "ldap"; this can be solved by prefixing it with "ldap:" (already implemented in gpgsm). GnuPG-bug-id: 5405, 5452
* gpg,sm: Simplify keyserver spec parsing.Werner Koch2021-05-2610-481/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | * common/keyserver.h: Remove. * sm/gpgsm.h (struct keyserver_spec): Remove. (opt): Change keyserver to a strlist_t. * sm/gpgsm.c (keyserver_list_free): Remove. (parse_keyserver_line): Remove. (main): Store keyserver in an strlist. * sm/call-dirmngr.c (prepare_dirmngr): Adjust for the strlist. Avoid an ambiguity in dirmngr by adding a prefix if needed. * g10/options.h (struct keyserver_spec): Move definition from keyserver.h to here. Remove most fields. * g10/keyserver.c (free_keyserver_spec): Adjust. (cmp_keyserver_spec): Adjust. (parse_keyserver_uri): Simplify. (keyidlist): Remove fakev3 arg which does not make any sense because we don't even support v3 keys. -- We now rely on the dirmngr to parse the keyserver specs. Thus a bad specification will not be caught immediately. However, even before that dirmngr had stricter tests. Signed-off-by: Werner Koch <[email protected]>