Mercurial > pidgin.yaz
comparison libpurple/certificate.h @ 18947:3c6bf77bf7c4
- Add purple_certificate_verify_destroy and associated machinery
author | William Ehlhardt <williamehlhardt@gmail.com> |
---|---|
date | Sat, 23 Jun 2007 20:34:07 +0000 |
parents | 617447a71ab7 |
children | f78a9efa9eaf |
comparison
equal
deleted
inserted
replaced
18946:617447a71ab7 | 18947:3c6bf77bf7c4 |
---|---|
47 typedef struct _PurpleCertificateVerifier PurpleCertificateVerifier; | 47 typedef struct _PurpleCertificateVerifier PurpleCertificateVerifier; |
48 typedef struct _PurpleCertificateVerificationRequest PurpleCertificateVerificationRequest; | 48 typedef struct _PurpleCertificateVerificationRequest PurpleCertificateVerificationRequest; |
49 | 49 |
50 /** | 50 /** |
51 * Callback function for the results of a verification check | 51 * Callback function for the results of a verification check |
52 * @param vrq Request structure operated on | |
53 * @param st Status code | 52 * @param st Status code |
54 * @param userdata User-defined data | 53 * @param userdata User-defined data |
55 */ | 54 */ |
56 typedef void (*PurpleCertificateVerifiedCallback) | 55 typedef void (*PurpleCertificateVerifiedCallback) |
57 (PurpleCertificateVerificationRequest *vrq, | 56 (PurpleCertificateVerificationStatus, |
58 PurpleCertificateVerificationStatus, | |
59 gpointer userdata); | 57 gpointer userdata); |
60 | 58 |
61 /** A certificate instance | 59 /** A certificate instance |
62 * | 60 * |
63 * An opaque data structure representing a single certificate under some | 61 * An opaque data structure representing a single certificate under some |
187 * the requester with the verification results. | 185 * the requester with the verification results. |
188 * | 186 * |
189 * @param vrq Request to process | 187 * @param vrq Request to process |
190 */ | 188 */ |
191 void (* start_verification)(PurpleCertificateVerificationRequest *vrq); | 189 void (* start_verification)(PurpleCertificateVerificationRequest *vrq); |
190 | |
191 /** | |
192 * Destroy a completed Request under this Verifier | |
193 * | |
194 * @param vrq Request to destroy | |
195 */ | |
196 void (* destroy_request)(PurpleCertificateVerificationRequest *vrq); | |
192 }; | 197 }; |
193 | 198 |
194 /** Structure for a single certificate request | 199 /** Structure for a single certificate request |
195 * | 200 * |
196 * Useful for keeping track of the state of a verification that involves | 201 * Useful for keeping track of the state of a verification that involves |
261 const gchar *subject_name, GList *cert_chain, | 266 const gchar *subject_name, GList *cert_chain, |
262 PurpleCertificateVerifiedCallback cb, | 267 PurpleCertificateVerifiedCallback cb, |
263 gpointer cb_data); | 268 gpointer cb_data); |
264 | 269 |
265 /** | 270 /** |
271 * Disposes of a VerificationRequest once it is complete | |
272 * | |
273 * @param vrq Request to destroy. Will be free()'d. | |
274 * The certificate chain involved will also be destroyed. | |
275 */ | |
276 void | |
277 purple_certificate_verify_destroy (PurpleCertificateVerificationRequest *vrq); | |
278 | |
279 /** | |
266 * Destroys and free()'s a Certificate | 280 * Destroys and free()'s a Certificate |
267 * | 281 * |
268 * @param crt Instance to destroy. May be NULL. | 282 * @param crt Instance to destroy. May be NULL. |
269 */ | 283 */ |
270 void | 284 void |