summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2013-03-12 11:11:02 +0100
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2013-06-10 15:13:38 +0100
commit02b70ab2cffc399846fba5f94aff937963d170a4 (patch)
treeda1ea43e40d6800172f40849b911dfc96c535101
parentccbcb74e39d92ddc44fe2e86816ba8dfa7a27daa (diff)
downloadtelepathy-glib-02b70ab2cffc399846fba5f94aff937963d170a4.tar.gz
tls-certificate: invalidate the proxy if CertificateChainData is missing
We shouldn't assert if the CM is broken. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=61616 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
-rw-r--r--telepathy-glib/tls-certificate.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/telepathy-glib/tls-certificate.c b/telepathy-glib/tls-certificate.c
index 2a2de5bdb..0f465d21c 100644
--- a/telepathy-glib/tls-certificate.c
+++ b/telepathy-glib/tls-certificate.c
@@ -250,7 +250,18 @@ tls_certificate_got_all_cb (TpProxy *proxy,
cert_data = tp_asv_get_boxed (properties, "CertificateChainData",
TP_ARRAY_TYPE_UCHAR_ARRAY_LIST);
- g_assert (cert_data != NULL);
+
+ if (cert_data == NULL)
+ {
+ GError e = { TP_DBUS_ERRORS, TP_DBUS_ERROR_INCONSISTENT,
+ "Missing CertificateChainData property" };
+
+ DEBUG ("Missing CertificateChainData property on %s",
+ tp_proxy_get_object_path (self));
+
+ tp_proxy_invalidate (proxy, &e);
+ return;
+ }
self->priv->cert_data = g_ptr_array_new_with_free_func (
(GDestroyNotify) g_bytes_unref);