};
typedef struct {
- EmpathyTLSCertificate *certificate;
- EmpTLSCertificateRejectReason reason;
+ TpTLSCertificate *certificate;
+ TpTLSCertificateRejectReason reason;
GHashTable *details;
gboolean remember;
{
GString *str;
const gchar *reason_str;
- EmpTLSCertificateRejectReason reason;
+ TpTLSCertificateRejectReason reason;
GHashTable *details;
EmpathyTLSDialogPriv *priv = GET_PRIV (self);
switch (reason)
{
- case EMP_TLS_CERTIFICATE_REJECT_REASON_UNTRUSTED:
+ case TP_TLS_CERTIFICATE_REJECT_REASON_UNTRUSTED:
reason_str = _("The certificate is not signed by a Certification "
"Authority.");
break;
- case EMP_TLS_CERTIFICATE_REJECT_REASON_EXPIRED:
+ case TP_TLS_CERTIFICATE_REJECT_REASON_EXPIRED:
reason_str = _("The certificate has expired.");
break;
- case EMP_TLS_CERTIFICATE_REJECT_REASON_NOT_ACTIVATED:
+ case TP_TLS_CERTIFICATE_REJECT_REASON_NOT_ACTIVATED:
reason_str = _("The certificate hasn't yet been activated.");
break;
- case EMP_TLS_CERTIFICATE_REJECT_REASON_FINGERPRINT_MISMATCH:
+ case TP_TLS_CERTIFICATE_REJECT_REASON_FINGERPRINT_MISMATCH:
reason_str = _("The certificate does not have the expected fingerprint.");
break;
- case EMP_TLS_CERTIFICATE_REJECT_REASON_HOSTNAME_MISMATCH:
+ case TP_TLS_CERTIFICATE_REJECT_REASON_HOSTNAME_MISMATCH:
reason_str = _("The hostname verified by the certificate doesn't match "
"the server name.");
break;
- case EMP_TLS_CERTIFICATE_REJECT_REASON_SELF_SIGNED:
+ case TP_TLS_CERTIFICATE_REJECT_REASON_SELF_SIGNED:
reason_str = _("The certificate is self-signed.");
break;
- case EMP_TLS_CERTIFICATE_REJECT_REASON_REVOKED:
+ case TP_TLS_CERTIFICATE_REJECT_REASON_REVOKED:
reason_str = _("The certificate has been revoked by the issuing "
"Certification Authority.");
break;
- case EMP_TLS_CERTIFICATE_REJECT_REASON_INSECURE:
+ case TP_TLS_CERTIFICATE_REJECT_REASON_INSECURE:
reason_str = _("The certificate is cryptographically weak.");
break;
- case EMP_TLS_CERTIFICATE_REJECT_REASON_LIMIT_EXCEEDED:
+ case TP_TLS_CERTIFICATE_REJECT_REASON_LIMIT_EXCEEDED:
reason_str = _("The certificate length exceeds verifiable limits.");
break;
- case EMP_TLS_CERTIFICATE_REJECT_REASON_UNKNOWN:
+ case TP_TLS_CERTIFICATE_REJECT_REASON_UNKNOWN:
default:
reason_str = _("The certificate is malformed.");
break;
g_string_append (str, reason_str);
/* add more information in case of HOSTNAME_MISMATCH */
- if (reason == EMP_TLS_CERTIFICATE_REJECT_REASON_HOSTNAME_MISMATCH)
+ if (reason == TP_TLS_CERTIFICATE_REJECT_REASON_HOSTNAME_MISMATCH)
{
const gchar *expected_hostname, *certificate_hostname;
}
static void
-certificate_invalidated_cb (EmpathyTLSCertificate *certificate,
+certificate_invalidated_cb (TpTLSCertificate *certificate,
guint domain,
gint code,
gchar *message,
oclass->finalize = empathy_tls_dialog_finalize;
oclass->constructed = empathy_tls_dialog_constructed;
- pspec = g_param_spec_object ("certificate", "The EmpathyTLSCertificate",
- "The EmpathyTLSCertificate to be displayed.",
- EMPATHY_TYPE_TLS_CERTIFICATE,
+ pspec = g_param_spec_object ("certificate", "The TpTLSCertificate",
+ "The TpTLSCertificate to be displayed.",
+ TP_TYPE_TLS_CERTIFICATE,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (oclass, PROP_TLS_CERTIFICATE, pspec);
pspec = g_param_spec_uint ("reason", "The reason",
"The reason why the certificate is being asked for confirmation.",
- 0, NUM_EMP_TLS_CERTIFICATE_REJECT_REASONS - 1,
- EMP_TLS_CERTIFICATE_REJECT_REASON_UNKNOWN,
+ 0, NUM_TP_TLS_CERTIFICATE_REJECT_REASONS - 1,
+ TP_TLS_CERTIFICATE_REJECT_REASON_UNKNOWN,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (oclass, PROP_REASON, pspec);
}
GtkWidget *
-empathy_tls_dialog_new (EmpathyTLSCertificate *certificate,
- EmpTLSCertificateRejectReason reason,
+empathy_tls_dialog_new (TpTLSCertificate *certificate,
+ TpTLSCertificateRejectReason reason,
GHashTable *details)
{
- g_assert (EMPATHY_IS_TLS_CERTIFICATE (certificate));
+ g_assert (TP_IS_TLS_CERTIFICATE (certificate));
return g_object_new (EMPATHY_TYPE_TLS_DIALOG,
"message-type", GTK_MESSAGE_WARNING,
#include <glib-object.h>
#include <gtk/gtk.h>
-#include <libempathy/empathy-tls-certificate.h>
-
-#include <extensions/extensions.h>
+#include <telepathy-glib/telepathy-glib.h>
G_BEGIN_DECLS
(G_TYPE_INSTANCE_GET_CLASS ((obj), EMPATHY_TYPE_TLS_DIALOG, \
EmpathyTLSDialogClass))
-GtkWidget * empathy_tls_dialog_new (EmpathyTLSCertificate *certificate,
- EmpTLSCertificateRejectReason reason,
+GtkWidget * empathy_tls_dialog_new (TpTLSCertificate *certificate,
+ TpTLSCertificateRejectReason reason,
GHashTable *details);
G_END_DECLS
#include "empathy-server-tls-handler.h"
-#include <telepathy-glib/interfaces.h>
-#include <telepathy-glib/util.h>
-
#define DEBUG_FLAG EMPATHY_DEBUG_TLS
#include "empathy-debug.h"
-#include "empathy-tls-certificate.h"
#include "empathy-utils.h"
#include "extensions/extensions.h"
typedef struct {
TpChannel *channel;
- EmpathyTLSCertificate *certificate;
+ TpTLSCertificate *certificate;
gchar *hostname;
gchar **reference_identities;
GAsyncResult *result,
gpointer user_data)
{
- EmpathyTLSCertificate *certificate = EMPATHY_TLS_CERTIFICATE (source);
+ TpTLSCertificate *certificate = TP_TLS_CERTIFICATE (source);
EmpathyServerTLSHandler *self = user_data;
GError *error = NULL;
EmpathyServerTLSHandlerPriv *priv = GET_PRIV (self);
- empathy_tls_certificate_prepare_finish (certificate, result, &error);
-
- if (error != NULL)
+ if (!tp_proxy_prepare_finish (certificate, result, &error))
{
g_simple_async_result_set_from_error (priv->async_init_res, error);
g_error_free (error);
const gchar *hostname;
const gchar * const *identities;
const gchar *bus_name;
- TpDBusDaemon *dbus;
GError *error = NULL;
+ GQuark features[] = { TP_TLS_CERTIFICATE_FEATURE_CORE, 0 };
/*
* Used when channel doesn't implement ReferenceIdentities. A GStrv
* with [0] the hostname, and [1] a NULL terminator.
cert_object_path = tp_asv_get_object_path (properties,
EMP_IFACE_CHANNEL_TYPE_SERVER_TLS_CONNECTION ".ServerCertificate");
bus_name = tp_proxy_get_bus_name (TP_PROXY (priv->channel));
- dbus = tp_proxy_get_dbus_daemon (TP_PROXY (priv->channel));
- DEBUG ("Creating an EmpathyTLSCertificate for path %s, bus name %s",
+ DEBUG ("Creating an TpTLSCertificate for path %s, bus name %s",
cert_object_path, bus_name);
- priv->certificate = empathy_tls_certificate_new (dbus, bus_name,
+ priv->certificate = tp_tls_certificate_new (TP_PROXY (priv->channel),
cert_object_path, &error);
if (error != NULL)
{
- DEBUG ("Unable to create the EmpathyTLSCertificate: error %s",
+ DEBUG ("Unable to create the TpTLSCertificate: error %s",
error->message);
g_simple_async_result_set_from_error (priv->async_init_res, error);
return;
}
- empathy_tls_certificate_prepare_async (priv->certificate,
+ tp_proxy_prepare_async (priv->certificate, features,
tls_certificate_prepared_cb, self);
}
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (oclass, PROP_CHANNEL, pspec);
- pspec = g_param_spec_object ("certificate", "The EmpathyTLSCertificate",
- "The EmpathyTLSCertificate carried by the channel.",
- EMPATHY_TYPE_TLS_CERTIFICATE,
+ pspec = g_param_spec_object ("certificate", "The TpTLSCertificate",
+ "The TpTLSCertificate carried by the channel.",
+ TP_TYPE_TLS_CERTIFICATE,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (oclass, PROP_TLS_CERTIFICATE, pspec);
return NULL;
}
-EmpathyTLSCertificate *
+TpTLSCertificate *
empathy_server_tls_handler_get_certificate (EmpathyServerTLSHandler *self)
{
EmpathyServerTLSHandlerPriv *priv = GET_PRIV (self);
#include <glib-object.h>
#include <gio/gio.h>
-#include <telepathy-glib/channel.h>
-
-#include <libempathy/empathy-tls-certificate.h>
+#include <telepathy-glib/telepathy-glib.h>
G_BEGIN_DECLS
EmpathyServerTLSHandler * empathy_server_tls_handler_new_finish (
GAsyncResult *result, GError **error);
-EmpathyTLSCertificate * empathy_server_tls_handler_get_certificate (
+TpTLSCertificate * empathy_server_tls_handler_get_certificate (
EmpathyServerTLSHandler *self);
G_END_DECLS
#include <gnutls/gnutls.h>
#include <gnutls/x509.h>
-#include <telepathy-glib/util.h>
-
#include "empathy-tls-verifier.h"
#include <gcr/gcr.h>
};
typedef struct {
- EmpathyTLSCertificate *certificate;
+ TpTLSCertificate *certificate;
gchar *hostname;
gchar **reference_identities;
static gboolean
verification_output_to_reason (gint res,
guint verify_output,
- EmpTLSCertificateRejectReason *reason)
+ TpTLSCertificateRejectReason *reason)
{
gboolean retval = TRUE;
switch (res)
{
case GNUTLS_E_INSUFFICIENT_CREDENTIALS:
- *reason = EMP_TLS_CERTIFICATE_REJECT_REASON_UNTRUSTED;
+ *reason = TP_TLS_CERTIFICATE_REJECT_REASON_UNTRUSTED;
break;
case GNUTLS_E_CONSTRAINT_ERROR:
- *reason = EMP_TLS_CERTIFICATE_REJECT_REASON_LIMIT_EXCEEDED;
+ *reason = TP_TLS_CERTIFICATE_REJECT_REASON_LIMIT_EXCEEDED;
break;
default:
- *reason = EMP_TLS_CERTIFICATE_REJECT_REASON_UNKNOWN;
+ *reason = TP_TLS_CERTIFICATE_REJECT_REASON_UNKNOWN;
break;
}
retval = FALSE;
if (verify_output & GNUTLS_CERT_SIGNER_NOT_FOUND)
- *reason = EMP_TLS_CERTIFICATE_REJECT_REASON_SELF_SIGNED;
+ *reason = TP_TLS_CERTIFICATE_REJECT_REASON_SELF_SIGNED;
else if (verify_output & GNUTLS_CERT_SIGNER_NOT_CA)
- *reason = EMP_TLS_CERTIFICATE_REJECT_REASON_UNTRUSTED;
+ *reason = TP_TLS_CERTIFICATE_REJECT_REASON_UNTRUSTED;
else if (verify_output & GNUTLS_CERT_INSECURE_ALGORITHM)
- *reason = EMP_TLS_CERTIFICATE_REJECT_REASON_INSECURE;
+ *reason = TP_TLS_CERTIFICATE_REJECT_REASON_INSECURE;
else if (verify_output & GNUTLS_CERT_NOT_ACTIVATED)
- *reason = EMP_TLS_CERTIFICATE_REJECT_REASON_NOT_ACTIVATED;
+ *reason = TP_TLS_CERTIFICATE_REJECT_REASON_NOT_ACTIVATED;
else if (verify_output & GNUTLS_CERT_EXPIRED)
- *reason = EMP_TLS_CERTIFICATE_REJECT_REASON_EXPIRED;
+ *reason = TP_TLS_CERTIFICATE_REJECT_REASON_EXPIRED;
else
- *reason = EMP_TLS_CERTIFICATE_REJECT_REASON_UNKNOWN;
+ *reason = TP_TLS_CERTIFICATE_REJECT_REASON_UNKNOWN;
goto out;
}
static void
abort_verification (EmpathyTLSVerifier *self,
- EmpTLSCertificateRejectReason reason)
+ TpTLSCertificateRejectReason reason)
{
EmpathyTLSVerifierPriv *priv = GET_PRIV (self);
GcrCertificateChain *chain)
{
gboolean ret = FALSE;
- EmpTLSCertificateRejectReason reason =
- EMP_TLS_CERTIFICATE_REJECT_REASON_UNKNOWN;
+ TpTLSCertificateRejectReason reason =
+ TP_TLS_CERTIFICATE_REJECT_REASON_UNKNOWN;
gnutls_x509_crt_t *list, *anchors;
guint n_list, n_anchors;
guint verify_output;
&anchors, &n_anchors);
if (list == NULL || n_list == 0) {
g_warn_if_reached ();
- abort_verification (self, EMP_TLS_CERTIFICATE_REJECT_REASON_UNKNOWN);
+ abort_verification (self, TP_TLS_CERTIFICATE_REJECT_REASON_UNKNOWN);
goto out;
}
g_free (certified_hostname);
abort_verification (self,
- EMP_TLS_CERTIFICATE_REJECT_REASON_HOSTNAME_MISMATCH);
+ TP_TLS_CERTIFICATE_REJECT_REASON_HOSTNAME_MISMATCH);
goto out;
}
oclass->finalize = empathy_tls_verifier_finalize;
oclass->dispose = empathy_tls_verifier_dispose;
- pspec = g_param_spec_object ("certificate", "The EmpathyTLSCertificate",
- "The EmpathyTLSCertificate to be verified.",
- EMPATHY_TYPE_TLS_CERTIFICATE,
+ pspec = g_param_spec_object ("certificate", "The TpTLSCertificate",
+ "The TpTLSCertificate to be verified.",
+ TP_TYPE_TLS_CERTIFICATE,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
g_object_class_install_property (oclass, PROP_TLS_CERTIFICATE, pspec);
}
EmpathyTLSVerifier *
-empathy_tls_verifier_new (EmpathyTLSCertificate *certificate,
- const gchar *hostname, const gchar **reference_identities)
+empathy_tls_verifier_new (TpTLSCertificate *certificate,
+ const gchar *hostname,
+ const gchar **reference_identities)
{
- g_assert (EMPATHY_IS_TLS_CERTIFICATE (certificate));
+ g_assert (TP_IS_TLS_CERTIFICATE (certificate));
g_assert (hostname != NULL);
g_assert (reference_identities != NULL);
{
GcrCertificateChain *chain;
GcrCertificate *cert;
- GPtrArray *cert_data = NULL;
+ GPtrArray *cert_data;
GArray *data;
guint idx;
EmpathyTLSVerifierPriv *priv = GET_PRIV (self);
g_return_if_fail (priv->verify_result == NULL);
- g_object_get (priv->certificate, "cert-data", &cert_data, NULL);
+ cert_data = tp_tls_certificate_get_cert_data (priv->certificate);
g_return_if_fail (cert_data);
priv->verify_result = g_simple_async_result_new (G_OBJECT (self),
NULL, perform_verification_cb, g_object_ref (self));
g_object_unref (chain);
- g_boxed_free (TP_ARRAY_TYPE_UCHAR_ARRAY_LIST, cert_data);
}
gboolean
empathy_tls_verifier_verify_finish (EmpathyTLSVerifier *self,
GAsyncResult *res,
- EmpTLSCertificateRejectReason *reason,
+ TpTLSCertificateRejectReason *reason,
GHashTable **details,
GError **error)
{
}
if (reason != NULL)
- *reason = EMP_TLS_CERTIFICATE_REJECT_REASON_UNKNOWN;
+ *reason = TP_TLS_CERTIFICATE_REJECT_REASON_UNKNOWN;
return TRUE;
}
{
GArray *data;
GcrCertificate *cert;
- GPtrArray *cert_data = NULL;
+ GPtrArray *cert_data;
GError *error = NULL;
EmpathyTLSVerifierPriv *priv = GET_PRIV (self);
- g_object_get (priv->certificate, "cert-data", &cert_data, NULL);
+ cert_data = tp_tls_certificate_get_cert_data (priv->certificate);
g_return_if_fail (cert_data);
if (!cert_data->len)
DEBUG ("Can't store the pinned certificate: %s", error->message);
g_object_unref (cert);
- g_boxed_free (TP_ARRAY_TYPE_UCHAR_ARRAY_LIST, cert_data);
}
#include <glib-object.h>
#include <gio/gio.h>
-#include <libempathy/empathy-tls-certificate.h>
-
-#include <extensions/extensions.h>
+#include <telepathy-glib/telepathy-glib.h>
G_BEGIN_DECLS
EmpathyTLSVerifierClass))
EmpathyTLSVerifier * empathy_tls_verifier_new (
- EmpathyTLSCertificate *certificate,
+ TpTLSCertificate *certificate,
const gchar *hostname,
const gchar **reference_identities);
gboolean empathy_tls_verifier_verify_finish (EmpathyTLSVerifier *self,
GAsyncResult *res,
- EmpTLSCertificateRejectReason *reason,
+ TpTLSCertificateRejectReason *reason,
GHashTable **details,
GError **error);
gint response_id,
gpointer user_data)
{
- EmpathyTLSCertificate *certificate = NULL;
- EmpTLSCertificateRejectReason reason = 0;
+ TpTLSCertificate *certificate = NULL;
+ TpTLSCertificateRejectReason reason = 0;
GHashTable *details = NULL;
EmpathyTLSDialog *tls_dialog = EMPATHY_TLS_DIALOG (dialog);
gboolean remember = FALSE;
if (response_id == GTK_RESPONSE_YES)
{
- empathy_tls_certificate_accept_async (certificate, NULL, NULL);
+ tp_tls_certificate_accept_async (certificate, NULL, NULL);
}
else
{
tp_asv_set_boolean (details, "user-requested", TRUE);
- empathy_tls_certificate_reject_async (certificate, reason, details,
- NULL, NULL);
+ tp_tls_certificate_add_rejection (certificate, reason, NULL,
+ g_variant_new_parsed ("{ 'user-requested': <%b> }", TRUE));
+
+ tp_tls_certificate_reject_async (certificate, NULL, NULL);
}
if (remember)
}
static void
-display_interactive_dialog (EmpathyTLSCertificate *certificate,
+display_interactive_dialog (TpTLSCertificate *certificate,
EmpathyTLSVerifier *verifier,
- EmpTLSCertificateRejectReason reason,
+ TpTLSCertificateRejectReason reason,
GHashTable *details)
{
GtkWidget *tls_dialog;
GAsyncResult *result,
gpointer user_data)
{
- EmpTLSCertificateRejectReason reason;
+ TpTLSCertificateRejectReason reason;
GError *error = NULL;
- EmpathyTLSCertificate *certificate = NULL;
+ TpTLSCertificate *certificate = NULL;
GHashTable *details = NULL;
gchar *hostname = NULL;
}
else
{
- empathy_tls_certificate_accept_async (certificate, NULL, NULL);
+ tp_tls_certificate_accept_async (certificate, NULL, NULL);
}
g_free (hostname);
EmpathyServerTLSHandler *handler,
gpointer user_data)
{
- EmpathyTLSCertificate *certificate = NULL;
+ TpTLSCertificate *certificate = NULL;
gchar *hostname = NULL;
gchar **reference_identities = NULL;
EmpathyTLSVerifier *verifier;
#include <stdio.h>
#include <string.h>
-#include <libempathy/empathy-tls-certificate.h>
#include <libempathy/empathy-tls-verifier.h>
#include "test-helper.h"
#include "mock-pkcs11.h"
#include <gnutls/gnutls.h>
-#include <telepathy-glib/dbus-properties-mixin.h>
-#include <telepathy-glib/enums.h>
-#include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/telepathy-glib.h>
#include <telepathy-glib/svc-tls.h>
#include <telepathy-glib/svc-generic.h>
-#include <telepathy-glib/telepathy-glib.h>
#define MOCK_TLS_CERTIFICATE_PATH "/mock/certificate"
#if 0
static void
mock_tls_certificate_assert_rejected (MockTLSCertificate *self,
- EmpTLSCertificateRejectReason reason)
+ TpTLSCertificateRejectReason reason)
{
GValueArray *rejection;
- EmpTLSCertificateRejectReason rejection_reason;
+ TpTLSCertificateRejectReason rejection_reason;
gchar *rejection_error;
GHashTable *rejection_details;
guint i;
TpDBusDaemon *dbus;
const gchar *dbus_name;
MockTLSCertificate *mock;
- EmpathyTLSCertificate *cert;
+ TpTLSCertificate *cert;
GAsyncResult *result;
} Test;
ensure_certificate_proxy (Test *test)
{
GError *error = NULL;
+ GQuark features[] = { TP_TLS_CERTIFICATE_FEATURE_CORE, 0 };
if (test->cert)
return;
/* Create and prepare a certificate */
- test->cert = empathy_tls_certificate_new (test->dbus, test->dbus_name,
- MOCK_TLS_CERTIFICATE_PATH, &error);
- g_assert_no_error (error);
- empathy_tls_certificate_prepare_async (test->cert, fetch_callback_result, test);
+ /* We don't use tp_tls_certificate_new() as we don't pass a parent */
+ test->cert = g_object_new (TP_TYPE_TLS_CERTIFICATE,
+ "dbus-daemon", test->dbus,
+ "bus-name", test->dbus_name,
+ "object-path", MOCK_TLS_CERTIFICATE_PATH,
+ NULL);
+
+ tp_proxy_prepare_async (test->cert, features, fetch_callback_result, test);
g_main_loop_run (test->loop);
- empathy_tls_certificate_prepare_finish (test->cert, test->result, &error);
+ tp_proxy_prepare_finish (test->cert, test->result, &error);
g_assert_no_error (error);
/* Clear for any future async stuff */
ensure_certificate_proxy (test);
- empathy_tls_certificate_accept_async (test->cert, fetch_callback_result, test);
+ tp_tls_certificate_accept_async (test->cert, fetch_callback_result, test);
g_main_loop_run (test->loop);
- empathy_tls_certificate_accept_finish (test->cert, test->result, &error);
+ tp_tls_certificate_accept_finish (test->cert, test->result, &error);
g_assert_no_error (error);
g_assert (test->mock->state == TP_TLS_CERTIFICATE_STATE_ACCEPTED);
test_certificate_verify_success_with_pkcs11_lookup (Test *test,
gconstpointer data G_GNUC_UNUSED)
{
- EmpTLSCertificateRejectReason reason = 0;
+ TpTLSCertificateRejectReason reason = 0;
GError *error = NULL;
EmpathyTLSVerifier *verifier;
const gchar *reference_identities[] = {
test_certificate_verify_success_with_full_chain (Test *test,
gconstpointer data G_GNUC_UNUSED)
{
- EmpTLSCertificateRejectReason reason = 0;
+ TpTLSCertificateRejectReason reason = 0;
GError *error = NULL;
EmpathyTLSVerifier *verifier;
const gchar *reference_identities[] = {
test_certificate_verify_root_not_found (Test *test,
gconstpointer data G_GNUC_UNUSED)
{
- EmpTLSCertificateRejectReason reason = 0;
+ TpTLSCertificateRejectReason reason = 0;
GError *error = NULL;
EmpathyTLSVerifier *verifier;
const gchar *reference_identities[] = {
/* And it should say we're self-signed (oddly enough) */
g_assert_error (error, G_IO_ERROR,
- EMP_TLS_CERTIFICATE_REJECT_REASON_SELF_SIGNED);
+ TP_TLS_CERTIFICATE_REJECT_REASON_SELF_SIGNED);
g_clear_error (&error);
g_object_unref (verifier);
test_certificate_verify_root_not_anchored (Test *test,
gconstpointer data G_GNUC_UNUSED)
{
- EmpTLSCertificateRejectReason reason = 0;
+ TpTLSCertificateRejectReason reason = 0;
GError *error = NULL;
EmpathyTLSVerifier *verifier;
const gchar *reference_identities[] = {
/* And it should say we're self-signed (oddly enough) */
g_assert_error (error, G_IO_ERROR,
- EMP_TLS_CERTIFICATE_REJECT_REASON_SELF_SIGNED);
+ TP_TLS_CERTIFICATE_REJECT_REASON_SELF_SIGNED);
g_clear_error (&error);
g_object_unref (verifier);
test_certificate_verify_identities_invalid (Test *test,
gconstpointer data G_GNUC_UNUSED)
{
- EmpTLSCertificateRejectReason reason = 0;
+ TpTLSCertificateRejectReason reason = 0;
GError *error = NULL;
EmpathyTLSVerifier *verifier;
const gchar *reference_identities[] = {
/* And it should say we're self-signed (oddly enough) */
g_assert_error (error, G_IO_ERROR,
- EMP_TLS_CERTIFICATE_REJECT_REASON_HOSTNAME_MISMATCH);
+ TP_TLS_CERTIFICATE_REJECT_REASON_HOSTNAME_MISMATCH);
g_clear_error (&error);
g_object_unref (verifier);
test_certificate_verify_uses_reference_identities (Test *test,
gconstpointer data G_GNUC_UNUSED)
{
- EmpTLSCertificateRejectReason reason = 0;
+ TpTLSCertificateRejectReason reason = 0;
GError *error = NULL;
EmpathyTLSVerifier *verifier;
const gchar *reference_identities[] = {
/* And it should say we're self-signed (oddly enough) */
g_assert_error (error, G_IO_ERROR,
- EMP_TLS_CERTIFICATE_REJECT_REASON_HOSTNAME_MISMATCH);
+ TP_TLS_CERTIFICATE_REJECT_REASON_HOSTNAME_MISMATCH);
g_clear_error (&error);
g_object_unref (verifier);
test_certificate_verify_success_with_pinned (Test *test,
gconstpointer data G_GNUC_UNUSED)
{
- EmpTLSCertificateRejectReason reason = 0;
+ TpTLSCertificateRejectReason reason = 0;
GError *error = NULL;
EmpathyTLSVerifier *verifier;
const gchar *reference_identities[] = {
test_certificate_verify_pinned_wrong_host (Test *test,
gconstpointer data G_GNUC_UNUSED)
{
- EmpTLSCertificateRejectReason reason = 0;
+ TpTLSCertificateRejectReason reason = 0;
GError *error = NULL;
EmpathyTLSVerifier *verifier;
const gchar *reference_identities[] = {
/* And it should say we're self-signed */
g_assert_error (error, G_IO_ERROR,
- EMP_TLS_CERTIFICATE_REJECT_REASON_SELF_SIGNED);
+ TP_TLS_CERTIFICATE_REJECT_REASON_SELF_SIGNED);
g_clear_error (&error);
g_object_unref (verifier);