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



commit 259f95f74211de9cad9305d96651a2e543005922
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 | 17 -----------------
 2 files changed, 1 insertion(+), 28 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..2e728f9 100644
--- a/tls/openssl/gtlsconnection-openssl.c
+++ b/tls/openssl/gtlsconnection-openssl.c
@@ -232,7 +232,6 @@ g_tls_connection_openssl_handshake_thread_request_rehandshake (GTlsConnectionBas
 {
   GTlsConnectionOpenssl *openssl;
   GTlsConnectionBaseStatus status;
-  GTlsRehandshakeMode rehandshake_mode;
   SSL *ssl;
   int ret;
 
@@ -245,22 +244,6 @@ g_tls_connection_openssl_handshake_thread_request_rehandshake (GTlsConnectionBas
 
   openssl = G_TLS_CONNECTION_OPENSSL (tls);
 
-#if defined(__GNUC__)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
-#endif
-  rehandshake_mode = g_tls_connection_get_rehandshake_mode (G_TLS_CONNECTION (tls));
-#if defined(__GNUC__)
-#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]