diff options
author | Ross Lagerwall <rosslagerwall@gmail.com> | 2015-06-11 23:05:08 +0100 |
---|---|---|
committer | Ross Lagerwall <rosslagerwall@gmail.com> | 2015-06-17 22:34:44 +0100 |
commit | 600558ec7927d75ea045f3093a7db0a4778c76fe (patch) | |
tree | 2d53264c2fda26aa1a0f99d1a6b0fd7e456dd94a /daemon/gvfsdaemonutils.c | |
parent | 7deded463b8cc148103c55460a84a6b23342c941 (diff) | |
download | gvfs-600558ec7927d75ea045f3093a7db0a4778c76fe.tar.gz |
build: Make GCR optional
Make using GCR optional by compiling with --disable-gcr. This makes
gvfs strict when checking SSL certificates, so don't silently disable it
if the library is not found, only disable it if --disable-gcr is given.
https://bugzilla.gnome.org/show_bug.cgi?id=750706
Diffstat (limited to 'daemon/gvfsdaemonutils.c')
-rw-r--r-- | daemon/gvfsdaemonutils.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/daemon/gvfsdaemonutils.c b/daemon/gvfsdaemonutils.c index 7db18411..49999a8a 100644 --- a/daemon/gvfsdaemonutils.c +++ b/daemon/gvfsdaemonutils.c @@ -35,6 +35,10 @@ #include <glib/gi18n.h> #include <gio/gio.h> +#ifdef HAVE_GCR +#define GCR_API_SUBJECT_TO_CHANGE +#include <gcr/gcr-base.h> +#endif #include "gvfsdaemonutils.h" #include "gvfsdaemonprotocol.h" @@ -238,6 +242,7 @@ gvfs_seek_type_to_lseek (GSeekType type) } } +#ifdef HAVE_GCR /* Convert GTlsCertificateFlags into a message to display to the user. */ static char * certificate_flags_to_string (GTlsCertificateFlags errors) @@ -350,3 +355,12 @@ gvfs_accept_certificate (GMountSource *mount_source, return FALSE; } +#else +gboolean +gvfs_accept_certificate (GMountSource *mount_source, + GTlsCertificate *certificate, + GTlsCertificateFlags errors) +{ + return FALSE; +} +#endif |