mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
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 e7abed3448
)
Resolved conflicts:
g10/options.h
This commit is contained in:
parent
fe0fb5e6b0
commit
d74dd36c11
3 changed files with 20 additions and 8 deletions
|
@ -30,7 +30,7 @@
|
|||
#if defined (__riscos__) && !defined (INCLUDED_BY_MAIN_MODULE)
|
||||
#define EXTERN_UNLESS_MAIN_MODULE extern
|
||||
#else
|
||||
#define EXTERN_UNLESS_MAIN_MODULE
|
||||
#define EXTERN_UNLESS_MAIN_MODULE
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -86,7 +86,7 @@ struct
|
|||
const char *homedir;
|
||||
|
||||
char *display; /* 5 options to be passed to the gpg-agent */
|
||||
char *ttyname;
|
||||
char *ttyname;
|
||||
char *ttytype;
|
||||
char *lc_ctype;
|
||||
char *lc_messages;
|
||||
|
@ -208,7 +208,7 @@ struct
|
|||
|
||||
/* If > 0, limit the number of card insertion prompts to this
|
||||
value. */
|
||||
int limit_card_insert_tries;
|
||||
int limit_card_insert_tries;
|
||||
|
||||
#ifdef ENABLE_CARD_SUPPORT
|
||||
const char *ctapi_driver; /* Library to access the ctAPI. */
|
||||
|
@ -293,6 +293,7 @@ struct {
|
|||
#define IMPORT_MERGE_ONLY (1<<4)
|
||||
#define IMPORT_MINIMAL (1<<5)
|
||||
#define IMPORT_CLEAN (1<<6)
|
||||
#define IMPORT_NO_SECKEY (1<<7)
|
||||
|
||||
#define EXPORT_LOCAL_SIGS (1<<0)
|
||||
#define EXPORT_ATTRIBUTES (1<<1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue