diff options
author | Werner Koch <[email protected]> | 2018-04-25 13:25:14 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2018-04-25 13:25:26 +0000 |
commit | bb8894760fe87cf46a42599f11eab7e7c7a8eb71 (patch) | |
tree | 9616c7a1d45178c59f8b7e1accf5d2212a3877e5 | |
parent | dirmngr: Allow redirection from https to http for CRLs (diff) | |
download | gnupg-bb8894760fe87cf46a42599f11eab7e7c7a8eb71.tar.gz gnupg-bb8894760fe87cf46a42599f11eab7e7c7a8eb71.zip |
dirmngr: Add the used TLS library to the debug output.
* dirmngr/http.c (send_request): Print the used TLS library in debug
mode.
--
We allow two different TLS libararies and thus it is useful to see
that in the debug output of bug reports.
Signed-off-by: Werner Koch <[email protected]>
-rw-r--r-- | dirmngr/http.c | 12 | ||||
-rw-r--r-- | doc/dirmngr.texi | 7 |
2 files changed, 15 insertions, 4 deletions
diff --git a/dirmngr/http.c b/dirmngr/http.c index 4624d5fe6..6846107d0 100644 --- a/dirmngr/http.c +++ b/dirmngr/http.c @@ -1736,9 +1736,19 @@ send_request (http_t hd, const char *httphost, const char *auth, #ifdef USE_TLS if (hd->uri->use_tls && !hd->session->tls_session) { - log_error ("TLS requested but no GNUTLS context available\n"); + log_error ("TLS requested but no TLS context available\n"); return gpg_err_make (default_errsource, GPG_ERR_INTERNAL); } + if (opt_debug) + log_debug ("Using TLS library: %s %s\n", +# if HTTP_USE_NTBTLS + "NTBTLS", ntbtls_check_version (NULL) +# elif HTTP_USE_GNUTLS + "GNUTLS", gnutls_check_version (NULL) +# else + "?", "?" +# endif /*HTTP_USE_*TLS*/ + ); #endif /*USE_TLS*/ if ((hd->flags & HTTP_FLAG_FORCE_TOR)) diff --git a/doc/dirmngr.texi b/doc/dirmngr.texi index 800955c52..76be5286c 100644 --- a/doc/dirmngr.texi +++ b/doc/dirmngr.texi @@ -208,9 +208,10 @@ flag names. To get a list of all supported flags the single word @opindex debug-all Same as @code{--debug=0xffffffff} -@item --gnutls-debug @var{level} -@opindex gnutls-debug -Enable debugging of GNUTLS at @var{level}. +@item --tls-debug @var{level} +@opindex tls-debug +Enable debugging of the TLS layer at @var{level}. The details of the +debug level depend on the used TLS library and are not set in stone. @item --debug-wait @var{n} @opindex debug-wait |