diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2022-12-29 08:10:56 +0530 |
---|---|---|
committer | Sebastian Dröge <slomo@coaxion.net> | 2023-01-12 21:57:08 +0000 |
commit | 100299397a9933b055058e19be8857e901fd1cc5 (patch) | |
tree | af1d8a27d8e0311dd4c83bfa85f5c1a9af166a90 | |
parent | 1f83231c6f258632b3127ae086a9f53e724f66c2 (diff) |
glib-networking: Fix build on iOS
https://gitlab.gnome.org/GNOME/glib-networking/-/merge_requests/229
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/864>
-rw-r--r-- | recipes/glib-networking.recipe | 3 | ||||
-rw-r--r-- | recipes/glib-networking/0001-Don-t-try-to-use-keychain-CA-certificates-on-iOS.patch | 42 |
2 files changed, 45 insertions, 0 deletions
diff --git a/recipes/glib-networking.recipe b/recipes/glib-networking.recipe index 6b56a1ac..1759ca6a 100644 --- a/recipes/glib-networking.recipe +++ b/recipes/glib-networking.recipe @@ -20,6 +20,9 @@ class Recipe(recipe.Recipe): # openssl on Linux use_system_libs = True + # https://gitlab.gnome.org/GNOME/glib-networking/-/merge_requests/229 + patches = [name + '/0001-Don-t-try-to-use-keychain-CA-certificates-on-iOS.patch'] + files_misc = ['lib/gio/modules/libgioopenssl%(mext)s'] files_lang = ['glib-networking'] files_devel = ['lib/gio/modules/libgioopenssl.a'] diff --git a/recipes/glib-networking/0001-Don-t-try-to-use-keychain-CA-certificates-on-iOS.patch b/recipes/glib-networking/0001-Don-t-try-to-use-keychain-CA-certificates-on-iOS.patch new file mode 100644 index 00000000..09597fb8 --- /dev/null +++ b/recipes/glib-networking/0001-Don-t-try-to-use-keychain-CA-certificates-on-iOS.patch @@ -0,0 +1,42 @@ +From 419e726ce0cd58277644050ed41c63dc29a80274 Mon Sep 17 00:00:00 2001 +From: Nirbheek Chauhan <nirbheek@centricular.com> +Date: Thu, 29 Dec 2022 08:07:20 +0530 +Subject: [PATCH] Don't try to use keychain CA certificates on iOS + +SecTrustCopyAnchorCertificates is not available on iOS as certificate +data for system-trusted roots is currently unavailable there. +--- + tls/openssl/gtlsdatabase-openssl.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/tls/openssl/gtlsdatabase-openssl.c b/tls/openssl/gtlsdatabase-openssl.c +index e7a7ef9..1c7df2a 100644 +--- a/tls/openssl/gtlsdatabase-openssl.c ++++ b/tls/openssl/gtlsdatabase-openssl.c +@@ -31,8 +31,14 @@ + #include <glib/gi18n-lib.h> + #include "openssl-include.h" + ++/* ++ * SecTrustCopyAnchorCertificates is only available on macOS, so we check for ++ * SEC_OS_OSX: https://github.com/Apple-FOSS-Mirror/Security/blob/master/base/SecBase.h ++ */ + #ifdef __APPLE__ + #include <Security/Security.h> ++#else ++#define SEC_OS_OSX 0 + #endif + + #ifdef G_OS_WIN32 +@@ -151,7 +157,7 @@ g_tls_database_openssl_verify_chain (GTlsDatabase *database, + return result; + } + +-#ifdef __APPLE__ ++#if SEC_OS_OSX + static gboolean + populate_store (X509_STORE *store, + GError **error) +-- +2.38.1 + |