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:
Matthew Waters
2018-08-16 23:25:29 +10:00
parent 6545e7558c
commit b84951eb6f
8 changed files with 265 additions and 7 deletions

View File

@@ -3634,6 +3634,7 @@ g_tls_backend_get_default
g_tls_backend_supports_tls
g_tls_backend_supports_dtls
g_tls_backend_get_default_database
g_tls_backend_set_default_database
g_tls_backend_get_certificate_type
g_tls_backend_get_client_connection_type
g_tls_backend_get_server_connection_type