summaryrefslogtreecommitdiff
path: root/lib/auth/ecdhe.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2016-04-24 11:12:29 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2016-04-24 14:07:00 +0200
commite217552af91d641fdb2dd78939bd8baf8980d77d (patch)
tree26cdcb83219ad5152f5b6d24406741c69e67ecb3 /lib/auth/ecdhe.c
parent4d4a342b0577748d49dc1a36d4c507b378af9d62 (diff)
downloadgnutls-e217552af91d641fdb2dd78939bd8baf8980d77d.tar.gz
ecdhe: print the received curve from the server on debug mode
Diffstat (limited to 'lib/auth/ecdhe.c')
-rw-r--r--lib/auth/ecdhe.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/auth/ecdhe.c b/lib/auth/ecdhe.c
index bfd8000318..0cfcfd1467 100644
--- a/lib/auth/ecdhe.c
+++ b/lib/auth/ecdhe.c
@@ -289,6 +289,13 @@ _gnutls_proc_ecdh_common_server_kx(gnutls_session_t session,
DECR_LEN(data_size, 2);
curve = _gnutls_tls_id_to_ecc_curve(_gnutls_read_uint16(&data[i]));
+
+ if (curve == GNUTLS_ECC_CURVE_INVALID) {
+ _gnutls_debug_log("received curve %u.%u\n", (unsigned)data[i], (unsigned)data[i+1]);
+ } else {
+ _gnutls_debug_log("received curve %s\n", gnutls_ecc_curve_get_name(curve));
+ }
+
i += 2;
ret = _gnutls_session_supports_ecc_curve(session, curve);