cpw.ljfisher.ssl_client_auth: 6ec978e7: Sort certificate list show to user in ac...

lucas.fisher at gmail.com lucas.fisher at gmail.com
Fri Mar 9 23:41:39 EST 2012


----------------------------------------------------------------------
Revision: 6ec978e7759514d22dc8c01205136c2d0d52c7f3
Parent:   3ff95f1e9d3a97ff17985d90a993bfbc79274247
Author:   lucas.fisher at gmail.com
Date:     01/30/12 23:12:12
Branch:   im.pidgin.cpw.ljfisher.ssl_client_auth
URL: http://d.pidgin.im/viewmtn/revision/info/6ec978e7759514d22dc8c01205136c2d0d52c7f3

Changelog: 

Sort certificate list show to user in account options

Changes against parent 3ff95f1e9d3a97ff17985d90a993bfbc79274247

  patched  libpurple/protocols/jabber/libxmpp.c

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/libxmpp.c	bb0a6be59335e919d7ae26797830a81a1e9d09b8
+++ libpurple/protocols/jabber/libxmpp.c	85350d8f9d7d30a491fecb7c53a37ece2892f2c3
@@ -293,7 +293,6 @@ GList* jabber_get_account_options()
 	options = g_list_append(options, option);
 
 	
-	ADD_VALUE(certificates, _(""), "");
 	cert_pool = purple_certificate_find_pool("x509", "user");
 	key_pool = purple_privatekey_find_pool("x509", "user");
 	if (cert_pool && key_pool) {
@@ -311,12 +310,15 @@ GList* jabber_get_account_options()
 				kvp->key = purple_certificate_get_subject_name(cert);
 				kvp->value = g_strdup(id);
 				certificates = g_list_append(certificates, kvp);
+				purple_certificate_destroy(cert);
 				purple_debug_info("xmpp/accountopt", "added cert %s to acct opt list\n", id);
 			}
 			else {
 				purple_debug_warning("xmpp/accountopt", "Failed to find cert for id %s\n", id);
 			}
 		}
+		g_list_sort(certificates, g_strcmp0);
+		ADD_VALUE(certificates, _("None"), "");
 		purple_privatekey_pool_destroy_idlist(id_list);
 	}
 


More information about the Commits mailing list