[empathy] libempathy: Use new gcr functions properly and fix build.
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] libempathy: Use new gcr functions properly and fix build.
- Date: Fri, 24 Dec 2010 14:05:38 +0000 (UTC)
commit 636f502149f77a80ef1b79cfc6d2da4b20c6ec7c
Author: Stef Walter <stefw collabora co uk>
Date: Mon Dec 6 22:47:13 2010 +0000
libempathy: Use new gcr functions properly and fix build.
libgcr now uses single header include model.
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 7bf8dae..a0feb77 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]