# HG changeset patch # User William Ehlhardt # Date 1182545372 0 # Node ID 5fa287322a8249cc3cdc398717aee4cda09d351e # Parent f46ec4d6a38580432435caae2a1d2e4578d22f95 - Fill out CertVerifier struct - CertVerifiers now record only the name of the CertScheme they operate on, which is looked up when a request actually needs to be generated. diff -r f46ec4d6a385 -r 5fa287322a82 libpurple/certificate.h --- a/libpurple/certificate.h Fri Jun 22 16:30:30 2007 +0000 +++ b/libpurple/certificate.h Fri Jun 22 20:49:32 2007 +0000 @@ -47,6 +47,17 @@ typedef struct _PurpleCertificateVerifier PurpleCertificateVerifier; typedef struct _PurpleCertificateVerificationRequest PurpleCertificateVerificationRequest; +/** + * Callback function for the results of a verification check + * @param vrq Request structure operated on + * @param st Status code + * @param userdata User-defined data + */ +typedef void (*PurpleCertificateVerifiedCallback) + (PurpleCertificateVerificationRequest *vrq, + PurpleCertificateVerificationStatus, + gpointer userdata); + /** A certificate instance * * An opaque data structure representing a single certificate under some @@ -150,15 +161,16 @@ * authenticity. */ struct _PurpleCertificateVerifier -{ - /** Scheme this Verifier operates on */ - PurpleCertificateScheme *scheme; - - /** Internal name used for lookups +{ + /** Name of the Verifier - case insensitive */ + gchar *name; + + /** Name of the scheme this Verifier operates on * - * Case insensitive + * The scheme will be looked up by name when a Request is generated + * using this Verifier */ - gchar * name; + gchar *scheme_name; }; /** Structure for a single certificate request @@ -171,7 +183,8 @@ /** Reference to the verification logic used */ PurpleCertificateVerifier *verifier; - /** Certificate subject's name. + /** + * Name to check that the certificate is issued to * * For X.509 certificates, this is the Common Name */ @@ -185,7 +198,12 @@ GList *cert_chain; /** Internal data used by the Verifier code */ - gpointer *data; + gpointer data; + + /** Function to call with the verification result */ + PurpleCertificateVerifiedCallback cb; + /** Data to pass to the post-verification callback */ + gpointer cb_data; }; /*****************************************************************************/