self-sigs-only.patch 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. From: Werner Koch <wk@gnupg.org>
  2. Date: Thu, 4 Jul 2019 13:45:39 +0000 (+0200)
  3. Subject: gpg: Add "self-sigs-only" and "import-clean" to the keyserver options.
  4. X-Git-Url: http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=commitdiff_plain;h=23c978640812d123eaffd4108744bdfcf48f7c93
  5. gpg: Add "self-sigs-only" and "import-clean" to the keyserver options.
  6. * g10/gpg.c (main): Change default.
  7. --
  8. Due to the DoS attack on the keyeservers we do not anymore default to
  9. import key signatures. That makes the keyserver unsuable for getting
  10. keys for the WoT but it still allows to retriev keys - even if that
  11. takes long to download the large keyblocks.
  12. To revert to the old behavior add
  13. keyserver-optiions no-self-sigs-only,no-import-clean
  14. to gpg.conf.
  15. GnuPG-bug-id: 4607
  16. Signed-off-by: Werner Koch <wk@gnupg.org>
  17. ---
  18. diff --git a/doc/gpg.texi b/doc/gpg.texi
  19. index 8feab8218..9513a4e0f 100644
  20. --- a/doc/gpg.texi
  21. +++ b/doc/gpg.texi
  22. @@ -1917,6 +1917,11 @@ are available for all keyserver types, some common options are:
  23. @end table
  24. +The default list of options is: "self-sigs-only, import-clean,
  25. +repair-keys, repair-pks-subkey-bug, export-attributes,
  26. +honor-pka-record".
  27. +
  28. +
  29. @item --completes-needed @var{n}
  30. @opindex compliant-needed
  31. Number of completely trusted users to introduce a new
  32. diff --git a/g10/gpg.c b/g10/gpg.c
  33. index 66e47dde5..0bbe72394 100644
  34. --- a/g10/gpg.c
  35. +++ b/g10/gpg.c
  36. @@ -2424,7 +2424,9 @@ main (int argc, char **argv)
  37. opt.import_options = IMPORT_REPAIR_KEYS;
  38. opt.export_options = EXPORT_ATTRIBUTES;
  39. opt.keyserver_options.import_options = (IMPORT_REPAIR_KEYS
  40. - | IMPORT_REPAIR_PKS_SUBKEY_BUG);
  41. + | IMPORT_REPAIR_PKS_SUBKEY_BUG
  42. + | IMPORT_SELF_SIGS_ONLY
  43. + | IMPORT_CLEAN);
  44. opt.keyserver_options.export_options = EXPORT_ATTRIBUTES;
  45. opt.keyserver_options.options = KEYSERVER_HONOR_PKA_RECORD;
  46. opt.verify_options = (LIST_SHOW_UID_VALIDITY