# HG changeset patch # User William Ehlhardt # Date 1184317792 0 # Node ID fcca10d0ac7da23ee5ffd0dcbb9f30040be94ff1 # Parent d69355001a6e6a3f38f905e73c10604eaf7c1b65 - purple_certificate_verify no longer takes possession of the certificate chain given. - GnuTLS SSL plugin updated with the implications of above diff -r d69355001a6e -r fcca10d0ac7d libpurple/certificate.c --- 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; diff -r d69355001a6e -r fcca10d0ac7d libpurple/certificate.h --- 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. diff -r d69355001a6e -r fcca10d0ac7d libpurple/plugins/ssl/ssl-gnutls.c --- 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 */