summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Ehlhardt <williamehlhardt@gmail.com>2007-08-12 03:44:44 +0000
committerWilliam Ehlhardt <williamehlhardt@gmail.com>2007-08-12 03:44:44 +0000
commitaa75321dc6de8da3e5efb91ee0f1f987a3d3d3d4 (patch)
tree28fb4bca4f96f56d68702ca882dbcda33061d290
parent88a53136927bf1a45a1d1616c4b40a991d7c6f9c (diff)
downloadpidgin-aa75321dc6de8da3e5efb91ee0f1f987a3d3d3d4.tar.gz
- x509_ca_lazy_init is more implemented
- Cosmetics
-rw-r--r--libpurple/certificate.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/libpurple/certificate.c b/libpurple/certificate.c
index 76ff5ccb03..cecb8b9683 100644
--- a/libpurple/certificate.c
+++ b/libpurple/certificate.c
@@ -612,11 +612,25 @@ static gboolean x509_ca_initialized = FALSE;
static gboolean
x509_ca_lazy_init(void)
{
+ PurpleCertificateScheme *x509;
+
if (x509_ca_initialized) return TRUE;
+ /* Check that X.509 is registered */
+ x509 = purple_certificate_find_scheme(x509_ca.scheme_name);
+ if ( !x509 ) {
+ purple_debug_info("certificate/x509/ca",
+ "Lazy init failed because an X.509 Scheme "
+ "is not yet registered. Maybe it will be "
+ "better later.\n");
+ return FALSE;
+ }
+
/* Populate the certificates pool from the system path */
/* TODO: Writeme! */
-
+
+ purple_debug_info("certificate/x509/ca",
+ "Lazy init completed.\n");
x509_ca_initialized = TRUE;
return TRUE;
}
@@ -628,7 +642,7 @@ x509_ca_init(void)
it will get done later */
if ( ! x509_ca_lazy_init()) {
purple_debug_info("certificate/x509/ca",
- "Lazy init failed, probably because a "
+ "Init failed, probably because a "
"dependency is not yet registered. "
"It has been deferred to later.\n");
}