changeset 19021:fcca10d0ac7d

- purple_certificate_verify no longer takes possession of the certificate chain given. - GnuTLS SSL plugin updated with the implications of above
author William Ehlhardt <williamehlhardt@gmail.com>
date Fri, 13 Jul 2007 09:09:52 +0000
parents d69355001a6e
children 1f07f96dc1ce
files libpurple/certificate.c libpurple/certificate.h libpurple/plugins/ssl/ssl-gnutls.c
diffstat 3 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/certificate.c	Fri Jul 13 09:02:45 2007 +0000
+++ b/libpurple/certificate.c	Fri Jul 13 09:09:52 2007 +0000
@@ -70,7 +70,7 @@
 	vrq->verifier = verifier;
 	vrq->scheme = scheme;
 	vrq->subject_name = g_strdup(subject_name);
-	vrq->cert_chain = cert_chain;
+	vrq->cert_chain = purple_certificate_copy_list(cert_chain);
 	vrq->cb = cb;
 	vrq->cb_data = cb_data;
 
--- a/libpurple/certificate.h	Fri Jul 13 09:02:45 2007 +0000
+++ b/libpurple/certificate.h	Fri Jul 13 09:09:52 2007 +0000
@@ -341,7 +341,8 @@
  * @param cert_chain    Certificate chain to check. If there is more than one
  *                      certificate in the chain (X.509), the peer's
  *                      certificate comes first, then the issuer/signer's
- *                      certificate, etc.
+ *                      certificate, etc. The whole list is duplicated into the
+ *                      Request struct.
  *
  * @param cb            Callback function to be called with whether the
  *                      certificate was approved or not.
--- a/libpurple/plugins/ssl/ssl-gnutls.c	Fri Jul 13 09:02:45 2007 +0000
+++ b/libpurple/plugins/ssl/ssl-gnutls.c	Fri Jul 13 09:09:52 2007 +0000
@@ -236,7 +236,8 @@
 						  peers,
 						  ssl_gnutls_verified_cb,
 						  gsc);
-						  
+
+			purple_certificate_destroy_list(peers);
 		} else {
 			/* Otherwise, just call the "connection complete"
 			   callback */