From 636f502149f77a80ef1b79cfc6d2da4b20c6ec7c Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Mon, 6 Dec 2010 22:47:13 +0000 Subject: libempathy: Use new gcr functions properly and fix build. libgcr now uses single header include model. --- libempathy/empathy-tls-verifier.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'libempathy/empathy-tls-verifier.c') diff --git a/libempathy/empathy-tls-verifier.c b/libempathy/empathy-tls-verifier.c index 7bf8daeb8..a0feb77e8 100644 --- a/libempathy/empathy-tls-verifier.c +++ b/libempathy/empathy-tls-verifier.c @@ -28,8 +28,7 @@ #include "empathy-tls-verifier.h" -#include -#include +#include #define DEBUG_FLAG EMPATHY_DEBUG_TLS #include "empathy-debug.h" @@ -185,6 +184,7 @@ build_certificate_chain_for_gnutls (EmpathyTLSVerifier *self, GPtrArray *chain; gnutls_x509_crt_t *result; GArray *cert_data; + GError *error = NULL; GcrCertificate *cert; GcrCertificate *anchor; guint idx; @@ -234,9 +234,17 @@ build_certificate_chain_for_gnutls (EmpathyTLSVerifier *self, if (gcr_certificate_is_issuer (cert, cert)) break; - cert = gcr_pkcs11_certificate_lookup_for_issuer (cert); + cert = gcr_pkcs11_certificate_lookup_issuer (cert, NULL, &error); if (cert == NULL) - break; + { + if (error != NULL) + { + DEBUG ("Lookup of certificate in PKCS#11 store failed: %s", + error->message); + g_clear_error (&error); + } + break; + } /* Add this to the chain */ g_ptr_array_add (chain, cert); -- cgit v1.2.3