[glib-networking] gtlsfiledatabase-gnutls: Succeed even without an anchor file



commit a21822d1575a705590557d6ea2b11f54181a3a10
Author: Olivier Crête <olivier crete collabora com>
Date:   Sat Mar 29 00:17:03 2014 -0400

    gtlsfiledatabase-gnutls: Succeed even without an anchor file
    
    This way, it will produce an empty default database. Otherwise, there
    will be no default database and that shoud always succeed.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=727282

 tls/gnutls/gtlsfiledatabase-gnutls.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/tls/gnutls/gtlsfiledatabase-gnutls.c b/tls/gnutls/gtlsfiledatabase-gnutls.c
index 9e1e03c..5a51463 100644
--- a/tls/gnutls/gtlsfiledatabase-gnutls.c
+++ b/tls/gnutls/gtlsfiledatabase-gnutls.c
@@ -603,8 +603,11 @@ g_tls_file_database_gnutls_initable_init (GInitable    *initable,
                                     (GDestroyNotify)g_bytes_unref,
                                     (GDestroyNotify)g_bytes_unref);
 
-  result = load_anchor_file (self->priv->anchor_filename, subjects, issuers,
-                             complete, error);
+  if (self->priv->anchor_filename)
+    result = load_anchor_file (self->priv->anchor_filename, subjects, issuers,
+        complete, error);
+  else
+    result = TRUE;
 
   if (g_cancellable_set_error_if_cancelled (cancellable, error))
     result = FALSE;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]