From 281b955b43e5aea756d8757ddc92f4fbb68e15a6 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Thu, 21 Feb 2002 20:42:27 +0000 Subject: Added gnutls_alert_str (allows printing alert number descriptions) --- src/cli.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/cli.c') diff --git a/src/cli.c b/src/cli.c index 83c5de8012..18bf464c84 100644 --- a/src/cli.c +++ b/src/cli.c @@ -121,7 +121,7 @@ int main(int argc, char **argv) char buffer[MAX_BUF + 1]; char *session; char *session_id; - int session_size; + int session_size, alert; int session_id_size; char *tmp_session_id; int tmp_session_id_size; @@ -269,8 +269,9 @@ int main(int argc, char **argv) if (ret < 0) { if (ret == GNUTLS_E_WARNING_ALERT_RECEIVED || ret == GNUTLS_E_FATAL_ALERT_RECEIVED) - printf("*** Received alert [%d]\n", - gnutls_alert_get_last(state)); + alert = gnutls_alert_get_last( state); + printf("*** Received alert [%d]: %s\n", + alert, gnutls_alert_str( alert)); fprintf(stderr, "*** Handshake has failed\n"); gnutls_perror(ret); -- cgit v1.2.1