diff libpurple/certificate.c @ 18946:617447a71ab7

- Add certificate_destroy and certificate_destroy_list
author William Ehlhardt <williamehlhardt@gmail.com>
date Sat, 23 Jun 2007 19:47:58 +0000
parents c519ff185569
children 3c6bf77bf7c4
line wrap: on
line diff
--- a/libpurple/certificate.c	Sat Jun 23 19:28:57 2007 +0000
+++ b/libpurple/certificate.c	Sat Jun 23 19:47:58 2007 +0000
@@ -73,6 +73,33 @@
 	(verifier->start_verification)(vrq);
 }
 
+void
+purple_certificate_destroy (PurpleCertificate *crt)
+{
+	PurpleCertificateScheme *scheme;
+	
+	if (NULL == crt) return;
+
+	scheme = crt->scheme;
+
+	(scheme->destroy_certificate)(crt);
+}
+
+void
+purple_certificate_destroy_list (GList * crt_list)
+{
+	PurpleCertificate *crt;
+	GList *l;
+
+	for (l=crt_list; l; l = l->next) {
+		crt = (PurpleCertificate *) l->data;
+		purple_certificate_destroy(crt);
+	}
+
+	g_list_free(crt_list);
+}
+
+
 PurpleCertificateScheme *
 purple_certificate_find_scheme(const gchar *name)
 {