]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
use the _gnutls_session_is_ecc() to check for ECDH.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 21 May 2011 15:07:40 +0000 (17:07 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 21 May 2011 15:07:40 +0000 (17:07 +0200)
lib/gnutls_handshake.c

index c262f6f69c483a624e20c59d3dac879a4ee5eefb..e8393522e7fe3d088f91c2f38a8b229966b90da4 100644 (file)
@@ -3348,8 +3348,7 @@ _gnutls_remove_unwanted_ciphersuites (gnutls_session_t session,
       /* If we have not agreed to a common curve with the peer don't bother
        * negotiating ECDH.
        */
-      if (session->security_parameters.entity == GNUTLS_SERVER && (kx == GNUTLS_KX_ANON_ECDH ||
-          kx == GNUTLS_KX_ECDHE_RSA))
+      if (session->security_parameters.entity == GNUTLS_SERVER && _gnutls_session_is_ecc(session))
         {
           if (_gnutls_session_ecc_curve_get(session) == GNUTLS_ECC_CURVE_INVALID)
             delete = 1;