mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-21 14:47:03 +01:00
dirmngr: Only report hkps scheme when available
* dirmngr/ks-engine-hkp.c (ks_hkp_help): Make use of TLS macros. -- Only report support for the hkps scheme when GnuPG / dirmngr has been built with a TLS library. This helps debuging and enable the user to detect whether support for hkps is included by doing a `gpg-connect-agent --dirmngr 'keyserver --help' /bye`. Currently hkps will be listed as a supported scheme but trying to add a keyserver using it will silently fail. As a digression, https is never listed as a valid scheme.
This commit is contained in:
parent
1c2140346d
commit
68a7ccc0c8
@ -767,12 +767,20 @@ ks_hkp_help (ctrl_t ctrl, parsed_uri_t uri)
|
||||
const char const data[] =
|
||||
"Handler for HKP URLs:\n"
|
||||
" hkp://\n"
|
||||
#if HTTP_USE_GNUTLS || HTTP_USE_NTBTLS
|
||||
" hkps://\n"
|
||||
#endif
|
||||
"Supported methods: search, get, put\n";
|
||||
gpg_error_t err;
|
||||
|
||||
#if HTTP_USE_GNUTLS || HTTP_USE_NTBTLS
|
||||
const char data2[] = " hkp\n hkps";
|
||||
#else
|
||||
const char data2[] = " hkp";
|
||||
#endif
|
||||
|
||||
if (!uri)
|
||||
err = ks_print_help (ctrl, " hkp\n hkps");
|
||||
err = ks_print_help (ctrl, data2);
|
||||
else if (uri->is_http && (!strcmp (uri->scheme, "hkp")
|
||||
|| !strcmp (uri->scheme, "hkps")))
|
||||
err = ks_print_help (ctrl, data);
|
||||
|
Loading…
x
Reference in New Issue
Block a user