From 20a75e4d53bb2b72de3f2fc535956a9ad57b9eb4 Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Thu, 12 Aug 2010 18:47:42 +0200 Subject: Cosmetic changes --- libempathy/empathy-tls-verifier.c | 11 +++++++---- 1 file changed, 7 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 07beda63b..e1ec7ee6d 100644 --- a/libempathy/empathy-tls-verifier.c +++ b/libempathy/empathy-tls-verifier.c @@ -182,6 +182,8 @@ verify_certificate (EmpathyTLSVerifier *self, res = gnutls_x509_crt_verify (cert, &issuer, 1, 0, &verify_output); + DEBUG ("Verifying %p against %p, output %u", cert, issuer, verify_output); + return verification_output_to_reason (res, verify_output, reason); } @@ -368,20 +370,21 @@ get_number_and_type_of_certificates (gnutls_datum_t *datum, gnutls_x509_crt_fmt_t *format) { gnutls_x509_crt_t fake; - gint retval = 1; + guint retval = 1; gint res; - res = gnutls_x509_crt_list_import (&fake, (guint *) &retval, datum, - GNUTLS_X509_FMT_PEM, 0); + res = gnutls_x509_crt_list_import (&fake, &retval, datum, + GNUTLS_X509_FMT_PEM, GNUTLS_X509_CRT_LIST_IMPORT_FAIL_IF_EXCEED); if (res == GNUTLS_E_SHORT_MEMORY_BUFFER || res > 0) { + DEBUG ("Found PEM, with %u certificates", retval); *format = GNUTLS_X509_FMT_PEM; return retval; } /* try DER */ - res = gnutls_x509_crt_list_import (&fake, (guint *) &retval, datum, + res = gnutls_x509_crt_list_import (&fake, &retval, datum, GNUTLS_X509_FMT_DER, 0); if (res > 0) -- cgit v1.2.3