- Add debug code to spit a list of all certificates in all pools when soc.2007.certmgr

Tue, 17 Jul 2007 00:28:55 +0000

author
William Ehlhardt <williamehlhardt@gmail.com>
date
Tue, 17 Jul 2007 00:28:55 +0000
branch
soc.2007.certmgr
changeset 18664
47b3d40a2eb8
parent 18663
4b8a5bbdba2b
child 18814
f82e81551d63

- Add debug code to spit a list of all certificates in all pools when
the "Certificates" dialog is opened.

pidgin/gtkcertmgr.c file | annotate | diff | comparison | revisions
--- 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 */
+	}
 }

mercurial