[glib-networking/wip/tls1.3] Set handshake priority only before the first handshake



commit 5241925d0c084e1d50315eff1edacc70193213b8
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, and it's reportedly causing crashes
    inside GnuTLS. This might possibly solve #45, but requires further
    investigation.

 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]