# HG changeset patch # User William Ehlhardt # Date 1183852753 0 # Node ID 33fb4930ad2b7c107e9bad025434e17bde9870e7 # Parent 605e69fa7108cfa4f35761fa4ac2d5580fee53c2 - Add x509_tls_cached skeleton diff -r 605e69fa7108 -r 33fb4930ad2b libpurple/certificate.c --- a/libpurple/certificate.c Sat Jul 07 23:50:47 2007 +0000 +++ b/libpurple/certificate.c Sat Jul 07 23:59:13 2007 +0000 @@ -391,7 +391,29 @@ x509_tls_peers_get_cert, /* Cert retriever */ x509_tls_peers_put_cert /* Cert writer */ }; - + + + +static PurpleCertificateVerifier x509_tls_cached; + +static void +x509_tls_cached_start_verify(PurpleCertificateVerificationRequest *vrq) +{ + g_return_if_fail(vrq); +} + +static void +x509_tls_cached_destroy_request(PurpleCertificateVerificationRequest *vrq) +{ + g_return_if_fail(vrq); +} + +static PurpleCertificateVerifier x509_tls_cached = { + "x509", /* Scheme name */ + "tls_cached", /* Verifier name */ + x509_tls_cached_start_verify, /* Verification begin */ + x509_tls_cached_destroy_request /* Request cleanup */ +}; /****************************************************************************/ /* Subsystem */ @@ -402,6 +424,7 @@ /* Register builtins */ purple_certificate_register_verifier(&x509_singleuse); purple_certificate_register_pool(&x509_tls_peers); + purple_certificate_register_verifier(&x509_tls_cached); } void @@ -410,6 +433,7 @@ /* Unregister the builtins */ purple_certificate_unregister_verifier(&x509_singleuse); purple_certificate_unregister_pool(&x509_tls_peers); + purple_certificate_unregister_verifier(&x509_tls_cached); /* TODO: Unregistering everything would be good... */ }