# HG changeset patch # User William Ehlhardt # Date 1186891425 0 # Node ID 81163e1537783cf5db6830d212cb5c795f0abe6c # Parent cd70e75f9a83f014f74aa340e964be1c7cecf5da - Add a hacked-up method of adding certs to the CA pool diff -r cd70e75f9a83 -r 81163e153778 libpurple/certificate.c --- a/libpurple/certificate.c Sun Aug 12 03:44:44 2007 +0000 +++ b/libpurple/certificate.c Sun Aug 12 04:03:45 2007 +0000 @@ -692,6 +692,7 @@ x509_ca_put_cert(const gchar *id, PurpleCertificate *crt) { gboolean ret = FALSE; + x509_ca_element *el; g_return_val_if_fail(x509_ca_lazy_init(), FALSE); g_return_val_if_fail(crt, FALSE); @@ -700,6 +701,14 @@ /* TODO: Perhaps just check crt->scheme->name instead? */ g_return_val_if_fail(crt->scheme == purple_certificate_find_scheme(x509_ca.scheme_name), FALSE); + /* TODO: This is a quick way of doing this. At some point the change + ought to be flushed to disk somehow. */ + el = g_new0(x509_ca_element, 1); + el->dn = purple_certificate_get_unique_id(crt); + el->crt = purple_certificate_copy(crt); + x509_ca_certs = g_list_prepend(x509_ca_certs, el); + ret = TRUE; + return ret; }