Allow to running without certs.pem defined OBS-URL: https://build.opensuse.org/request/show/182875 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/glib-networking?expand=0&rev=71
31 lines
892 B
Diff
31 lines
892 B
Diff
Index: glib-networking-2.37.4/tls/gnutls/gtlsbackend-gnutls.c
|
|
===================================================================
|
|
--- glib-networking-2.37.4.orig/tls/gnutls/gtlsbackend-gnutls.c
|
|
+++ glib-networking-2.37.4/tls/gnutls/gtlsbackend-gnutls.c
|
|
@@ -103,8 +103,10 @@ g_tls_backend_gnutls_real_create_databas
|
|
const gchar *anchor_file = NULL;
|
|
#ifdef GTLS_SYSTEM_CA_FILE
|
|
anchor_file = GTLS_SYSTEM_CA_FILE;
|
|
-#endif
|
|
return g_tls_file_database_new (anchor_file, error);
|
|
+#else
|
|
+ return NULL;
|
|
+#endif
|
|
}
|
|
|
|
static void
|
|
@@ -144,11 +146,13 @@ g_tls_backend_gnutls_get_default_databas
|
|
error->message);
|
|
g_clear_error (&error);
|
|
}
|
|
+#ifdef GTLS_SYSTEM_CA_FILE
|
|
else
|
|
{
|
|
g_assert (result);
|
|
self->priv->default_database = g_object_ref (result);
|
|
}
|
|
+#endif
|
|
}
|
|
|
|
g_mutex_unlock (&self->priv->mutex);
|