changeset 19029:3f929a770f1b

- Add debug code to spit a list of all certificates in all pools when the "Certificates" dialog is opened.
author William Ehlhardt <williamehlhardt@gmail.com>
date Tue, 17 Jul 2007 00:28:55 +0000
parents 86403f33720b
children 7d0c12b5dda8
files pidgin/gtkcertmgr.c
diffstat 1 files changed, 26 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkcertmgr.c	Tue Jul 17 00:15:40 2007 +0000
+++ b/pidgin/gtkcertmgr.c	Tue Jul 17 00:28:55 2007 +0000
@@ -28,6 +28,7 @@
 #include "pidgin.h"
 
 #include "certificate.h"
+#include "debug.h"
 #include "notify.h"
 
 #include "gtkcertmgr.h"
@@ -35,4 +36,29 @@
 void pidgin_certmgr_show(void)
 {
 	purple_notify_info(NULL, "Certificate Manager!!!1", "Certificates!!!", "LOL");
+	/* Enumerate all the certificates on file */
+	{
+		GList *idlist, *poollist;
+
+		for ( poollist = purple_certificate_get_pools();
+		      poollist;
+		      poollist = poollist->next ) {
+			PurpleCertificatePool *pool = poollist->data;
+			GList *l;
+			
+			purple_debug_info("gtkcertmgr",
+					  "Pool %s found for scheme %s -"
+					  "Enumerating certificates:\n",
+					  pool->name, pool->scheme_name);
+
+			idlist = purple_certificate_pool_get_idlist(pool);
+
+			for (l=idlist; l; l = l->next) {
+				purple_debug_info("gtkcertmgr",
+						  "- %s\n",
+						  (gchar *) l->data);
+			} /* idlist */
+			purple_certificate_pool_destroy_idlist(idlist);
+		} /* poollist */
+	}
 }