mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
gtlsbackend: add support for setting the default TLS database
There are many cases where a default TLS database is not able to be defined within the constraints of a system. For example glib-networking (or glib-openssl) cannot retrieve the default certificate store on iOS or Android and need to be initialized from a cert file of certificates bundled with the application. Previously GStreamer was relying on a custom patch to glib-networking to populate the default database from the file pointed to by the CA_CERTIFICATES environment variable however the mechanism that enabled this was recently remove from glib-networking. Adding a more generic g_tls_backend_set_default_database() API allows application developers to override the default database using their own certificates as well as allowing equivalent functionality on Android/iOS (or others) as on the default database handling Linux. Fixes https://gitlab.gnome.org/GNOME/glib-networking/issues/35
This commit is contained in:
@@ -85,6 +85,9 @@ GTlsBackend * g_tls_backend_get_default (void);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
GTlsDatabase * g_tls_backend_get_default_database (GTlsBackend *backend);
|
||||
GLIB_AVAILABLE_IN_2_60
|
||||
void g_tls_backend_set_default_database (GTlsBackend *backend,
|
||||
GTlsDatabase *database);
|
||||
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gboolean g_tls_backend_supports_tls (GTlsBackend *backend);
|
||||
|
Reference in New Issue
Block a user