gnutls-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU gnutls branch, master, updated. gnutls_3_0_8-61-gd9e7ed8


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_3_0_8-61-gd9e7ed8
Date: Tue, 13 Dec 2011 19:16:58 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gnutls".

http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=d9e7ed8e10c56983575930f927f2022ea57e1d45

The branch, master has been updated
       via  d9e7ed8e10c56983575930f927f2022ea57e1d45 (commit)
       via  97aa82f178dbed11deb3046e127700f91cd1874d (commit)
      from  9a7543f23b18907f37efbf8bf1f05560c902402f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d9e7ed8e10c56983575930f927f2022ea57e1d45
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Tue Dec 13 20:19:46 2011 +0100

    documented new priority strings.

commit 97aa82f178dbed11deb3046e127700f91cd1874d
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Tue Dec 13 20:19:35 2011 +0100

    server precedence also used in compression methods.

-----------------------------------------------------------------------

Summary of changes:
 doc/cha-gtls-app.texi  |    7 +++++++
 lib/gnutls_handshake.c |   45 ++++++++++++++++++++++++++++++++++-----------
 2 files changed, 41 insertions(+), 11 deletions(-)

diff --git a/doc/cha-gtls-app.texi b/doc/cha-gtls-app.texi
index 7054312..32c806e 100644
--- a/doc/cha-gtls-app.texi
+++ b/doc/cha-gtls-app.texi
@@ -677,6 +677,9 @@ or more.
 Means all "secure" ciphersuites of security level 192-bit
 or more.
 
address@hidden SECURE256 @tab
+Currently alias for SECURE192.
+
 @item SUITEB128 @tab
 Means all the NSA Suite B cryptography (RFC5430) ciphersuites
 with an 128 bit security level.
@@ -778,6 +781,10 @@ will prevent the sending of any TLS extensions in client 
side. Note
 that TLS 1.2 requires extensions to be used, as well as safe
 renegotiation thus this option must be used with care.
 
address@hidden %SERVER_PRECEDENCE @tab
+The ciphersuite will be selected according to server priorities
+and not the client's.
+
 @item %DISABLE_SAFE_RENEGOTIATION @tab
 will disable safe renegotiation
 completely.  Do not use unless you know what you are doing.
diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c
index 6480033..bf75919 100644
--- a/lib/gnutls_handshake.c
+++ b/lib/gnutls_handshake.c
@@ -987,24 +987,47 @@ _gnutls_server_select_comp_method (gnutls_session_t 
session,
       return x;
     }
 
-  for (j = 0; j < datalen; j++)
+  if (session->internals.priorities.server_precedence == 0)
     {
-      for (i = 0; i < x; i++)
+      for (j = 0; j < datalen; j++)
         {
-          if (comps[i] == data[j])
+          for (i = 0; i < x; i++)
             {
-              gnutls_compression_method_t method =
-                _gnutls_compression_get_id (comps[i]);
+              if (comps[i] == data[j])
+                {
+                  gnutls_compression_method_t method =
+                    _gnutls_compression_get_id (comps[i]);
 
-              _gnutls_epoch_set_compression (session, EPOCH_NEXT, method);
-              session->security_parameters.compression_method = method;
+                  _gnutls_epoch_set_compression (session, EPOCH_NEXT, method);
+                  session->security_parameters.compression_method = method;
 
-              _gnutls_handshake_log
-                ("HSK[%p]: Selected Compression Method: %s\n", session,
-                 gnutls_compression_get_name (method));
+                  _gnutls_handshake_log
+                    ("HSK[%p]: Selected Compression Method: %s\n", session,
+                    gnutls_compression_get_name (method));
+                  return 0;
+                }
+            }
+        }
+    }
+  else
+    {
+      for (i = 0; i < x; i++)
+        {
+          for (j = 0; j < datalen; j++)
+            {
+              if (comps[i] == data[j])
+                {
+                  gnutls_compression_method_t method =
+                    _gnutls_compression_get_id (comps[i]);
 
+                  _gnutls_epoch_set_compression (session, EPOCH_NEXT, method);
+                  session->security_parameters.compression_method = method;
 
-              return 0;
+                  _gnutls_handshake_log
+                    ("HSK[%p]: Selected Compression Method: %s\n", session,
+                    gnutls_compression_get_name (method));
+                  return 0;
+                }
             }
         }
     }


hooks/post-receive
-- 
GNU gnutls



reply via email to

[Prev in Thread] Current Thread [Next in Thread]