[glib-networking] tests: Bring back check for old GnuTLS rehandshaking bug



commit d217a266e9a3400ce6687d63e3014c00784c1ff5
Author: Michael Catanzaro <mcatanzaro igalia com>
Date:   Sun Apr 15 20:36:34 2018 -0500

    tests: Bring back check for old GnuTLS rehandshaking bug
    
    This reverts commit 2ef2af4ecd6bf06bc7000d7e13caf72a2eac7448.
    
    Adapted to check for our new rehandshaking bug!
    
    https://bugzilla.gnome.org/show_bug.cgi?id=794286

 tls/tests/connection.c |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)
---
diff --git a/tls/tests/connection.c b/tls/tests/connection.c
index 0ba907d..e662e5b 100644
--- a/tls/tests/connection.c
+++ b/tls/tests/connection.c
@@ -1562,10 +1562,31 @@ test_simultaneous_async (TestConnection *test,
   g_assert_cmpstr (test->buf, ==, TEST_DATA);
 }
 
+static gboolean
+check_gnutls_has_rehandshaking_bug (void)
+{
+  const char *version = gnutls_check_version (NULL);
+
+  return (!strcmp (version, "3.1.27") ||
+          !strcmp (version, "3.1.28") ||
+          !strcmp (version, "3.2.19") ||
+          !strcmp (version, "3.3.8") ||
+          !strcmp (version, "3.3.9") ||
+          !strcmp (version, "3.3.10") ||
+          !strcmp (version, "3.6.1") ||
+          !strcmp (version, "3.6.2"));
+}
+
 static void
 test_simultaneous_async_rehandshake (TestConnection *test,
                                      gconstpointer   data)
 {
+  if (check_gnutls_has_rehandshaking_bug ())
+    {
+      g_test_skip ("test would fail due to https://bugzilla.gnome.org/show_bug.cgi?id=794286#c13";);
+      return;
+    }
+
   test->rehandshake = TRUE;
   test_simultaneous_async (test, data);
 }
@@ -1660,6 +1681,12 @@ static void
 test_simultaneous_sync_rehandshake (TestConnection *test,
                                     gconstpointer   data)
 {
+  if (check_gnutls_has_rehandshaking_bug ())
+    {
+      g_test_skip ("test would fail due to https://bugzilla.gnome.org/show_bug.cgi?id=794286#c13";);
+      return;
+    }
+
   test->rehandshake = TRUE;
   test_simultaneous_sync (test, data);
 }


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