[libsoup] tests: Fix ssl-test with latest glib-networking changes



commit 3b8768e6dabc539ee523ac3579307c4d4ab4dd6b
Author: Patrick Griffis <pgriffis igalia com>
Date:   Sat Jan 1 13:32:00 2022 -0600

    tests: Fix ssl-test with latest glib-networking changes
    
    Discussed in !194

 tests/ssl-test.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/tests/ssl-test.c b/tests/ssl-test.c
index ecd0e63e..12f81af5 100644
--- a/tests/ssl-test.c
+++ b/tests/ssl-test.c
@@ -73,8 +73,11 @@ do_strictness_test (gconstpointer data)
        flags = soup_message_get_tls_peer_certificate_errors (msg);
 
         if (test->expected_status == SOUP_STATUS_OK) {
+                const char *ciphersuite_name = soup_message_get_tls_ciphersuite_name (msg);
+                /* Format changed in https://gitlab.gnome.org/GNOME/glib-networking/-/merge_requests/194 */
+                g_assert_true (!g_strcmp0 (ciphersuite_name, "TLS_AES-256-GCM_SHA384")
+                               || !g_strcmp0 (ciphersuite_name, "TLS_AES_256_GCM_SHA384"));
                 g_assert_cmpuint (soup_message_get_tls_protocol_version (msg), ==, 
G_TLS_PROTOCOL_VERSION_TLS_1_3);
-                g_assert_cmpstr (soup_message_get_tls_ciphersuite_name (msg), ==, "TLS_AES-256-GCM_SHA384");
         } else {
                 g_assert_cmpuint (soup_message_get_tls_protocol_version (msg), ==, 
G_TLS_PROTOCOL_VERSION_UNKNOWN);
                 g_assert_null (soup_message_get_tls_ciphersuite_name (msg));


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