0002-net-Fix-TLS-cert-validation-not-being-done-for-any-n.patch 1.1 KB

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