diff options
author | Stef Walter <stefw@collabora.co.uk> | 2010-12-07 06:47:13 +0800 |
---|---|---|
committer | Stef Walter <stefw@collabora.co.uk> | 2010-12-24 21:40:02 +0800 |
commit | 636f502149f77a80ef1b79cfc6d2da4b20c6ec7c (patch) | |
tree | bc1c0f6ecf297adb62d697bf9d4d702ed1692993 | |
parent | 59384754d15dc9340466dbb69ad615ffc76ffb6a (diff) | |
download | gsoc2013-empathy-636f502149f77a80ef1b79cfc6d2da4b20c6ec7c.tar gsoc2013-empathy-636f502149f77a80ef1b79cfc6d2da4b20c6ec7c.tar.gz gsoc2013-empathy-636f502149f77a80ef1b79cfc6d2da4b20c6ec7c.tar.bz2 gsoc2013-empathy-636f502149f77a80ef1b79cfc6d2da4b20c6ec7c.tar.lz gsoc2013-empathy-636f502149f77a80ef1b79cfc6d2da4b20c6ec7c.tar.xz gsoc2013-empathy-636f502149f77a80ef1b79cfc6d2da4b20c6ec7c.tar.zst gsoc2013-empathy-636f502149f77a80ef1b79cfc6d2da4b20c6ec7c.zip |
libempathy: Use new gcr functions properly and fix build.
libgcr now uses single header include model.
-rw-r--r-- | libempathy/empathy-tls-verifier.c | 16 |
1 files changed, 12 insertions, 4 deletions
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 <gcr/gcr-simple-certificate.h> -#include <gcr/gcr-trust.h> +#include <gcr/gcr.h> #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); |