[glib-networking] Set handshake priority only before the first handshake



commit 9cff2742f4762c874ea15fc4859fb80202bfb0dc
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Wed Oct 17 10:54:55 2018 -0500

    Set handshake priority only before the first handshake
    
    No point in doing this work twice.
    
    It's also causing crashes inside GnuTLS:
    
    https://gitlab.com/gnutls/gnutls/merge_requests/777

 tls/gnutls/gtlsconnection-gnutls.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/tls/gnutls/gtlsconnection-gnutls.c b/tls/gnutls/gtlsconnection-gnutls.c
index 959fa68..15ca40a 100644
--- a/tls/gnutls/gtlsconnection-gnutls.c
+++ b/tls/gnutls/gtlsconnection-gnutls.c
@@ -1859,7 +1859,8 @@ handshake_thread (GTask        *task,
   g_clear_object (&priv->peer_certificate);
   priv->peer_certificate_errors = 0;
 
-  g_tls_connection_gnutls_set_handshake_priority (gnutls);
+  if (!priv->ever_handshaked)
+    g_tls_connection_gnutls_set_handshake_priority (gnutls);
 
   /* Adjust the timeout for the next operation in the sequence. */
   if (timeout > 0)


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