[glib-networking/mcatanzaro/rehandshake-never: 8/8] Remove support for the rehandshake-mode property



commit bfecb37785d01c05d42487dc5304cfa2de5a26c3
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Thu Nov 14 12:10:59 2019 -0600

    Remove support for the rehandshake-mode property
    
    The GnuTLS backend no longer supports unsafe rehandshakes since
    7ab1578608e53831f3943a24b4b1338646d1da62. The OpenSSL backend never did.
    
    I don't see any need to consider supporting never rehandshake anymore,
    since it's been deprecated for over a year and I can't think of any
    use-case. It's not causing any problems, so ordinarily this would be the
    sort of code I would leave alone and not bother with removing, but the
    unsafe renegotiation support was annoying to maintain and now that has
    been removed, it doesn't really make sense to continue respecting only
    this option.
    
    glib changes are in glib!1227

 tls/gnutls/gtlsconnection-gnutls.c   | 12 +-----------
 tls/openssl/gtlsconnection-openssl.c |  7 -------
 2 files changed, 1 insertion(+), 18 deletions(-)
---
diff --git a/tls/gnutls/gtlsconnection-gnutls.c b/tls/gnutls/gtlsconnection-gnutls.c
index 660d986..db2425e 100644
--- a/tls/gnutls/gtlsconnection-gnutls.c
+++ b/tls/gnutls/gtlsconnection-gnutls.c
@@ -373,17 +373,7 @@ end_gnutls_io (GTlsConnectionGnutls  *gnutls,
     }
 
   if (ret == GNUTLS_E_REHANDSHAKE)
-    {
-      if (g_tls_connection_get_rehandshake_mode (G_TLS_CONNECTION (gnutls)) == G_TLS_REHANDSHAKE_NEVER)
-        {
-          g_clear_error (&my_error);
-          g_set_error_literal (error, G_TLS_ERROR, G_TLS_ERROR_MISC,
-                               _("Peer requested illegal TLS rehandshake"));
-          return G_TLS_CONNECTION_BASE_ERROR;
-        }
-
-      return G_TLS_CONNECTION_BASE_REHANDSHAKE;
-    }
+    return G_TLS_CONNECTION_BASE_REHANDSHAKE;
 
   if (ret == GNUTLS_E_PREMATURE_TERMINATION)
     {
diff --git a/tls/openssl/gtlsconnection-openssl.c b/tls/openssl/gtlsconnection-openssl.c
index f07be5a..ba2457a 100644
--- a/tls/openssl/gtlsconnection-openssl.c
+++ b/tls/openssl/gtlsconnection-openssl.c
@@ -254,13 +254,6 @@ g_tls_connection_openssl_handshake_thread_request_rehandshake (GTlsConnectionBas
 #pragma GCC diagnostic pop
 #endif
 
-  if (rehandshake_mode == G_TLS_REHANDSHAKE_NEVER)
-    {
-      g_set_error_literal (error, G_TLS_ERROR, G_TLS_ERROR_MISC,
-                           _("Peer requested illegal TLS rehandshake"));
-      return G_TLS_CONNECTION_BASE_ERROR;
-    }
-
   ssl = g_tls_connection_openssl_get_ssl (openssl);
 
   BEGIN_OPENSSL_IO (openssl, G_IO_IN | G_IO_OUT, timeout, cancellable);


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