Blame SOURCES/0002-net-Fix-TLS-cert-validation-not-being-done-for-any-n.patch

94154b
From cd2472e506dafb1bb8ae510e34ad4797f63e263e Mon Sep 17 00:00:00 2001
94154b
From: Bastien Nocera <hadess@hadess.net>
94154b
Date: Mon, 21 Jun 2021 15:00:14 +0200
94154b
Subject: [PATCH 2/2] net: Fix TLS cert validation not being done for any
94154b
 network call
94154b
94154b
The default SoupSessionAsync behaviour does not perform any TLS certificate
94154b
validation, unless the ssl-use-system-ca-file property is set to true.
94154b
94154b
See https://blogs.gnome.org/mcatanzaro/2021/05/25/reminder-soupsessionsync-and-soupsessionasync-default-to-no-tls-certificate-verification/
94154b
94154b
This mitigates CVE-2016-20011.
94154b
94154b
Closes: #146
94154b
---
94154b
 libs/net/grl-net-wc.c | 1 +
94154b
 1 file changed, 1 insertion(+)
94154b
94154b
diff --git a/libs/net/grl-net-wc.c b/libs/net/grl-net-wc.c
94154b
index 5a8e89f..5ff1d17 100644
94154b
--- a/libs/net/grl-net-wc.c
94154b
+++ b/libs/net/grl-net-wc.c
94154b
@@ -314,6 +314,7 @@ grl_net_wc_init (GrlNetWc *wc)
94154b
   wc->priv = grl_net_wc_get_instance_private (wc);
94154b
 
94154b
   wc->priv->session = soup_session_async_new ();
94154b
+  g_object_set (G_OBJECT (wc->priv->session), "ssl-use-system-ca-file", TRUE, NULL);
94154b
   wc->priv->pending = g_queue_new ();
94154b
 
94154b
   set_thread_context (wc);
94154b
-- 
94154b
2.31.1
94154b