mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
dirmngr: Use a default keyserver if none is explicitly set
* configure.ac: Define DIRMNGR_DEFAULT_KEYSERVER. * dirmngr/server.c (ensure_keyserver): Use it if no keyservers are set. * doc/dirmngr.texi: Document this behavior. -- A user who doesn't specify a keyserver, but asks gnupg to fetch a key currently just gets a simple error messages "No keyserver available". If the user is asking to contact a keyserver, we should have a reasonable default, and not require them to fiddle with settings when they might not know what settings to choose. This patch makes the default hkps://hkps.pool.sks-keyservers.net. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
This commit is contained in:
parent
7c1613d415
commit
8fb4822524
@ -1764,6 +1764,9 @@ AC_DEFINE_UNQUOTED(SCDAEMON_SOCK_NAME, "S.scdaemon",
|
||||
[The name of the SCdaemon socket])
|
||||
AC_DEFINE_UNQUOTED(DIRMNGR_SOCK_NAME, "S.dirmngr",
|
||||
[The name of the dirmngr socket])
|
||||
AC_DEFINE_UNQUOTED(DIRMNGR_DEFAULT_KEYSERVER,
|
||||
"hkps://hkps.pool.sks-keyservers.net",
|
||||
[The default keyserver for dirmngr to use, if none is explicitly given])
|
||||
|
||||
AC_DEFINE_UNQUOTED(GPGEXT_GPG, "gpg", [The standard binary file suffix])
|
||||
|
||||
|
@ -1810,7 +1810,11 @@ ensure_keyserver (ctrl_t ctrl)
|
||||
if (ctrl->server_local->keyservers)
|
||||
return 0; /* Already set for this session. */
|
||||
if (!opt.keyserver)
|
||||
return 0; /* No global option set. */
|
||||
{
|
||||
/* No global option set. Fall back to default: */
|
||||
return make_keyserver_item (DIRMNGR_DEFAULT_KEYSERVER,
|
||||
&ctrl->server_local->keyservers);
|
||||
}
|
||||
|
||||
for (sl = opt.keyserver; sl; sl = sl->next)
|
||||
{
|
||||
|
@ -277,6 +277,8 @@ service (.onion), Dirmngr selects the keyserver to use depending on
|
||||
whether Tor is locally running or not. The check for a running Tor is
|
||||
done for each new connection.
|
||||
|
||||
If no keyserver is explicitly configured, dirmngr will use the
|
||||
built-in default of hkps://hkps.pool.sks-keyservers.net.
|
||||
|
||||
@item --nameserver @var{ipaddr}
|
||||
@opindex nameserver
|
||||
|
Loading…
x
Reference in New Issue
Block a user