]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
ecdhe: eliminated unneeded checks for zero of public parameters
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 24 Apr 2016 13:35:20 +0000 (15:35 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 24 Apr 2016 13:35:25 +0000 (15:35 +0200)
There were not required by either draft-ietf-tls-rfc4492bis-07
or rfc7748.

lib/auth/ecdhe.c

index 35eaa9cb585e516f7732389fa0b555ea1fbf868e..e445c2f0fe760ce65ec39582bacb6ab11699fa30 100644 (file)
@@ -166,9 +166,6 @@ int _gnutls_proc_ecdh_common_client_kx(gnutls_session_t session,
                if (ecurve->size != point_size)
                        return gnutls_assert_val(GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER);
 
-               if (_gnutls_mem_is_zero(&data[i], point_size))
-                       return gnutls_assert_val(GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER);
-
                ret = _gnutls_set_datum(&session->key.ecdhx,
                                        &data[i], point_size);
                if (ret < 0) {
@@ -374,9 +371,6 @@ _gnutls_proc_ecdh_common_server_kx(gnutls_session_t session,
                if (ecurve->size != point_size)
                        return gnutls_assert_val(GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER);
 
-               if (_gnutls_mem_is_zero(&data[i], point_size))
-                       return gnutls_assert_val(GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER);
-
                ret = _gnutls_set_datum(&session->key.ecdhx,
                                        &data[i], point_size);
                if (ret < 0)