gpg: Protect against rogue keyservers sending secret keys.
authorWerner Koch <wk@gnupg.org>
Fri, 4 Oct 2013 11:44:39 +0000 (13:44 +0200)
committerWerner Koch <wk@gnupg.org>
Fri, 4 Oct 2013 18:58:51 +0000 (20:58 +0200)
commitd74dd36c11f1643bd92efb50714e2448cdb885d0
tree4d595ce20884023247e04aad5a29d63d990b4adf
parentfe0fb5e6b0bb351eb6244e290e112a22a68472d8
gpg: Protect against rogue keyservers sending secret keys.

* g10/options.h (IMPORT_NO_SECKEY): New.
* g10/keyserver.c (keyserver_spawn, keyserver_import_cert): Set new
flag.
* g10/import.c (import_secret_one): Deny import if flag is set.
--

By modifying a keyserver or a DNS record to send a secret key, an
attacker could trick a user into signing using a different key and
user id.  The trust model should protect against such rogue keys but
we better make sure that secret keys are never received from remote
sources.

Suggested-by: Stefan Tomanek
Signed-off-by: Werner Koch <wk@gnupg.org>
(cherry picked from commit e7abed3448c1c1a4e756c12f95b665b517d22ebe)

Resolved conflicts:
g10/options.h
g10/import.c
g10/keyserver.c
g10/options.h