comparison libpurple/certificate.h @ 18942:02102eccc4be

- purple_certificate_verify now takes a Verifier argument, creates its own VerificationRequest, amd may callback immediately
author William Ehlhardt <williamehlhardt@gmail.com>
date Sat, 23 Jun 2007 00:04:49 +0000
parents 425f494bd1ec
children fa42d8fa7873
comparison
equal deleted inserted replaced
18941:425f494bd1ec 18942:02102eccc4be
202 PurpleCertificateVerifier *verifier; 202 PurpleCertificateVerifier *verifier;
203 /** Reference to the scheme used. 203 /** Reference to the scheme used.
204 * 204 *
205 * This is looked up from the Verifier when the Request is generated 205 * This is looked up from the Verifier when the Request is generated
206 */ 206 */
207 PurpleCertificateScheme *scheme;
207 208
208 /** 209 /**
209 * Name to check that the certificate is issued to 210 * Name to check that the certificate is issued to
210 * 211 *
211 * For X.509 certificates, this is the Common Name 212 * For X.509 certificates, this is the Common Name
226 PurpleCertificateVerifiedCallback cb; 227 PurpleCertificateVerifiedCallback cb;
227 /** Data to pass to the post-verification callback */ 228 /** Data to pass to the post-verification callback */
228 gpointer cb_data; 229 gpointer cb_data;
229 }; 230 };
230 231
232 /**
233 * Constructs a verification request and passed control to the specified Verifier
234 *
235 * It is possible that the callback will be called immediately upon calling
236 * this function. Plan accordingly.
237 *
238 * @param verifier Verification logic to use.
239 * @see purple_certificate_find_verifier()
240 *
241 * @param subject_name Name that should match the first certificate in the
242 * chain for the certificate to be valid. Will be strdup'd
243 * into the Request struct
244 *
245 * @param cert_chain Certificate chain to check. If there is more than one
246 * certificate in the chain (X.509), the peer's
247 * certificate comes first, then the issuer/signer's
248 * certificate, etc.
249 *
250 * @param cb Callback function to be called with whether the
251 * certificate was approved or not.
252 * @param cb_data User-defined data for the above.
253 */
254 void
255 purple_certificate_verify (PurpleCertificateVerifier *verifier,
256 const gchar *subject_name, GList *cert_chain,
257 PurpleCertificateVerifiedCallback cb,
258 gpointer cb_data);
259
231 /*****************************************************************************/ 260 /*****************************************************************************/
232 /** @name PurpleCertificate Subsystem API */ 261 /** @name PurpleCertificate Subsystem API */
233 /*****************************************************************************/ 262 /*****************************************************************************/
234 /*@{*/ 263 /*@{*/
235 264