[glib-networking] gnutls: fix server-side rehandshake request



commit 29279bc86ca111147ea8459951d399af442e032e
Author: Dan Winship <danw gnome org>
Date:   Thu Aug 25 18:54:45 2011 -0400

    gnutls: fix server-side rehandshake request
    
    When doing an async rehandshake request, we would accidentally send a
    second rehandshake request halfway through the rehandshake, causing
    the client to abort.

 tls/gnutls/gtlsconnection-gnutls.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/tls/gnutls/gtlsconnection-gnutls.c b/tls/gnutls/gtlsconnection-gnutls.c
index 0882852..c1ede79 100644
--- a/tls/gnutls/gtlsconnection-gnutls.c
+++ b/tls/gnutls/gtlsconnection-gnutls.c
@@ -843,7 +843,8 @@ handshake_internal (GTlsConnectionGnutls  *gnutls,
   int ret;
 
   if (G_IS_TLS_SERVER_CONNECTION_GNUTLS (gnutls) &&
-      gnutls->priv->ever_handshaked && !gnutls->priv->need_handshake)
+      gnutls->priv->ever_handshaked && !gnutls->priv->handshaking &&
+      !gnutls->priv->need_handshake)
     {
       BEGIN_GNUTLS_IO (gnutls, blocking, cancellable);
       ret = gnutls_rehandshake (gnutls->priv->session);



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