# HG changeset patch # User William Ehlhardt # Date 1186983633 0 # Node ID 6034b8db9dc1e045fe06a1bf0190ddee8e83957e # Parent c0949e081f4382e562506d157faeed3ea2747932 - Add a function to search the x509_ca internal structures for an id diff -r c0949e081f43 -r 6034b8db9dc1 libpurple/certificate.c --- a/libpurple/certificate.c Mon Aug 13 05:35:06 2007 +0000 +++ b/libpurple/certificate.c Mon Aug 13 05:40:33 2007 +0000 @@ -727,6 +727,22 @@ x509_ca_initialized = FALSE; } +/** Look up a ca_element by dn */ +static x509_ca_element * +x509_ca_locate_crt(GList *lst, const gchar *dn) +{ + GList *cur; + + for (cur = lst; cur; cur = cur->next) { + x509_ca_element *el = cur->data; + /* TODO: Unsafe? */ + if ( !strcmp(dn, el->dn) ) { + return el; + } + } + return NULL; +} + static gboolean x509_ca_cert_in_pool(const gchar *id) {