diff options
author | Werner Koch <[email protected]> | 2020-08-27 07:02:21 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2020-08-27 07:02:21 +0000 |
commit | 05358d73841149f64dc5d620f4b8855255e7f4da (patch) | |
tree | dc53678f9cb3feb4d1c15092a78e4ca7685a9e25 /dirmngr/http.c | |
parent | scd: Add heuristics to identify cardtype. (diff) | |
download | gnupg-05358d73841149f64dc5d620f4b8855255e7f4da.tar.gz gnupg-05358d73841149f64dc5d620f4b8855255e7f4da.zip |
dirmngr: Print the last alert message returned by NTBTLS.
* dirmngr/http.c (send_request): Print the last TLS alert.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'dirmngr/http.c')
-rw-r--r-- | dirmngr/http.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/dirmngr/http.c b/dirmngr/http.c index 50b9b732b..f3d98e14b 100644 --- a/dirmngr/http.c +++ b/dirmngr/http.c @@ -2056,6 +2056,14 @@ send_request (ctrl_t ctrl, http_t hd, const char *httphost, const char *auth, while ((err = ntbtls_handshake (hd->session->tls_session))) { +#if NTBTLS_VERSION_NUMBER >= 0x000200 + unsigned int tlevel, ttype; + const char *s = ntbtls_get_last_alert (hd->session->tls_session, + &tlevel, &ttype); + if (s) + log_info ("TLS alert: %s (%u.%u)\n", s, tlevel, ttype); +#endif + switch (err) { default: |