Initialize the certificate before we try to use it. Ahem.
authorJoe Shaw <joe@ximian.com>
Thu, 29 Jan 2004 17:36:57 +0000 (17:36 +0000)
committerJoe Shaw <joeshaw@src.gnome.org>
Thu, 29 Jan 2004 17:36:57 +0000 (17:36 +0000)
2004-01-29  Joe Shaw  <joe@ximian.com>

* libsoup/soup-gnutls.c (verify_certificate): Initialize the
certificate before we try to use it.  Ahem.

ChangeLog
libsoup/soup-gnutls.c

index bdccc62..5b2885d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-01-29  Joe Shaw  <joe@ximian.com>
+
+       * libsoup/soup-gnutls.c (verify_certificate): Initialize the
+       certificate before we try to use it.  Ahem.
+
 2004-01-23  Joe Shaw  <joe@ximian.com>
 
        * configure.in: Bump version to 2.1.5 and SOUP_RELEASE to 2
index 9327097..88ea0cc 100644 (file)
@@ -78,6 +78,11 @@ verify_certificate (gnutls_session session, const char *hostname)
                const gnutls_datum* cert_list;
                int cert_list_size;
                gnutls_x509_crt cert;
+
+               if (gnutls_x509_crt_init (&cert) < 0) {
+                       g_warning ("Error initializing certificate.");
+                       return FALSE;
+               }
       
                cert_list = gnutls_certificate_get_peers (
                        session, &cert_list_size);