Mercurial > pidgin.yaz
changeset 18957:9205841eed06
- Certificate system now has init and uninit like other systems
author | William Ehlhardt <williamehlhardt@gmail.com> |
---|---|
date | Wed, 27 Jun 2007 00:16:58 +0000 |
parents | 014e0cd9e471 |
children | db67f6b39b72 |
files | libpurple/certificate.c libpurple/certificate.h libpurple/core.c |
diffstat | 3 files changed, 22 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/certificate.c Tue Jun 26 23:57:16 2007 +0000 +++ b/libpurple/certificate.c Wed Jun 27 00:16:58 2007 +0000 @@ -224,11 +224,21 @@ /* Subsystem */ /****************************************************************************/ void -purple_certificate_register_builtins(void) +purple_certificate_init(void) { + /* Register builtins */ purple_certificate_register_verifier(&x509_singleuse); } +void +purple_certificate_uninit(void) +{ + /* Unregister the builtins */ + purple_certificate_unregister_verifier(&x509_singleuse); + + /* TODO: Unregistering everything would be good... */ +} + PurpleCertificateScheme * purple_certificate_find_scheme(const gchar *name) {
--- a/libpurple/certificate.h Tue Jun 26 23:57:16 2007 +0000 +++ b/libpurple/certificate.h Wed Jun 27 00:16:58 2007 +0000 @@ -314,11 +314,16 @@ /*@{*/ /** - * Registers the "universal" PurpleCertificateVerifier and - * PurpleCertificatePool types that libpurple knows about + * Initialize the certificate system */ void -purple_certificate_register_builtins(void); +purple_certificate_init(void); + +/** + * Un-initialize the certificate system + */ +void +purple_certificate_uninit(void); /** Look up a registered CertificateScheme by name * @param name The scheme name. Case insensitive.
--- a/libpurple/core.c Tue Jun 26 23:57:16 2007 +0000 +++ b/libpurple/core.c Wed Jun 27 00:16:58 2007 +0000 @@ -24,6 +24,7 @@ */ #include "internal.h" #include "cipher.h" +#include "certificate.h" #include "connection.h" #include "conversation.h" #include "core.h" @@ -141,6 +142,7 @@ purple_accounts_init(); purple_savedstatuses_init(); purple_notify_init(); + purple_certificate_init(); purple_connections_init(); purple_conversations_init(); purple_blist_init(); @@ -191,6 +193,7 @@ purple_notify_uninit(); purple_conversations_uninit(); purple_connections_uninit(); + purple_certificate_uninit(); purple_buddy_icons_uninit(); purple_accounts_uninit(); purple_savedstatuses_uninit();