aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* build: Sign all Windows binaries.Werner Koch2019-05-091-7/+71
| | | | | | | | | | | | | | | | | * build-aux/speedo.mk (AUTHENTICODE_SIGNHOST): New. (AUTHENTICODE_TOOL): New. (AUTHENTICODE_FILES): New. (installer): Sign listed files. (AUTHENTICODE_SIGNHOST): New macro. (sign-installer): Use that macro instead of direct use of osslsigncode. -- This also adds code to support signing via a Token. Because there is no specification of that token, I was not able to write a free driver for it. Thus we resort to use a running Windows-10 instance with an enabled ssh server to do the code signing. Signed-off-by: Werner Koch <[email protected]>
* doc: Minor doc fix to dirmngr.Werner Koch2019-05-031-3/+1
| | | | | | -- Reported-by: dkg
* gpg: Use just the addrspec from the Signer's UID.Werner Koch2019-05-031-0/+9
| | | | | | | | | | | | | * g10/parse-packet.c (parse_signature): Take only the addrspec from a Signer's UID subpacket. -- This is to address a problem in the currentr OpenKeychain which put the entire UID into the subpacket. For example our Tofu code can only use the addrspec and not the entire UID. Reported-by: Wiktor Kwapisiewicz <[email protected]> Signed-off-by: Werner Koch <[email protected]>
* po: Update Japanese Translation.NIIBE Yutaka2019-04-231-3/+3
| | | | Signed-off-by: NIIBE Yutaka <[email protected]>
* g10: Fix double free when locating by mboxAndre Heinecke2019-04-181-2/+1
| | | | | | | | | | | | | | | | | * g10/getkey.c (get_best_pubkey_byname): Set new.uid always to NULL after use. -- pubkey_cmp is not guranteed to set new.uid. So if the diff < 0 case is reached best is set to new. If then diff > 0 is reached without modifying new.uid e.g. if the key has no matching mboxes. new.uid is free'd even though the uid is still referenced in best. GnuPG-Bug-Id: T4462 (cherry picked from commit e57954ed278cb5e6e725005b1ecaf7ce70006ce0)
* common: Fix AWK portability.NIIBE Yutaka2019-04-162-7/+7
| | | | | | | | | | | | | * common/Makefile.am: Use pkg_namespace. * common/mkstrtable.awk: Use pkg_namespace. Regexp fix. -- Cherry-picked from master commit: b6f0b0efa19e0434024bc16e246032b613fd448a GnuPG-bug-Bug: 4459 Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg: Accept also armored data from the WKD.Werner Koch2019-04-111-2/+3
| | | | | | | | | | | * g10/keyserver.c (keyserver_import_wkd): Clear NO_ARMOR. -- We may even adjust the specs to allow that. It should not be a problem for any OpenPGP implementation because armored keys are very common and de-armoring code is de-facto a mandatory feature. Signed-off-by: Werner Koch <[email protected]>
* gpg: Set a limit of 5 to the number of keys imported from the WKD.Werner Koch2019-04-111-4/+21
| | | | | | | | | | | | | | | | | | | | | * g10/import.c (import): Limit the number of considered keys to 5. (import_one): Return the first fingerprint in case of WKD. -- The Web Key Directory should carry only one key. However, some providers like to put old or expired keys also into the WKD. I don't thunk that this is a good idea but I heard claims that this is needed for them to migrate existing key data bases. This patch puts a limit on 5 on it (we had none right now) and also fixes the issue that gpg could not work immediately with the requested key because the code uses the fingerprint of the key to use the imported key. Now the first key is used. On a second try (w/o accessing the WKD) the regular key selection mechanism would be in effect. I think this is the most conservative approach. Let's see whether it helps. Signed-off-by: Werner Koch <[email protected]>
* scd: Add dummy option --application-priority.Werner Koch2019-04-021-1/+8
| | | | Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Improve domaininfo cache update algorithm.Werner Koch2019-04-021-19/+106
| | | | | | | | | | | | | | | | | * dirmngr/domaininfo.c (struct domaininfo_s): Add field keepmark. (insert_or_update): Implement new update algorithm. -- The old algorithm limited the length of a bucket chain by purging the last 50% or the entries. Thus the first domains entered into the cache were never purged. The new algorithm is a bit better: It also limits the chain length on overflow to 50% but tries to keep the entries indicating that a WKD is available in the cache. If there is still space to keep more, those which clearly do not support WKD are also kept. Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Better error code for http status 413.Werner Koch2019-04-023-0/+12
| | | | | | | | | * dirmngr/ks-engine-hkp.c (send_request): New case for 413. * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto. * dirmngr/ocsp.c (do_ocsp_request): Ditto. -- Signed-off-by: Werner Koch <[email protected]>
* NEWS: correct typo in headerDaniel Kahn Gillmor2019-04-011-1/+1
|
* g10: Fix symmetric cipher algo constant for ECDH.NIIBE Yutaka2019-03-272-3/+3
| | | | | | | | | | | * g10/ecdh.c (kek_params_table): Use CIPHER_ALGO_AES192 for ECC strength 384, according to RFC-6637. -- Reported-by: Trevor Bentley Signed-off-by: NIIBE Yutaka <[email protected]> (cherry picked from commit af3efd149f555d36a455cb2ea311ff81caf5124c)
* gpg: Don't use EdDSA algo ID for ECDSA curves.Trevor Bentley2019-03-271-7/+18
| | | | | | | | | | | | | * g10/keygen.c (ask_curve): Change algo ID to ECDSA if it changed from an EdDSA curve. -- (cherry picked from commit 4324560b2c0bb76a1769535c383424a042e505ae) This change matters when it is called from ask_card_keyattr. Some-comments-by: NIIBE Yutaka <[email protected]>
* Post release updatesWerner Koch2019-03-262-1/+4
| | | | --
* Release 2.2.15gnupg-2.2.15Werner Koch2019-03-261-1/+19
|
* sm: Allow decryption even if expired other keys are configured.Werner Koch2019-03-261-0/+11
| | | | | | | | | | | | | | * sm/gpgsm.c (main): Add special handling for bad keys in decrypt mode. -- The problem can easily be tested by adding --encrypt-to EXPIRED_KEY to a decryption command. With that patch the errors are printed but decryption continues and the process returns success unless other errors occur. GnuPG-bug-id: 4431 Signed-off-by: Werner Koch <[email protected]>
* agent: Allow other ssh fingerprint algos in KEYINFO.Werner Koch2019-03-261-4/+20
| | | | | | | * agent/command.c (cmd_keyinfo): Allow for --ssh-fpr=ALGO. Default to the standard algo. Signed-off-by: Werner Koch <[email protected]>
* wkd: New command --print-wkd-url for gpg-wks-client.Werner Koch2019-03-254-5/+50
| | | | | | | | | * tools/gpg-wks-client.c (aPrintWKDURL): New. (opts): Add option. (main): Implement. * tools/wks-util.c (wks_cmd_print_wkd_url): New. Signed-off-by: Werner Koch <[email protected]>
* doc: Clarify option --no-keyring.Werner Koch2019-03-251-1/+2
| | | | | | | -- GnuPG-bug-id: 4424 Signed-off-by: Werner Koch <[email protected]>
* libdns: Don't use _[A-Z] which are reserved names.NIIBE Yutaka2019-03-251-40/+40
| | | | | | | | | | * dirmngr/dns.c: Use the identifiers of "*_instance" instead of reserved "_[A-Z]". -- GnuPG-bug-id: 4420 Signed-off-by: NIIBE Yutaka <[email protected]>
* wkd: New command --print-wkd-hash for gpg-wks-client.Werner Koch2019-03-255-12/+129
| | | | | | | | | | | | | * tools/gpg-wks-client.c (aPrintWKDHash): New. (opts) : Add "--print-wkd-hash". (main): Implement that command. (proc_userid_from_stdin): New. * tools/wks-util.c (wks_fname_from_userid): Add option HASH_ONLY. (wks_cmd_print_wkd_hash): New. -- GnuPG-bug-id: 4418 Signed-off-by: Werner Koch <[email protected]>
* sm, w32: Translate logger and status fd to handlesAndre Heinecke2019-03-251-2/+6
| | | | | | | | | | | | | * sm/gpgsm.c (main): Call translate_sys2libc_fd_int to convert the FDs. -- This is required to actually pass gpgsm an fd on windows and not a windows handle. For the passphrase-fd this was already done. (cherry picked from commit e4e0804ed123516fa00f8a876a862b2c6d34ba5c)
* doc: fix formatting errorDaniel Kahn Gillmor2019-03-221-1/+2
| | | | Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* Post release updatesWerner Koch2019-03-192-1/+4
| | | | --
* Release 2.2.14gnupg-2.2.14Werner Koch2019-03-191-1/+36
|
* po: Auto updateWerner Koch2019-03-1926-370/+322
| | | | --
* po: Minor update to the Polish translationJan Kowalski2019-03-181-6/+2
| | | | | | -- Signed-off-by: Werner Koch <[email protected]>
* po: Update Russian translationIneiev2019-03-181-9/+6
|
* gpg: Do not bail out on v5 keys in the local keyring.Werner Koch2019-03-185-7/+18
| | | | | | | | | | | | | | | | | | | | * g10/parse-packet.c (parse_key): Return GPG_ERR_UNKNOWN_VERSION instead of invalid packet. * g10/keydb.c (parse_keyblock_image): Do not map the unknown version error to invalid keyring. (keydb_search): Skip unknown version errors simlar to legacy keys. * g10/keyring.c (keyring_rebuild_cache): Skip keys with unknown versions. * g10/import.c (read_block): Handle unknown version. -- When using gpg 2.3 the local keyring may contain v5 keys. This patch allows the use of such a keyring also with a 2.2 version which does not support v5 keys. We will probably need some more tweaking here but this covers the most common cases of listing keys and also importing v5 keys. Signed-off-by: Werner Koch <[email protected]>
* gpg: Allow import of PGP desktop exported secret keys.Werner Koch2019-03-183-79/+307
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/import.c (NODE_TRANSFER_SECKEY): New. (import): Add attic kludge. (transfer_secret_keys): Add arg only_marked. (resync_sec_with_pub_keyblock): Return removed seckeys via new arg r_removedsecs. (import_secret_one): New arg r_secattic. Change to take ownership of arg keyblock. Implement extra secret key import logic. Factor some code out to ... (do_transfer): New. (import_matching_seckeys): New. -- The PGP desktops exported secret keys are really stupid. And they even a have kind of exception in rfc4880 which does not rule that out (section 11.2): [...] Implementations SHOULD include self-signatures on any user IDs and subkeys, as this allows for a complete public key to be automatically extracted from the transferable secret key. Implementations MAY choose to omit the self-signatures, especially if a transferable public key accompanies the transferable secret key. Now if they would only put the public key before the secret key. Anyway we now have a workaround for that ugliness. GnuPG-bug-id: 4392 Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 5205512fc092c53c0a52c8379ef2a129ce6e58a9)
* gpg: Avoid importing secret keys if the keyblock is not valid.Werner Koch2019-03-185-30/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/keydb.h (struct kbnode_struct): Replace unused field RECNO by new field TAG. * g10/kbnode.c (alloc_node): Change accordingly. * g10/import.c (import_one): Add arg r_valid. (sec_to_pub_keyblock): Set tags. (resync_sec_with_pub_keyblock): New. (import_secret_one): Change return code to gpg_error_t. Return an error code if sec_to_pub_keyblock failed. Resync secret keyblock. -- When importing an invalid secret key ring for example without key binding signatures or no UIDs, gpg used to let gpg-agent store the secret keys anyway. This is clearly a bug because the diagnostics before claimed that for example the subkeys have been skipped. Importing the secret key parameters then anyway is surprising in particular because a gpg -k does not show the key. After importing the public key the secret keys suddenly showed up. This changes the behaviour of GnuPG-bug-id: 4392 to me more consistent but is not a solution to the actual bug. Caution: The ecc.scm test now fails because two of the sample keys don't have binding signatures. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit f799e9728bcadb3d4148a47848c78c5647860ea4)
* tests: Add sample secret key w/o binding signatures.Werner Koch2019-03-182-0/+66
| | | | | | | -- GnuPG-bug-id: 4392 (cherry picked from commit 8c20a363c221438373439cde8c242e04c1bd925e)
* gpg: During secret key import print "sec" instead of "pub".Werner Koch2019-03-184-16/+25
| | | | | | | | | | | | * g10/keyedit.c (show_basic_key_info): New arg 'print_sec'. Remove useless code for "sub" and "ssb". * g10/import.c (import_one): Pass FROM_SK to show_basic_key_info. Do not print the first keyinfo in FROM_SK mode. printing. -- Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit f64477db86568bdc28c313bfeb8b95d8edf05a3c)
* gpg: Simplify an interactive import status line.Werner Koch2019-03-182-19/+34
| | | | | | | | | | * g10/cpr.c (write_status_printf): Escape CR and LF. * g10/import.c (print_import_check): Simplify by using write_status_printf and hexfingerprint. Signed-off-by: Werner Koch <[email protected]> Fixed one conlict in a comment.
* libdns: Avoid using compound literals (8).NIIBE Yutaka2019-03-071-20/+0
| | | | | | | | | | | | | | * dirmngr/dns.h (dns_quietinit): Remove. (dns_hints_i_new): Remove. -- Even before our change, dns_quietinit was questionable macro; There was no place in dns.c which requires overrides in initializer list. Only redundant zero were. Signed-off-by: NIIBE Yutaka <[email protected]> (cherry picked from commit 371ae25f8f6f2d1ac030bf984bca479393a5ed43)
* libdns: Avoid using compound literals (7).NIIBE Yutaka2019-03-073-12/+16
| | | | | | | | | | | | | | | | | * dirmngr/dns.h (DNS_OPTS_INIT, dns_opts): Remove. * dirmngr/dns-stuff.c (libdns_res_open): Use zero-ed, and initialized automatic variable for opts. * dirmngr/dns.c (send_query, resolve_query, resolve_addrinfo): Likewise. -- In fact, DNS_OPTS_INIT was only needed when args are none. With partially specified initialization, C99 guarantees zero-ed other members just like static object. Signed-off-by: NIIBE Yutaka <[email protected]> (cherry picked from commit d661acd483236d34720a4959fc816d05f89c2cb7)
* libdns: Avoid using compound literals (6).NIIBE Yutaka2019-03-073-33/+51
| | | | | | | | | | | | | | * dirmngr/dns.h (dns_rr_i_new): Remove. (dns_rr_i_init): Remove unused second argument. * dirmngr/dns.c (dns_p_dump, dns_hints_query, print_packet) (parse_packet): Use automatic variable for struct dns_rr_i. (dns_d_cname): No need to call dns_rr_i_init after memset 0. (dns_rr_i_init): Remove unused second argument. Return nothing. * dirmngr/dns-stuff.c (resolve_addr_libdns, get_dns_cert_libdns) (getsrv_libdns): Follow the change of dns_rr_i_init. Signed-off-by: NIIBE Yutaka <[email protected]> (cherry picked from commit 6501e59d3685bb58753c9caea729a4b0eca3942a)
* libdns: Avoid using compound literals (5).NIIBE Yutaka2019-03-072-2/+3
| | | | | | | | | | | | | | | | * dirmngr/dns.h (dns_rr_foreach): Don't use dns_rr_i_new. Call dns_rr_grep with NULL. * dirmngr/dns.c (dns_rr_grep): Support NULL for error_. -- Here we still use C99 feature of struct member initialization in dns_rr_foreach, for struct dns_rr_i. Note that in C99, it guarantees non-specified member fields are initialized by zero. So, there's no need to use dns_rr_i_new at all. Signed-off-by: NIIBE Yutaka <[email protected]> (cherry picked from commit a1ccfe2b37847cce0db2fb94a7365c9fa501eda4)
* libdns: Avoid using compound literals (4).NIIBE Yutaka2019-03-072-7/+6
| | | | | | | | | | * dirmngr/dns.h (dns_d_new*): Remove. * dirmngr/dns.c (parse_packet): Use dns_d_init with automatic variable. (parse_domain): Likewise. Signed-off-by: NIIBE Yutaka <[email protected]> (cherry picked from commit 7313a112f9c7ada61d24285313d2e2d069a672e8)
* libdns: Avoid using compound literals (3).NIIBE Yutaka2019-03-072-12/+18
| | | | | | | | | | | | | | | | * dirmngr/dns.h (dns_p_new): Remove. * dirmngr/dns.c (dns_hosts_query): Use dns_p_init with automatic variable. (dns_hints_query, dns_res_glue, parse_packet, query_hosts) (send_query, show_hints, echo_port): Likewise. -- Implicit automatic allocation by compound literals is confusing for C90 code. Signed-off-by: NIIBE Yutaka <[email protected]> (cherry picked from commit 72efb7840258808cd892b90d871ea1cc1c31d7f5)
* libdns: Avoid using compound literals (2).NIIBE Yutaka2019-03-072-19/+12
| | | | | | | | | | | | | * dirmngr/dns.h (dns_strsection1, dns_strsection3): Remove. (dns_strclass1, dns_strclass3): Remove. (dns_strtype1, dns_strtype3): Remove. (dns_strsection, dns_strclass, dns_strtype): Directly use the function. * dirmngr/dns.c (dns_strsection): Use automatic variable. (dns_strclass, dns_strtype): Likewise. Signed-off-by: NIIBE Yutaka <[email protected]> (cherry picked from commit 455ef62d29a112de05897139716265d07e4c6ae3)
* libdns: Avoid using compound literals.NIIBE Yutaka2019-03-071-5/+10
| | | | | | | | | | | | | | | | * dirmngr/dns.c (dns_inet_pton, dns_so_tcp_keep): Use automatic variables. (dns_poll, dns_send_nopipe): Likewise, adding const qualifier. -- Compound literals is a feature of C99. Because we only use C90 plus some limited features, in the project, it's better to avoid it. Besides, we make sure when it's read-only. Signed-off-by: NIIBE Yutaka <[email protected]> (cherry picked from commit 1c405499388fd5bed0968ab5c6c5d1b3373537b9)
* dirmngr: Add CSRF protection exception for protonmail.Werner Koch2019-03-071-5/+40
| | | | | | | | | | | * dirmngr/http.c (same_host_p): Add exception table. -- Please: Adding entries to this table shall be an exception and not the rule. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 134c3c16523b1a267ebdd2df6339240fd9e1e3b3)
* gpgtar: Make option -C work for archive creation.Werner Koch2019-03-073-5/+14
| | | | | | | | | | | | * tools/gpgtar-create.c (gpgtar_create): Switch to the -C directory. -- The -C option is pretty useful given that pattern are always relative to the current directory. In contrast to GNU tar, the switching is done only once. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit b3a7a5140784b5a015107b5c5c73b15ae44e71dc)
* gpgtar: Improve error messages.Werner Koch2019-03-074-43/+89
| | | | | | | | | | | | | | | | | | | | | * tools/gpgtar.h (struct tarinfo_s): New. * tools/gpgtar.c (cmd, skip_crypto, files_from, null_names): Move global vars more to the top. (set_cmd): Rename 'cmd' to 'c'. * tools/gpgtar-list.c (parse_header): Add arg 'info' and improve error messages. (read_header): Add arg 'info' and update counter. (skip_data): Ditto. (gpgtar_list): Pass info object to read functions. (gpgtar_read_header): Add arg 'info'. * tools/gpgtar-extract.c (gpgtar_extract): add arg 'info' and pass on. (extract_regular): Add arg 'info' and update counter. -- This now prints the block number of a header with error. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 72feb8fa8280aba674573a1afc955a92e8065242)
* gpg: Make invalid primary key algos obvious in key listings.Werner Koch2019-03-071-1/+9
| | | | | | | | | | | | | | | | | | | | | * g10/keylist.c (print_key_line): Print a warning for invalid algos. -- Non-OpenPGP compliant keys now show a warning flag on the sec or pub line like in: gpg: can't encode a 256 bit MD into a 88 bits frame, algo=8 sec cv25519 2019-01-30 [INVALID_ALGO] 4239F3D606A19258E7A88C3F9A3F4F909C5034C5 uid [ultimate] ffffff Instead of showing the usage flags "[CE]". Without this patch only the error message is printed and the reason for it was not immediately obvious (cv25519 is encryption only but we always consider the primary key as having the "C" flag). Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit db87132b10664718b7db6ec1dad584b54d1fb265)
* sm: Print Yubikey attestation extensions with --dump-cert.Werner Koch2019-03-071-3/+37
| | | | | | | | | | * sm/keylist.c (oidtranstbl): Add Yubikey OIDs. (OID_FLAG_HEX): New. (print_hex_extn): New. (list_cert_raw): Make use of that flag. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 86c241a8c9a952ea8007066b70b04f435e2e483e)
* tests: Add "disable-scdaemon" in gpg-agent.conf.NIIBE Yutaka2019-03-075-10/+5
| | | | | | | | | | | | | | | | | | * tests/openpgp/defs.scm: Add "disable-scdaemon". Remove "scdaemon-program". * tests/gpgme/gpgme-defs.scm, tests/gpgsm/gpgsm-defs.scm: Likewise. * tests/inittests, tests/pkits/inittests: Add "disable-scdaemon" -- Before this change, running "make check" accesses USB device by scdaemon on host computer. If there is any smartcard/token available, it may affect test results. Because default key choice depends on smartcard/token availability now and existing tests have nothing about testing smartcard/token, disabling scdaemon is good. Signed-off-by: NIIBE Yutaka <[email protected]> (cherry picked from commit 64b7c6fd1945bc206cf56979633dfca8a7494374)
* scd: Fix flushing of CA-FPR data objectsWerner Koch2019-03-071-20/+22
| | | | | | | | | | | | | | | | | * scd/app-openpgp.c (do_setattr): Add new table item to flush a different tag. -- For whatever reasons the OpenPGP card reads the 3 CA fingerprints from one object but sets them individually using 3 different tags. The cache flushing was not prepared for this and so a changed CA fingerprint showed only up after a card reset. This patch fixes it. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit c9f4c1f0de06672c6ae2b793d86cc001d131f9a6) Fixed conflict by removing the UIF-* entries from the table.