]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
ecdhe: print the received curve from the server on debug mode
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 24 Apr 2016 09:12:29 +0000 (11:12 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 24 Apr 2016 12:07:00 +0000 (14:07 +0200)
lib/auth/ecdhe.c

index bfd8000318f94384a38f6da4414e5179dc7f5f35..0cfcfd1467199d7c4227209e641a0673dc9ef5b5 100644 (file)
@@ -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);