implement get_negotiated_protocol vfunc to fix test error
This commit is contained in:
parent
15327fd85b
commit
291a761138
84
backport-tls-implement-get_negotiated_protocol-vfunc.patch
Normal file
84
backport-tls-implement-get_negotiated_protocol-vfunc.patch
Normal file
@ -0,0 +1,84 @@
|
||||
From e07302e9183e20c999ad924334527795728ab016 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Catanzaro <mcatanzaro@gnome.org>
|
||||
Date: Thu, 29 Apr 2021 13:59:03 -0500
|
||||
Subject: [PATCH 41/74] tls: implement get_negotiated_protocol vfunc
|
||||
|
||||
This allows GLib to remove some API-level caching that is not
|
||||
threadsafe.
|
||||
|
||||
Fixes glib#2393
|
||||
|
||||
Conflict: NA
|
||||
Reference:https://gitlab.gnome.org/GNOME/glib-networking/-/commit/e07302e9183e20c999ad924334527795728ab016
|
||||
---
|
||||
tls/base/gtlsconnection-base.c | 40 +++++++++++++++++++++++-----------
|
||||
1 file changed, 27 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/tls/base/gtlsconnection-base.c b/tls/base/gtlsconnection-base.c
|
||||
index 72551dc..f6b2460 100644
|
||||
--- a/tls/base/gtlsconnection-base.c
|
||||
+++ b/tls/base/gtlsconnection-base.c
|
||||
@@ -1447,6 +1447,26 @@ g_tls_connection_base_dtls_get_binding_data (GDtlsConnection *conn,
|
||||
type, data, error);
|
||||
}
|
||||
|
||||
+#if GLIB_CHECK_VERSION(2, 69, 0)
|
||||
+static const gchar *
|
||||
+g_tls_connection_base_get_negotiated_protocol (GTlsConnection *conn)
|
||||
+{
|
||||
+ GTlsConnectionBase *tls = G_TLS_CONNECTION_BASE (conn);
|
||||
+ GTlsConnectionBasePrivate *priv = g_tls_connection_base_get_instance_private (tls);
|
||||
+
|
||||
+ return priv->negotiated_protocol;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+static const gchar *
|
||||
+g_tls_connection_base_dtls_get_negotiated_protocol (GDtlsConnection *conn)
|
||||
+{
|
||||
+ GTlsConnectionBase *tls = G_TLS_CONNECTION_BASE (conn);
|
||||
+ GTlsConnectionBasePrivate *priv = g_tls_connection_base_get_instance_private (tls);
|
||||
+
|
||||
+ return priv->negotiated_protocol;
|
||||
+}
|
||||
+
|
||||
static void
|
||||
handshake_thread (GTask *task,
|
||||
gpointer object,
|
||||
@@ -2542,15 +2562,6 @@ g_tls_connection_base_dtls_set_advertised_protocols (GDtlsConnection *conn,
|
||||
g_object_set (conn, "advertised-protocols", protocols, NULL);
|
||||
}
|
||||
|
||||
-const gchar *
|
||||
-g_tls_connection_base_dtls_get_negotiated_protocol (GDtlsConnection *conn)
|
||||
-{
|
||||
- GTlsConnectionBase *tls = G_TLS_CONNECTION_BASE (conn);
|
||||
- GTlsConnectionBasePrivate *priv = g_tls_connection_base_get_instance_private (tls);
|
||||
-
|
||||
- return priv->negotiated_protocol;
|
||||
-}
|
||||
-
|
||||
GDatagramBased *
|
||||
g_tls_connection_base_get_base_socket (GTlsConnectionBase *tls)
|
||||
{
|
||||
@@ -2733,10 +2744,13 @@ g_tls_connection_base_class_init (GTlsConnectionBaseClass *klass)
|
||||
gobject_class->set_property = g_tls_connection_base_set_property;
|
||||
gobject_class->finalize = g_tls_connection_base_finalize;
|
||||
|
||||
- connection_class->handshake = g_tls_connection_base_handshake;
|
||||
- connection_class->handshake_async = g_tls_connection_base_handshake_async;
|
||||
- connection_class->handshake_finish = g_tls_connection_base_handshake_finish;
|
||||
- connection_class->get_binding_data = g_tls_connection_base_get_binding_data;
|
||||
+ connection_class->handshake = g_tls_connection_base_handshake;
|
||||
+ connection_class->handshake_async = g_tls_connection_base_handshake_async;
|
||||
+ connection_class->handshake_finish = g_tls_connection_base_handshake_finish;
|
||||
+ connection_class->get_binding_data = g_tls_connection_base_get_binding_data;
|
||||
+#if GLIB_CHECK_VERSION(2, 69, 0)
|
||||
+ connection_class->get_negotiated_protocol = g_tls_connection_base_get_negotiated_protocol;
|
||||
+#endif
|
||||
|
||||
iostream_class->get_input_stream = g_tls_connection_base_get_input_stream;
|
||||
iostream_class->get_output_stream = g_tls_connection_base_get_output_stream;
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
Name: glib-networking
|
||||
Version: 2.68.1
|
||||
Release: 4
|
||||
Release: 5
|
||||
Summary: Network-related modules for glib
|
||||
License: LGPLv2+
|
||||
URL: http://www.gnome.org
|
||||
Source0: http://download.gnome.org/sources/glib-networking/2.68/%{name}-%{version}.tar.xz
|
||||
|
||||
Patch0: backport-allow-tls-unique-channel-binding-test-to-fail.patch
|
||||
Patch0: backport-tls-implement-get_negotiated_protocol-vfunc.patch
|
||||
Patch1: backport-allow-tls-unique-channel-binding-test-to-fail.patch
|
||||
|
||||
BuildRequires: meson gcc ca-certificates gettext systemd
|
||||
BuildRequires: pkgconfig(glib-2.0) >= 2.67.0 pkgconfig(gnutls)
|
||||
@ -39,7 +40,7 @@ verify the Usability of the glib-networking package.
|
||||
%find_lang %{name}
|
||||
|
||||
%check
|
||||
%meson_test || echo "Some error in %check and check it."
|
||||
%meson_test
|
||||
|
||||
%files -f %{name}.lang
|
||||
%defattr(-,root,root)
|
||||
@ -56,8 +57,14 @@ verify the Usability of the glib-networking package.
|
||||
%{_datadir}/installed-tests
|
||||
|
||||
%changelog
|
||||
* Tue Dec 06 2022 yanglu <yanglu72@h-partners.com> - 2.68.1-5
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:implement get_negotiated_protocol vfunc to fix test error
|
||||
|
||||
* Fri Nov 11 2022 Wenlong Ding <wenlong.ding@turbolinux.com.cn> - 2.68.1-4
|
||||
- Skip %check check error in 22.03-LTS-Next
|
||||
- Skip check error in 22.03-LTS-Next
|
||||
|
||||
* Mon Apr 25 2022 yanglu <yanglu72@h-partners.com> - 2.68.1-3
|
||||
- Type:bugfix
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user