summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDebarshi Ray <debarshir@gnome.org>2017-03-16 19:50:40 +0100
committerFederico Mena Quintero <federico@gnome.org>2017-05-26 13:04:05 -0500
commit1e232c9a7330e5d048b89619deffa78b5db87fae (patch)
tree95be3a7ccbbc44dc618916c5a5b977c5a2c820b9
parentd4d8e7e854eecc6aae121fe497f131207c29c672 (diff)
downloadempathy-webkit2-backport.tar.gz
Remove the GnuTLS dependencywebkit2-backport
GIO, backed by glib-networking, has everything that we need. https://bugzilla.gnome.org/show_bug.cgi?id=780160
-rw-r--r--configure.ac2
-rw-r--r--libempathy/empathy-utils.c35
-rw-r--r--libempathy/empathy-utils.h3
-rw-r--r--src/empathy-auth-client.c2
-rw-r--r--tests/empathy-tls-test.c2
5 files changed, 0 insertions, 44 deletions
diff --git a/configure.ac b/configure.ac
index ee183a2bf..2dce2c6af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,7 +35,6 @@ AC_COPYRIGHT([
# Hardp deps
FOLKS_REQUIRED=0.9.5
-GNUTLS_REQUIRED=2.8.5
GLIB_REQUIRED=2.48.0
AC_DEFINE(GLIB_VERSION_MIN_REQUIRED, GLIB_VERSION_2_48, [Ignore post 2.48 deprecations])
@@ -219,7 +218,6 @@ PKG_CHECK_MODULES(EMPATHY,
gio-2.0 >= $GLIB_REQUIRED
gio-unix-2.0 >= $GLIB_REQUIRED
libsecret-1 >= $LIBSECRET_REQUIRED
- gnutls >= $GNUTLS_REQUIRED
gmodule-export-2.0
gobject-2.0
gsettings-desktop-schemas
diff --git a/libempathy/empathy-utils.c b/libempathy/empathy-utils.c
index e83493736..88e28b8dd 100644
--- a/libempathy/empathy-utils.c
+++ b/libempathy/empathy-utils.c
@@ -20,10 +20,6 @@
* Authors: Richard Hult <richard@imendio.com>
* Martyn Russell <martyn@imendio.com>
* Xavier Claessens <xclaesse@gmail.com>
- *
- * Some snippets are taken from GnuTLS 2.8.6, which is distributed under the
- * same GNU Lesser General Public License 2.1 (or later) version. See
- * empathy_get_x509_certified_hostname ().
*/
#include "config.h"
@@ -649,37 +645,6 @@ empathy_folks_persona_is_interesting (FolksPersona *persona)
}
gchar *
-empathy_get_x509_certificate_hostname (gnutls_x509_crt_t cert)
-{
- gchar dns_name[256];
- gsize dns_name_size;
- gint idx;
- gint res = 0;
-
- /* this snippet is taken from GnuTLS.
- * see gnutls/lib/x509/rfc2818_hostname.c
- */
- for (idx = 0; res >= 0; idx++)
- {
- dns_name_size = sizeof (dns_name);
- res = gnutls_x509_crt_get_subject_alt_name (cert, idx,
- dns_name, &dns_name_size, NULL);
-
- if (res == GNUTLS_SAN_DNSNAME || res == GNUTLS_SAN_IPADDRESS)
- return g_strndup (dns_name, dns_name_size);
- }
-
- dns_name_size = sizeof (dns_name);
- res = gnutls_x509_crt_get_dn_by_oid (cert, GNUTLS_OID_X520_COMMON_NAME,
- 0, 0, dns_name, &dns_name_size);
-
- if (res >= 0)
- return g_strndup (dns_name, dns_name_size);
-
- return NULL;
-}
-
-gchar *
empathy_format_currency (gint amount,
guint scale,
const gchar *currency)
diff --git a/libempathy/empathy-utils.h b/libempathy/empathy-utils.h
index a9ff0d890..deb3ae87b 100644
--- a/libempathy/empathy-utils.h
+++ b/libempathy/empathy-utils.h
@@ -27,7 +27,6 @@
#include <glib.h>
#include <glib-object.h>
-#include <gnutls/x509.h>
#include <libxml/tree.h>
#include <folks/folks.h>
#include <folks/folks-telepathy.h>
@@ -85,8 +84,6 @@ gboolean empathy_connection_can_group_personas (TpConnection *connection,
FolksIndividual *individual);
gboolean empathy_folks_persona_is_interesting (FolksPersona *persona);
-gchar * empathy_get_x509_certificate_hostname (gnutls_x509_crt_t cert);
-
gchar *empathy_format_currency (gint amount,
guint scale,
const gchar *currency);
diff --git a/src/empathy-auth-client.c b/src/empathy-auth-client.c
index 3ee478d3e..6b6482d4b 100644
--- a/src/empathy-auth-client.c
+++ b/src/empathy-auth-client.c
@@ -22,7 +22,6 @@
#include "config.h"
#include <glib/gi18n.h>
-#include <gnutls/gnutls.h>
#include "empathy-auth-factory.h"
#include "empathy-bad-password-dialog.h"
@@ -297,7 +296,6 @@ main (int argc,
g_option_context_free (context);
empathy_gtk_init ();
- gnutls_global_init ();
g_set_application_name (_("Empathy authentication client"));
/* Make empathy and empathy-auth-client appear as the same app in
diff --git a/tests/empathy-tls-test.c b/tests/empathy-tls-test.c
index b8f9ffcbb..9b62ae4e0 100644
--- a/tests/empathy-tls-test.c
+++ b/tests/empathy-tls-test.c
@@ -1,6 +1,5 @@
#include "config.h"
-#include <gnutls/gnutls.h>
#include <telepathy-glib/telepathy-glib.h>
#include <telepathy-glib/telepathy-glib-dbus.h>
@@ -744,7 +743,6 @@ main (int argc,
int result;
test_init (argc, argv);
- gnutls_global_init ();
g_test_add ("/tls/certificate_basics", Test, NULL,
setup, test_certificate_mock_basics, teardown);