gnupg.git
7 months agogpg: Make --dry-run and show-only work for secret keys.
Werner Koch [Thu, 19 Oct 2017 15:05:39 +0000 (17:05 +0200)]
gpg: Make --dry-run and show-only work for secret keys.

* g10/import.c (import_secret_one): Check for dry-run before
transferring keys.
--

The use of --dry-run or --import-option show-only had no effect when
importing a secret key and the public key already existed.  If the
public key did not exist an error message inhibited the import of the
secret key.

Signed-off-by: Werner Koch <wk@gnupg.org>
7 months agodirmngr: Do not follow https-to-http redirects.
Damien Goutte-Gattat [Sun, 8 Oct 2017 16:30:52 +0000 (17:30 +0100)]
dirmngr: Do not follow https-to-http redirects.

* dirmngr/ks-engine-http.c (ks_http_fetch): Forbid redirects from
a https URI to a http URI.
--

GnuPG-bug-id: 3436
Signed-off-by: Damien Goutte-Gattat <dgouttegattat@incenp.org>
7 months agog10: Fix find_and_check_key for multiple keyrings.
NIIBE Yutaka [Thu, 19 Oct 2017 02:08:24 +0000 (11:08 +0900)]
g10: Fix find_and_check_key for multiple keyrings.

* g10/pkclist.c (find_and_check_key): Call get_validity on a specific
keyblock.

--

When we have multiple keyrings, get_validity after
get_best_pubkey_byname should access same keyring.  Or else, the
situation of an expired key in keyring A but valid key in keyring B
causes SEGV.

Thanks to Guido Günther for the use case and the log.

Debian-bug-id: 878812
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
7 months agogpg: Keep a lock during the read-update/insert cycle in import.
Werner Koch [Wed, 18 Oct 2017 16:28:52 +0000 (18:28 +0200)]
gpg: Keep a lock during the read-update/insert cycle in import.

* g10/keydb.c (keydb_handle): New field 'keep_lock'.
(keydb_release): Clear that flag.
(keydb_lock): New function.
(unlock_all): Skip if KEEP_LOCK is set.
* g10/getkey.c (get_keyblock_byfprint_fast): Call keep_lock if
requested.
--

That change is straightforward.  It helps to avoid the race condition
that another gpg process inserts a key while the first process is
between the search and the insert.

A similar change is due for gpgsm.

Note that the key edit operations may still suffer from a race.

GnuPG-bug-id: 3446

7 months agogpg: Improve keydb handling in the main import function.
Werner Koch [Wed, 18 Oct 2017 15:52:41 +0000 (17:52 +0200)]
gpg: Improve keydb handling in the main import function.

* g10/getkey.c (get_pubkey_byfprint_fast): Factor most code out to ...
(get_keyblock_byfprint_fast): .. new function.
* g10/import.c (revocation_present): s/int rc/gpg_error_t err/.
(import_one): Use get_keyblock_byfprint_fast to get the keyblock and a
handle.  Remove the now surplus keyblock fetch in the merge branch.

Signed-off-by: Werner Koch <wk@gnupg.org>
7 months agogpg: Simplify keydb handling of the main import function.
Werner Koch [Wed, 18 Oct 2017 11:09:47 +0000 (13:09 +0200)]
gpg: Simplify keydb handling of the main import function.

* g10/import.c (import_keys_internal): Return gpg_error_t instead of
int.  Change var names.
(import_keys_es_stream): Ditto.
(import_one): Ditto.  Use a single keydb_new and simplify the use of
of keydb_release.
--

Note that this opens a keydb handle before we call
get_pubkey_byfprint_fast which internally uses another key db handle.
A further patch will cleanup this double use.  Note that we also
disable the keydb caching for the insert case.

The s/int/gpg_error_t/ has been done while checking the call chains of
the import functions and making sure that gpg_err_code is always used.

Signed-off-by: Werner Koch <wk@gnupg.org>
7 months agosm: Fix colon listing of fields > 12 in crt records.
Werner Koch [Tue, 17 Oct 2017 18:56:55 +0000 (20:56 +0200)]
sm: Fix colon listing of fields > 12 in crt records.

* sm/keylist.c (print_capabilities): Move colon printing ...
(list_cert_colon): to here.
--

Fixes-commit: 7af008bfe1641938a6c2c995cb065829fa05a693
Signed-off-by: Werner Koch <wk@gnupg.org>
8 months agogpg: Workaround for junk after --trusted-key.
Werner Koch [Thu, 28 Sep 2017 12:10:12 +0000 (14:10 +0200)]
gpg: Workaround for junk after --trusted-key.

* g10/trust.c (register_trusted_key): Cut off everthing starting as a
hash sign.
--

This problem is fallout from
commit f99830b72812395da5451152bdd2f2d90a7cb7fb
which fixes
GnuPG-bug-id: 1206

The same could happen with other options taking keyids but we won't
change that because a trailing '#' does not indicate a comment.  So
this is really only a workaround and eventually we will
deprecate --trusted-key anyway or require a fingerprint as a value.

Signed-off-by: Werner Koch <wk@gnupg.org>
8 months agodoc: Make --check-sigs more prominent.
Werner Koch [Wed, 27 Sep 2017 15:18:55 +0000 (17:18 +0200)]
doc: Make --check-sigs more prominent.

--

It seems people are using --list-sigs instead of --check-sigs and do
not realize that the signatures are not checked at all.  We better
highlight the use of --check-sigs to avoid this UI problem.

Suggested-by: Andrew Gallagher
Signed-off-by: Werner Koch <wk@gnupg.org>
8 months agopo: Remove trailing colon from a German pinentry string.
Werner Koch [Tue, 26 Sep 2017 09:52:18 +0000 (11:52 +0200)]
po: Remove trailing colon from a German pinentry string.

--

8 months agopo: Fix German translation.
Werner Koch [Sun, 24 Sep 2017 07:56:26 +0000 (09:56 +0200)]
po: Fix German translation.

--

Reported-by: engelmarkus
8 months agoPost release updates
Werner Koch [Tue, 19 Sep 2017 06:34:36 +0000 (08:34 +0200)]
Post release updates

--

8 months agoRelease 2.2.1 gnupg-2.2.1
Werner Koch [Tue, 19 Sep 2017 06:13:44 +0000 (08:13 +0200)]
Release 2.2.1

8 months agodirmngr: Use system certs if --hkp-cacert is not used.
Werner Koch [Mon, 18 Sep 2017 20:49:05 +0000 (22:49 +0200)]
dirmngr: Use system certs if --hkp-cacert is not used.

* dirmngr/certcache.c (any_cert_of_class): New var.
(put_cert): Set it.
(cert_cache_deinit): Clear it.
(cert_cache_any_in_class): New func.
* dirmngr/http-ntbtls.c (gnupg_http_tls_verify_cb): Add hack to
override empty list of HKP certs.
--

This patch carries the changes for GNUTLS from commit
7c1613d41566f7d8db116790087de323621205fe over to NTBTLS.  NTBTLS works
quite different and thus we need to do it this way.

Signed-off-by: Werner Koch <wk@gnupg.org>
8 months agopo: Minor Grammar update of the Greek translation
Dimitris Maroulidis [Mon, 18 Sep 2017 14:23:43 +0000 (16:23 +0200)]
po: Minor Grammar update of the Greek translation

--
GnuPG-bug-id: 3409

Signed-off-by: Werner Koch <wk@gnupg.org>
8 months agowks: Create a new user id if provider wants mailbox-only.
Werner Koch [Mon, 18 Sep 2017 13:37:21 +0000 (15:37 +0200)]
wks: Create a new user id if provider wants mailbox-only.

* tools/gpg-wks-client.c (get_key): Add arg 'exact'.
(add_user_id): New.
(command_send): Create new user id.

Signed-off-by: Werner Koch <wk@gnupg.org>
8 months agowks: Send only the newest UID to the server.
Werner Koch [Mon, 18 Sep 2017 10:52:20 +0000 (12:52 +0200)]
wks: Send only the newest UID to the server.

* tools/wks-util.c (list_key_status_cb): Rename to key_status_cb.
(wks_filter_uid): New.
(wks_list_key): Allow FPR to be NULL.  Return an error if no
fingerprint was found.
* tools/gpg-wks-server.c (process_new_key)
(check_and_publish): Remove now useless extra check for FPR.
* tools/gpg-wks-client.c (command_check): Ditto.
(command_send): Filter out the newest uid.
--

This fixes the case of having several userids with all the the same
mailbox.  Now we use the latest user id created.  This patch is also a
prerequisite to automatically create a new user id for providers with
the mailbox-only policy.

Signed-off-by: Werner Koch <wk@gnupg.org>
8 months agowks: Print the UID creation time with gpg-wks-client --check.
Werner Koch [Mon, 18 Sep 2017 09:31:36 +0000 (11:31 +0200)]
wks: Print the UID creation time with gpg-wks-client --check.

* tools/gpg-wks.h (uidinfo_list_s): Add field 'created'.
* tools/wks-util.c (append_to_uidinfo_list): Add arf 'created'.
(wks_list_key): Pass timestamp to append_to_uidinfo_list.
* tools/gpg-wks-client.c (command_check): Print UID creation time.

Signed-off-by: Werner Koch <wk@gnupg.org>
8 months agowks: Use dedicated type to convey user ids.
Werner Koch [Mon, 18 Sep 2017 09:16:07 +0000 (11:16 +0200)]
wks: Use dedicated type to convey user ids.

* tools/gpg-wks.h (uidinfo_list_s, uidinfo_list_t): New.
* tools/wks-util.c (append_to_uidinfo_list): New.
(free_uidinfo_list): New.
(wks_list_key): Change arg r_mboxes to uidinfo_list_t.  Use
append_to_uidinfo_list.
* tools/gpg-wks-server.c (sserver_ctx_s): Replace strlist_t by
uidinfo_list_t.
(process_new_key): Ditto.
(check_and_publish): Ditto.
(command_receive_cb): Replace free_strlist by free_uidinfo_list.
* tools/gpg-wks-client.c (command_check): Replace strlist_t by
uidinfo_list_t.  Also print user id in verbose mode.

Signed-off-by: Werner Koch <wk@gnupg.org>
9 months agogpgv: Initialize compliance checker.
Werner Koch [Wed, 13 Sep 2017 07:18:15 +0000 (09:18 +0200)]
gpgv: Initialize compliance checker.

* g10/gpgv.c (main): Call gnupg_initialize_compliance.
--

The compliance checker needs to be initialize so that it won't let
spit out a "not suitable" message.  We use the module name of gpg.
Because there is no option to change the compliance mode in gpgv we
will always be in the default (CO_GNUPG) mode.  It also does not make
much sense to have it here because gpgv expects a "curated" keyring.

GnuPG-bug-id: 3404
Signed-off-by: Werner Koch <wk@gnupg.org>
9 months agowks: Add hack for the broken posteo system
Werner Koch [Tue, 12 Sep 2017 16:08:09 +0000 (18:08 +0200)]
wks: Add hack for the broken posteo system

* tools/gpg-wks-client.c (command_send): Additional hack for posteo.
Check the protocol-version flag.

Signed-off-by: Werner Koch <wk@gnupg.org>
9 months agowks: Add new policy flag protocol-version
Werner Koch [Tue, 12 Sep 2017 16:05:00 +0000 (18:05 +0200)]
wks: Add new policy flag protocol-version

* tools/gpg-wks.h (policy_flags_s): Add field protocol_version.
* tools/wks-util.c (wks_parse_policy): Add new policy flag.

Signed-off-by: Werner Koch <wk@gnupg.org>
9 months agogpg: Fix "Fix key generation with only an email part".
Werner Koch [Tue, 12 Sep 2017 12:38:44 +0000 (14:38 +0200)]
gpg: Fix "Fix key generation with only an email part".

* g10/keygen.c (proc_parameter_file): Don't check the result of
stpcpy.
--

Fixes-commit: 7089dcc54099a4909ce7d386c07ab87e1398e2eb
Signed-off-by: Werner Koch <wk@gnupg.org>
9 months agowks: Use unencrypted draft-1 mode for posteo.de
Werner Koch [Tue, 12 Sep 2017 12:32:29 +0000 (14:32 +0200)]
wks: Use unencrypted draft-1 mode for posteo.de

* tools/gpg-wks-client.c (command_send): Allow sending in draft-1
mode.
--

Obviously Posteo did not implement the current draft and thus it was
not possible to send a request to them.  This hack uses the old method
for posteo.de.  Not sending it encrypted is okay here because they use
authenticated sending anyway.

Signed-off-by: Werner Koch <wk@gnupg.org>
9 months agotools: New function mime_maker_add_body_data.
Werner Koch [Tue, 12 Sep 2017 12:29:04 +0000 (14:29 +0200)]
tools: New function mime_maker_add_body_data.

* tools/mime-maker.c (mime_maker_add_body_data): New.

Signed-off-by: Werner Koch <wk@gnupg.org>
9 months agotests: Fix a test which specifies expiration date.
NIIBE Yutaka [Fri, 8 Sep 2017 05:21:29 +0000 (14:21 +0900)]
tests: Fix a test which specifies expiration date.

* tests/openpgp/quick-key-manipulation.scm: Fix expiration time
comparison.

--

This is a bug fix for Amelia Earhart who is probably in UTC-12.

When expiration date is specified, GnuPG interprets it as noon of the
date in local time.

Before this fix, the test compared the value by 2145916800 which is
2038-01-01 00:00:00 in UTC with allowance of 1 day.  When the test
was ran in UTC-12 timezone, it failed because of noon in the timezone
is midnight of the next day in UTC.

GnuPG-bug-id: 3393
Reported-by: Daniel Kahn Gillmor
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agoscd: Fix for large ECC keys.
NIIBE Yutaka [Tue, 29 Aug 2017 05:35:47 +0000 (14:35 +0900)]
scd: Fix for large ECC keys.

* scd/app-openpgp.c (do_decipher): Support larger length.

--

Reported-by: Achim Pietig <achim@pietig.com>
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
9 months agogpg: Fix key generation with only an email part.
Werner Koch [Mon, 11 Sep 2017 09:29:13 +0000 (11:29 +0200)]
gpg: Fix key generation with only an email part.

* g10/keygen.c (proc_parameter_file): Special case the email only
case.
--

Using a parameter file like

  %ask-passphrase
  key-type:      RSA
  key-length:    2048
  key-usage:     sign
  subkey-type:   RSA
  subkey-length: 2048
  subkey-usage:  encrypt
  name-email:    foo@example.org

with "gpg --gen-key --patch" the result was this key

  pub   rsa2048 2017-09-11 [SC]
        63A8C1BA12CC289A0E8072C971C7F8D4A18CE0BE
  uid           [ultimate]  <foo@example.org>
  sub   rsa2048 2017-09-11 [E]

At least the the extra leading space the left angle bracket is wrong.
Further some mail providers reject keys which consist of more than
just a plain mail address.  Using just a mail address is anyway the
new new suggested content for a user id.  With this patch the key
will be

  pub   rsa2048 2017-09-11 [SC]
        B302343C20EA6DECDB6A155135352F2520397080
  uid           [ultimate] foo@example.org
  sub   rsa2048 2017-09-11 [E]

Signed-off-by: Werner Koch <wk@gnupg.org>
9 months agoPost release updates
Werner Koch [Mon, 28 Aug 2017 09:57:17 +0000 (11:57 +0200)]
Post release updates

--

9 months agoRelease 2.2.0 gnupg-2.2.0
Werner Koch [Mon, 28 Aug 2017 09:18:26 +0000 (11:18 +0200)]
Release 2.2.0

9 months agopo: Auto update
Werner Koch [Mon, 28 Aug 2017 09:17:39 +0000 (11:17 +0200)]
po: Auto update

--

9 months agoscd: Convey the correct length for Le
Werner Koch [Sun, 27 Aug 2017 14:42:52 +0000 (16:42 +0200)]
scd: Convey the correct length for Le

* scd/app-openpgp.c (determine_rsa_response): Round bits up.
--

Co-authored-by: Arnaud Fontaine <arnaud.fontaine@ssi.gouv.fr>
Arnaud wrote:

  Actually, when the incorrect expected response length (i.e. Le
  field) is transmitted to the card, the card's answer is missing a
  byte (i.e. ...  6101) so an additional command has to be sent to the
  card to retrieve the last byte. Using the correct length avoids to
  send the additional command to retrieve the missing byte, when the
  computed length is wrong.

Note that an value of 65537 for E is pretty standard and thus we can
avoid the 6101 return code inmost cases.

Signed-off-by: Werner Koch <wk@gnupg.org>
9 months agogpg: Fix memory leak while running --check-trustdb.
Werner Koch [Thu, 24 Aug 2017 20:06:59 +0000 (22:06 +0200)]
gpg: Fix memory leak while running --check-trustdb.

* g10/trustdb.c (update_min_ownertrust): Free PK.
--

This bug was revealed by the new trust-pgp-2.scm test.

Signed-off-by: Werner Koch <wk@gnupg.org>
9 months agogpg: Fix memory leak in sig-check.
Werner Koch [Thu, 24 Aug 2017 18:26:19 +0000 (20:26 +0200)]
gpg: Fix memory leak in sig-check.

* g10/sig-check.c (check_signature_over_key_or_uid): Remove useless
condition.  Actually free when SIGNER was allocated by us.
--

SIGNER_ALLOCATED never received a value of -1 but that was tested.

IF SIGNER_ALLOCATED was 2 the memory was never freed:

  if (signer_allocated == 1)
    if (signer_allocated == 2)
      free()

Fixes-commit: 44cdb9d73f1a0b7d2c8483a119b9c4d6caabc1ec

This function needs to be audited more thoroughly.

Signed-off-by: Werner Koch <wk@gnupg.org>
9 months agoindent: Change comment style on two functions
Werner Koch [Thu, 24 Aug 2017 17:19:23 +0000 (19:19 +0200)]
indent: Change comment style on two functions

--

This is to make those function better readable.

  if (foo)
     /* Comment */
     {

     }

is bad style because it requires extra time to notice the begin of the
block and vice versa when noticing the block it is not clear whether
this is an conditioned or unconditioned block.

Having asterisks on the left is better for view impaired people and
for b/w printouts.

Signed-off-by: Werner Koch <wk@gnupg.org>
9 months agobuild: Remove obsolete option from autogen.rc
Werner Koch [Thu, 24 Aug 2017 15:44:02 +0000 (17:44 +0200)]
build: Remove obsolete option from autogen.rc

* autogen.rc: Remove --enable-gpg2-is-gpg.
--

This option is now the default.

Signed-off-by: Werner Koch <wk@gnupg.org>
9 months agogpgconf: Swap "auto-key-retrieve" and "no-auto-key-retrieve".
Werner Koch [Wed, 23 Aug 2017 14:45:20 +0000 (16:45 +0200)]
gpgconf: Swap "auto-key-retrieve" and "no-auto-key-retrieve".

* g10/gpg.c (gpgconf_list): Announce "auto-key-retrieve".
(main): Simplify setting of KEYSERVER_AUTO_KEY_RETRIEVE.
* tools/gpgconf-comp.c: Make "no-auto-key-retrieve" invisible.  Make
"auto-key-retrieve" an expert option.
--

This basically reverts 9bb13a0e819334681caca38c9074bd7bfc04e45e
because --no-auto-key-retrieve is again the default.  Note that we
allow both options for the sake of profiles.

Signed-off-by: Werner Koch <wk@gnupg.org>
9 months agotests: Do not run trust-pgp-4.scm
Werner Koch [Wed, 23 Aug 2017 13:16:52 +0000 (15:16 +0200)]
tests: Do not run trust-pgp-4.scm

* tests/openpgp/Makefile.am (XTESTS): Remove test.
(EXTRA_DIST): Add test file.
--

There are two problems with this test: First a syntax error in the
file name so that the test was not used at all.  Second the test
currently returns FAIL.

Fixes-commit: c23a69970ba38edae9d3b2603825d18fbb732423
Signed-off-by: Werner Koch <wk@gnupg.org>
9 months agobuild: Change SWDB tag "gnupg21" to "gnupg22".
Werner Koch [Wed, 23 Aug 2017 12:50:03 +0000 (14:50 +0200)]
build: Change SWDB tag "gnupg21" to "gnupg22".

* configure.ac (GNUPG_SWDB_TAG): New ac_define.  Set it to "gnupg22".
* tools/gpgconf.c (query_swdb): Use it.
* build-aux/speedo.mk: Change tag "gnupg21" to "gnupg22".
* Makefile.am (distcheck-hook): Ditto.

Signed-off-by: Werner Koch <wk@gnupg.org>
9 months agopo: Update Norwegian translation
Åka Sikrom [Wed, 23 Aug 2017 12:19:01 +0000 (14:19 +0200)]
po: Update Norwegian translation

Signed-off-by: Werner Koch <wk@gnupg.org>
9 months agoagent: Fix string translation for Windows
Andre Heinecke [Wed, 23 Aug 2017 09:02:28 +0000 (11:02 +0200)]
agent: Fix string translation for Windows

* agent/agent.h (L_): Define agent_Lunderscore when simple
gettext is used.

--
This fixes a regression introduced by b3286af3 ENABLE_NLS
is not defined if we use simple gettext and not gettext.

GnuPG-Bug-Id: T3364
Signed-off-by: Andre Heinecke <aheinecke@intevation.de>
9 months agopo: Update Japanese translation
NIIBE Yutaka [Tue, 22 Aug 2017 02:24:31 +0000 (11:24 +0900)]
po: Update Japanese translation

9 months agotests: Add tests for the PGP trust model.
Damien Goutte-Gattat [Wed, 19 Jul 2017 20:17:29 +0000 (22:17 +0200)]
tests: Add tests for the PGP trust model.

* tests/openpgp/trust-pgp-1.scm: New file.
* tests/openpgp/trust-pgp-2.scm: New file.
* tests/openpgp/trust-pgp-3.scm: New file.
* tests/openpgp/trust-pgp-4.scm: New file.
* tests/openpgp/trust-pgp/common.scm: New file.
* tests/openpgp/trust-pgp/scenario1.asc: New file.
* tests/openpgp/trust-pgp/scenario2.asc: New file.
* tests/openpgp/trust-pgp/scenario3.asc: New file.
* tests/openpgp/trust-pgp/scenario4.asc: New file.
* tests/openpgp/trust-pgp/alice.sec.asc: New file.
* tests/openpgp/trust-pgp/bobby.sec.asc: New file.
* tests/openpgp/trust-pgp/carol.sec.asc: New file.
* tests/openpgp/trust-pgp/david.sec.asc: New file.
* tests/openpgp/trust-pgp/frank.sec.asc: New file.
* tests/openpgp/trust-pgp/grace.sec.asc: New file.
* tests/openpgp/trust-pgp/heidi.sec.asc: New file.
* tests/openpgp/Makefile.am (XTESTS): Add new tests.
(TEST_FILES): Add new files.
(EXTRA_DIST): Add new common file.

Signed-off-by: Damien Goutte-Gattat <dgouttegattat@incenp.org>
9 months agotests: Move some functions into a common module.
Damien Goutte-Gattat [Wed, 19 Jul 2017 20:17:28 +0000 (22:17 +0200)]
tests: Move some functions into a common module.

* tests/openpgp/tofu.scm (gettrust): Moved to the common defs.scm
module.
(checktrust): Likewise.
* tests/openpgp/defs.scm (gettrust): New function.
(checktrust): Likewise.
--

These functions will be re-used by the tests for the PGP trust
model.

Signed-off-by: Damien Goutte-Gattat <dgouttegattat@incenp.org>
9 months agogpgconf: Make WoT settings configurable by gpgconf.
Damien Goutte-Gattat [Mon, 21 Aug 2017 14:48:11 +0000 (16:48 +0200)]
gpgconf: Make WoT settings configurable by gpgconf.

* tools/gpgconf-comp.c (gc_options_gpg): Add max-cert-depth,
completes-needed, and marginals-needed options.
* g10/gpg.c (gpgconf_list): Likewise.
--

Some tests to come for the PGP trust model will need to manipulate
these parameters.

Signed-off-by: Damien Goutte-Gattat <dgouttegattat@incenp.org>
9 months agogpgscm: Fix -Wimplicit-fallthrough warnings.
Justus Winter [Mon, 21 Aug 2017 12:49:29 +0000 (14:49 +0200)]
gpgscm: Fix -Wimplicit-fallthrough warnings.

* tests/gpgscm/scheme.c (CASE): Rearrange so that the case statement
is at the front.
(Eval_Cycle): Improve fallthrough annotations.

Signed-off-by: Justus Winter <justus@g10code.com>
10 months agogpg: default to --no-auto-key-retrieve.
Daniel Kahn Gillmor [Fri, 11 Aug 2017 06:26:52 +0000 (02:26 -0400)]
gpg: default to --no-auto-key-retrieve.

* g10/gpg.c (main): remove KEYSERVER_AUTO_KEY_RETRIEVE from the
default keyserver options.
* doc/gpg.texi: document this change.
--

This is a partial reversion of
7e1fe791d188b078398bf83c9af992cb1bd2a4b3.  Werner and i discussed it
earlier today, and came to the conclusion that:

 * the risk of metadata leakage represented by a default
   --auto-key-retrieve, both in e-mail (as a "web bug") and in other
   contexts where GnuPG is used to verified signatures, is quite high.

 * the advantages of --auto-key-retrieve (in terms of signature
   verification) can sometimes be achieved in other ways, such as when
   a signed message includes a copy of its own key.

 * when those other ways are not useful, a graphical, user-facing
   application can still offer the user the opportunity to choose to
   fetch the key; or it can apply its own policy about when to set
   --auto-key-retrieve, without needing to affect the defaults.

Note that --auto-key-retrieve is specifically about signature
verification.  Decisions about how and whether to look up a key during
message encryption are governed by --auto-key-locate.  This change
does not touch the --auto-key-locate default of "local,wkd".  The user
deliberately asking gpg to encrypt to an e-mail address is a different
scenario than having an incoming e-mail trigger a potentially unique
network request.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
10 months agopo: Update Russian translation
Ineiev [Sat, 5 Aug 2017 12:27:44 +0000 (12:27 +0000)]
po: Update Russian translation

--

There was a small merge conflict.  I hope I did not mess it up. -wk

10 months agotests: Improve documentation.
Justus Winter [Thu, 10 Aug 2017 10:04:43 +0000 (12:04 +0200)]
tests: Improve documentation.

* tests/openpgp/README: Add quickstart instructions, how to use
shell.scm, remove no longer used MKDATA.

Signed-off-by: Justus Winter <justus@g10code.com>
10 months agog10: Write status error on error of --quick-revoke-uid.
Marcus Brinkmann [Wed, 9 Aug 2017 16:35:56 +0000 (18:35 +0200)]
g10: Write status error on error of --quick-revoke-uid.

* g10/keyedit.c (keyedit_quick_revuid): Write status error on error.

Signed-off-by: Marcus Brinkmann <mb@g10code.com>
GnuPG-bug-id: 2963

10 months agoPost release updates gnupg-2.2-base
Werner Koch [Wed, 9 Aug 2017 14:58:47 +0000 (16:58 +0200)]
Post release updates

--

10 months agoRelease 2.1.23 gnupg-2.1.23
Werner Koch [Wed, 9 Aug 2017 13:52:48 +0000 (15:52 +0200)]
Release 2.1.23

Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agopo: Auto-update
Werner Koch [Wed, 9 Aug 2017 13:45:40 +0000 (15:45 +0200)]
po: Auto-update

--

10 months agopo: Update German translation
Werner Koch [Wed, 9 Aug 2017 10:50:44 +0000 (12:50 +0200)]
po: Update German translation

10 months agobuild: New configure option --enable-all-tests.
Werner Koch [Tue, 8 Aug 2017 15:28:25 +0000 (17:28 +0200)]
build: New configure option --enable-all-tests.

* configure.ac: New option --enable-all-tests.
* tests/gpgscm/ffi.c (ffi_init): New gloabl var *run-all-tests*.
* tests/openpgp/all-tests.scm (all-tests): Use that var instead
of *maintainer-mode*.
* Makefile.am (AM_DISTCHECK_CONFIGURE_FLAGS): Add --enable-all-tests.
--

It is better to have a separate option to run all tests than to put
this on top of --enable-maintainer-mode.  This way we can also make
sure to run all tests during "make distcheck".

Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agogpgscm: Make the test summary stand out
Werner Koch [Tue, 8 Aug 2017 11:47:00 +0000 (13:47 +0200)]
gpgscm: Make the test summary stand out

* tests/gpgscm/tests.scm (test-pool): Add delimiter lines.
--

This is to make those summaries a bit more simlar to those from
automake.

Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agosm: Always print the keygrip in colon mode.
Werner Koch [Tue, 8 Aug 2017 11:04:12 +0000 (13:04 +0200)]
sm: Always print the keygrip in colon mode.

* sm/keylist.c (list_cert_colon): Always print the keygrip as
described in the manual.

Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agogpg: Add option '--disable-dirmngr'.
Justus Winter [Tue, 8 Aug 2017 09:43:22 +0000 (11:43 +0200)]
gpg: Add option '--disable-dirmngr'.

* doc/gpg.texi: Document new option.
* g10/call-dirmngr.c (create_context): Fail if option is given.
* g10/gpg.c (cmd_and_opt_values): New value.
(opts): New option.
(gpgconf_list): Add new option.
(main): Handle new option.
* g10/options.h (struct opt): New field 'disable_dirmngr'.
* tools/gpgconf-comp.c (gc_options_gpg): New option.

GnuPG-bug-id: 3334
Signed-off-by: Justus Winter <justus@g10code.com>
10 months agosystemd-user: Drop redundant After=*.socket.
Daniel Kahn Gillmor [Mon, 7 Aug 2017 08:14:02 +0000 (04:14 -0400)]
systemd-user: Drop redundant After=*.socket.

* doc/examples/systemd-user/*.service: Drop redundant After=*.socket
directive.

--

systemd.socket(5) says:

   Socket units will have a Before= dependency on the service which
   they trigger added implicitly.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
10 months agosystemd-user: Drop RefuseManualStart=true.
Daniel Kahn Gillmor [Mon, 7 Aug 2017 08:11:51 +0000 (04:11 -0400)]
systemd-user: Drop RefuseManualStart=true.

* doc/examples/systemd-user/*.service: drop RefuseManualStart=true

--

These user services can be safely started manually as long as at least
their primary sockets are available.  They'll just start with nothing
to do, which should be fine.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
10 months agotests: Do not run all tests unless in maintainer mode.
Justus Winter [Mon, 7 Aug 2017 09:15:56 +0000 (11:15 +0200)]
tests: Do not run all tests unless in maintainer mode.

* configure.ac: Leak the maintainer mode flag into 'config.h'.
* tests/gpgscm/ffi.c: Pass it into the scheme environment.
* tests/openpgp/all-tests.scm: Only run tests against non-default
configurations (keyring, extended-key-format) in maintainer mode.
--

Werner is concerned that the tests do take up too much time and asked
me to reduce the runtime of the tests for normal users.

Signed-off-by: Justus Winter <justus@g10code.com>
10 months agoFix spelling.
Daniel Kahn Gillmor [Mon, 7 Aug 2017 07:34:03 +0000 (03:34 -0400)]
Fix spelling.

* doc/gpg.texi: s/occured/occurred/

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
10 months agoSimple typo fix.
Daniel Kahn Gillmor [Mon, 7 Aug 2017 05:03:52 +0000 (01:03 -0400)]
Simple typo fix.

* agent/gpg-agent.c: Correct spelling in comment.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
10 months agogpg: Install gpg by default under the name gpg.
Werner Koch [Sat, 5 Aug 2017 12:39:32 +0000 (14:39 +0200)]
gpg: Install gpg by default under the name gpg.

* configure.ac: Remove option --enable-gpg2-is-gpg.  Add option
--enable-gpg-is-gpg2.
* build-aux/speedo.mk (speedo_pkg_gnupg_configure): Remove
--enable-gpg2-is-gpg.
--

Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agogpg: gpgconf needs to support the now default --auto-key-retrieve.
Werner Koch [Sat, 5 Aug 2017 12:26:22 +0000 (14:26 +0200)]
gpg: gpgconf needs to support the now default --auto-key-retrieve.

* tools/gpgconf-comp.c (gc_options_gpg): Re-add "auto-key_retrieve".
--

Although this option is invisible, it might be in use by gpgconf
profiles.  We don't want to break them.

Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agogpg: Fix memory leak in parse_auto_key_locate.
Werner Koch [Fri, 4 Aug 2017 20:46:40 +0000 (22:46 +0200)]
gpg: Fix memory leak in parse_auto_key_locate.

* g10/getkey.c (parse_auto_key_locate): Fix freeing of OPTIONS.
--

It was probably too late for me to hack.

Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agotests: Adjust tests for changed --auto-key-locate default.
Werner Koch [Fri, 4 Aug 2017 20:28:13 +0000 (22:28 +0200)]
tests: Adjust tests for changed --auto-key-locate default.

* tests/openpgp/defs.scm (create-gpghome): Disable new defaults.

Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agogpg: Make --no-auto-key-retrieve gpgconf-igurable.
Werner Koch [Fri, 4 Aug 2017 20:19:37 +0000 (22:19 +0200)]
gpg: Make --no-auto-key-retrieve gpgconf-igurable.

* g10/gpg.c (gpgconf_list): Print no-auto-key-retrieve instead of
auto-key-retrieve.
* tools/gpgconf-comp.c (gc_options_gpg): Replace auto-key-retrieve by
no-auto-key-retrieve and chnage level from invisible to advanced.

Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agogpg: Default to --auto-key-locate "local,wkd" and --auto-key-retrieve.
Werner Koch [Fri, 4 Aug 2017 19:58:46 +0000 (21:58 +0200)]
gpg: Default to --auto-key-locate "local,wkd" and --auto-key-retrieve.

* g10/gpg.c (main): Add KEYSERVER_AUTO_KEY_RETRIEVE to the default
keyserver options.  Set the default for --auto-key-locate to
"local,wkd".  Reset that default iff --auto-key-locate has been given
in the option file or in the commandline.
* g10/getkey.c (parse_auto_key_locate): Work on a copy of the arg.
--

GnuPG-bug-id: 3324
Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agoagent: Make --no-grab the default.
Werner Koch [Fri, 4 Aug 2017 16:34:03 +0000 (18:34 +0200)]
agent: Make --no-grab the default.

* agent/gpg-agent.c (oGrab): New const.
(opts): New option --grab.  Remove description for --no-grab.
(parse_rereadable_options): Make --no-grab the default.
(finalize_rereadable_options): Allow --grab to override --no-grab.
(main) <gpgconflist>: Add "grab".
* tools/gpgconf-comp.c (gc_options_gpg_agent): Add "grab".

Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agogpg: Avoid double fingerprint printing with import-show.
Werner Koch [Fri, 4 Aug 2017 15:09:17 +0000 (17:09 +0200)]
gpg: Avoid double fingerprint printing with import-show.

* g10/import.c (import_one) <IMPORT_SHOW>: Take care of fingerprint
options.

Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agogpg: New import option show-only.
Werner Koch [Fri, 4 Aug 2017 15:03:03 +0000 (17:03 +0200)]
gpg: New import option show-only.

* g10/options.h (IMPORT_DRY_RUN): New.
* g10/import.c (parse_import_options): Add "show-only".
(import_one): use that as alternative to opt.dry_run.
--

This is just a convenience thing for

  --import-options import-show --dry-run

Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agowks: Allow gpg-wks-client --supported with just the domain name
Werner Koch [Thu, 3 Aug 2017 19:16:22 +0000 (21:16 +0200)]
wks: Allow gpg-wks-client --supported with just the domain name

* tools/gpg-wks-client.c (command_supported): Hack for missing local
part.

Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agog10: Always save standard revocation certificate in file.
Marcus Brinkmann [Wed, 2 Aug 2017 13:19:04 +0000 (15:19 +0200)]
g10: Always save standard revocation certificate in file.

* g10/revoke.c (gen_standard_revocation): Set opt.outfile to NULL
temporarily to create certificate in right place.

Signed-off-by: Marcus Brinkmann <mb@g10code.com>
GnuPG-bug-id: 3015

10 months agoRevert "g10: Always save standard revocation certificate in file."
Marcus Brinkmann [Tue, 1 Aug 2017 17:08:16 +0000 (19:08 +0200)]
Revert "g10: Always save standard revocation certificate in file."

This reverts commit ebc65ff459e6c228fb7406e375819a9fe5637abe.

10 months agog10: Always save standard revocation certificate in file.
Marcus Brinkmann [Tue, 1 Aug 2017 15:41:03 +0000 (17:41 +0200)]
g10: Always save standard revocation certificate in file.

* g10/main.h (open_outfile): New parameter NO_OUTFILE.
* g10/openfile.c (open_outfile): New parameter NO_OUTFILE.  If given,
never use opt.outfile.
* g10/revoke.c (create_revocation): If FILENAME is true, also set
NO_OUTFILE to true (for standard revocation certificates).
* g10/dearmor.c, g10/encrypt.c, g10/export.c, g10/revoke.c,
g10/sign.c: Adjust all other callers.

Signed-off-by: Marcus Brinkmann <mb@g10code.com>
GnuPG-bug-id: 3015

10 months agoartwork: Add icons.
Marcus Brinkmann [Tue, 1 Aug 2017 14:28:23 +0000 (16:28 +0200)]
artwork: Add icons.

* artwork/icons/index.css: New file.
* artwork/icons/index.html: New file.
* artwork/icons/lock-12.png: New file.
* artwork/icons/lock-128.png: New file.
* artwork/icons/lock-16.png: New file.
* artwork/icons/lock-24.png: New file.
* artwork/icons/lock-256.png: New file.
* artwork/icons/lock-32.png: New file.
* artwork/icons/lock-48.png: New file.
* artwork/icons/lock-64.png: New file.
* artwork/icons/lock-wing-12.png: New file.
* artwork/icons/lock-wing-128.png: New file.
* artwork/icons/lock-wing-16.png: New file.
* artwork/icons/lock-wing-24.png: New file.
* artwork/icons/lock-wing-256.png: New file.
* artwork/icons/lock-wing-32.png: New file.
* artwork/icons/lock-wing-48.png: New file.
* artwork/icons/lock-wing-64.png: New file.
* artwork/icons/lock-wing.svg: New file.
* artwork/icons/lock.svg: New file.
* artwork/icons/wing-12.png: New file.
* artwork/icons/wing-128.png: New file.
* artwork/icons/wing-16.png: New file.
* artwork/icons/wing-24.png: New file.
* artwork/icons/wing-256.png: New file.
* artwork/icons/wing-32.png: New file.
* artwork/icons/wing-48.png: New file.
* artwork/icons/wing-64.png: New file.
* artwork/icons/wing.svg: New file.

Signed-off-by: Marcus Brinkmann <mb@g10code.com>
GnuPG-bug-id: 3019

10 months agogpg,sm: Error out on compliance mismatch while decrypting.
Werner Koch [Tue, 1 Aug 2017 06:41:47 +0000 (08:41 +0200)]
gpg,sm: Error out on compliance mismatch while decrypting.

* g10/pubkey-enc.c (get_session_key): Bail out if the algo is not
allowed in the current compliance mode.
* sm/decrypt.c (gpgsm_decrypt): Ditto.
--

The idea here is that the owner of the key created a non-compliant key
and later receives a mail encrypted to that key.  The sender should
have checked this key too but we can't guarantee that.  By hard
failing here the owner of the key will notice that he had created a
non-compliant key and thus has a chance to generate a new compliant
key.  In case the compliant criteria changes and the owner wants to
decrypt an old message he can still switch gpg to another compliant
mode.

Fixes-commit: a0d0cbee7654ad7582400efaa92d493cd8e669e9
GnuPG-bug-id: 3308
Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agoindent: Wrap overlong lines in argparse.c
Werner Koch [Tue, 1 Aug 2017 06:28:01 +0000 (08:28 +0200)]
indent: Wrap overlong lines in argparse.c

--

10 months agoSimple typo fix.
NIIBE Yutaka [Tue, 1 Aug 2017 02:44:52 +0000 (11:44 +0900)]
Simple typo fix.

* tools/rfc822parse.c: Fix.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
10 months agopo: Update Japanese translation
NIIBE Yutaka [Tue, 1 Aug 2017 02:43:56 +0000 (11:43 +0900)]
po: Update Japanese translation

10 months agodirmngr,w32: Fix http connection timeout problem.
Werner Koch [Mon, 31 Jul 2017 11:12:37 +0000 (13:12 +0200)]
dirmngr,w32: Fix http connection timeout problem.

* dirmngr/http.c (connect_with_timeout) [W32]: Take care of EAGAIN.
--

GnuPG-bug-id: 3319
Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agoExplain the "server is older than xxx warning".
Werner Koch [Mon, 31 Jul 2017 09:20:47 +0000 (11:20 +0200)]
Explain the "server is older than xxx warning".

* g10/call-agent.c (warn_version_mismatch): Print a note on how to
restart the servers.
* g10/call-dirmngr.c (warn_version_mismatch): Ditto.
* sm/call-agent.c (warn_version_mismatch): Ditto.
* sm/call-dirmngr.c (warn_version_mismatch): Ditto.
--

We should move this fucntion to common.  However, the status output
functions are different and would need to be streamlined too.

GnuPG-bug-id: 3117
Debian-bug-id: 860745
Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agoPost release updates
Werner Koch [Fri, 28 Jul 2017 18:10:16 +0000 (20:10 +0200)]
Post release updates

--

10 months agoRelease 2.1.22 gnupg-2.1.22
Werner Koch [Fri, 28 Jul 2017 16:59:04 +0000 (18:59 +0200)]
Release 2.1.22

10 months agopo: Auto-update
Werner Koch [Fri, 28 Jul 2017 16:55:14 +0000 (18:55 +0200)]
po: Auto-update

--

10 months agopo: Update German translation
Werner Koch [Fri, 28 Jul 2017 16:51:27 +0000 (18:51 +0200)]
po: Update German translation

10 months agoagent: Make --ssh-fingerprint-digest re-readable.
Werner Koch [Fri, 28 Jul 2017 16:23:34 +0000 (18:23 +0200)]
agent: Make --ssh-fingerprint-digest re-readable.

* agent/gpg-agent.c (main): Move oSSHFingerprintDigest to ...
(parse_rereadable_options): here.
(opts): Change its description.
(main) <aGPGConfList>: Include this option.
* tools/gpgconf-comp.c (gc_options_gpg_agent): Add option at expert
level.

Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agogpg,sm: String changes for compliance diagnostics.
Werner Koch [Fri, 28 Jul 2017 15:46:43 +0000 (17:46 +0200)]
gpg,sm: String changes for compliance diagnostics.

Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agoagent: For OCB key files return Bad Passprase instead of Checksum Error.
Werner Koch [Fri, 28 Jul 2017 09:40:56 +0000 (11:40 +0200)]
agent: For OCB key files return Bad Passprase instead of Checksum Error.

* agent/protect.c (do_decryption): Map error checksum to bad
passpharse protection

* agent/call-pinentry.c (unlock_pinentry): Don't munge the error
source for corrupted protection.
--

GnuPG-bug-id: 3266
Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agogpg: Minor rework for better readibility of get_best_pubkey_byname.
Werner Koch [Fri, 28 Jul 2017 09:08:32 +0000 (11:08 +0200)]
gpg: Minor rework for better readibility of get_best_pubkey_byname.

* g10/getkey.c (get_best_pubkey_byname): Change return type to
gpg_error_t.  Use var name err instead of rc.  Move a
gpg_error_from_syserror closer to the call.
--

Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agogpg: Fix segv in get_best_pubkey_byname.
Werner Koch [Fri, 28 Jul 2017 08:58:59 +0000 (10:58 +0200)]
gpg: Fix segv in get_best_pubkey_byname.

* g10/getkey.c (get_best_pubkey_byname): Init NEW.
--

We call free_user_id on NEW.uid and thus it needs to be initialized.

This fixes the ref-count or invisible segv bug from
GnuPG-bug-id: 3266

Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agoagent: Minor cleanup (mostly for documentation).
Werner Koch [Fri, 28 Jul 2017 08:37:33 +0000 (10:37 +0200)]
agent: Minor cleanup (mostly for documentation).

* agent/command.c (cmd_pksign): Change var name 'rc' to 'err'.
* agent/findkey.c (read_key_file): Ditto.  Change return type to
gpg_error_t.  On es_fessk failure return a correct error code.
(agent_key_from_file): Change var name 'rc' to 'err'.
* agent/pksign.c (agent_pksign_do): Ditto.  Change return type to
gpg_error_t.  Return a valid erro code on malloc failure.
(agent_pksign): Ditto.  Change return type to gpg_error_t.  replace
xmalloc by xtrymalloc.
* agent/protect.c (calculate_mic): Change return type to gpg_error_t.
(do_decryption): Ditto.  Do not init RC.
(merge_lists): Change return type to gpg_error_t.
(agent_unprotect): Ditto.
(agent_get_shadow_info): Ditto.
--

While code starring for bug 3266 I found two glitches and also changed
var name for easier reading.

Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agogpg: Tweak compliance checking for verification
Werner Koch [Thu, 27 Jul 2017 14:22:36 +0000 (16:22 +0200)]
gpg: Tweak compliance checking for verification

* common/compliance.c (gnupg_pk_is_allowed): Rework to always allow
verification.
* g10/mainproc.c (check_sig_and_print): Print a con-compliant warning.
* g10/sig-check.c (check_signature2): Use log_error instead of
log_info.
--

We should be able to verify all signatures.  So we only print a
warning.  That is the same beheavour as for untrusted keys etc.

GnuPG-bug-id: 3311
Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agogpg,sm: Allow encryption (with warning) to any key in de-vs mode.
Werner Koch [Thu, 27 Jul 2017 12:54:50 +0000 (14:54 +0200)]
gpg,sm: Allow encryption (with warning) to any key in de-vs mode.

* g10/encrypt.c (encrypt_crypt): Do not abort for a non-compliant key.
* sm/encrypt.c (gpgsm_encrypt): Ditto.
--

GnuPG-bug-id: 3306
Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agogpg,sm: Fix compliance checking for decryption.
Werner Koch [Thu, 27 Jul 2017 11:56:38 +0000 (13:56 +0200)]
gpg,sm: Fix compliance checking for decryption.

* common/compliance.c (gnupg_pk_is_compliant): Remove the Elgamal
signing check.  We don't support Elgamal signing at all.
(gnupg_pk_is_allowed) <de-vs>: Revert encryption/decryption for RSA.
Check the curvenames for ECDH.
* g10/pubkey-enc.c (get_session_key): Print only a warning if the key
is not compliant.
* sm/decrypt.c (gpgsm_decrypt): Ditto.  Use the same string as in gpg
so that we have only one translation.
--

We always allow decryption and print only a note if the key was not
complaint at the encryption site.

GnuPG-bug-id: 3308
Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agoindent: Wrap an overlong line.
Werner Koch [Thu, 27 Jul 2017 09:41:40 +0000 (11:41 +0200)]
indent: Wrap an overlong line.

--

Folks, please set your editors to 80 columns to notice such flaws.

10 months agogpg: Avoid output to the tty during import.
Werner Koch [Thu, 27 Jul 2017 09:37:00 +0000 (11:37 +0200)]
gpg: Avoid output to the tty during import.

* g10/key-check.c (key_check_all_keysigs): Add arg mode and change all
output calls to use it.
* g10/keyedit.c (keyedit_print_one_sig): Add arg fp and chnage all
output calls to use it.
(keyedit_menu): Adjust for changes.
* g10/gpgcompose.c (keyedit_print_one_sig): Add dummy arg fp.
* g10/import.c (import_one): Call key_check_all_keysigs with output to
the log stream.
--

Fixes-commit: 404fa8211b6188a0abe83ef43a4b44d528c0b035
GnuPG-bug-id: 3288
Signed-off-by: Werner Koch <wk@gnupg.org>
10 months agog10: Make sure exactly one fingerprint is output with --quick-gen-key.
Marcus Brinkmann [Wed, 26 Jul 2017 16:06:29 +0000 (18:06 +0200)]
g10: Make sure exactly one fingerprint is output with --quick-gen-key.

* g10/keygen.c (do_generate_keypair): Only set fpr in
list_keyblock_direct invocation if neither --fingerprint nor
--with-fingerprints are given.

Signed-off-by: Marcus Brinkmann <mb@g10code.com>
GnuPG-bug-id: 2741

10 months agodoc: Add man pages form gpg-wks-server and gpg-wks-client.
Werner Koch [Wed, 26 Jul 2017 15:51:03 +0000 (17:51 +0200)]
doc: Add man pages form gpg-wks-server and gpg-wks-client.

* doc/wks.texi: New.
* doc/gnupg.texi: Include wks.texi.
* doc/Makefile.am (gnupg_TEXINFOS): Add wks.texi.
(myman_pages): Add new man pages.

Signed-off-by: Werner Koch <wk@gnupg.org>