]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Only reply with ECC Packet format extension if we have negotiated ECC.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 22 May 2011 15:56:54 +0000 (17:56 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 22 May 2011 15:56:54 +0000 (17:56 +0200)
lib/ext/ecc.c

index 7f744cacc1d01e10c75c6f6563e3350fae183024..e1eef100a78d2e2262d596b4ab98c16e0dc1174a 100644 (file)
@@ -242,6 +242,9 @@ _gnutls_supported_ecc_pf_send_params (gnutls_session_t session, gnutls_buffer_st
 {
   const opaque p[2] = {0x01, 0x00}; /* only support uncompressed point format */
   
+  if (session->security_parameters.entity == GNUTLS_SERVER && !_gnutls_session_is_ecc(session))
+    return 0;
+  
   /* this extension is only being sent on client and server side */
   _gnutls_buffer_append_data(extdata, p, 2);
   return 2;