comparison libpurple/certificate.h @ 19008:7fd9bd55f8d0

- Add certificate_check_subject_name and associated machinery - Update GnuTLS to support the above - tls_cached verifier now uses check_subject_name instead of strcmp
author William Ehlhardt <williamehlhardt@gmail.com>
date Mon, 09 Jul 2007 03:47:36 +0000
parents 8228c5b1d181
children b64aa0222a7a
comparison
equal deleted inserted replaced
19007:8228c5b1d181 19008:7fd9bd55f8d0
211 * @param crt Certificate instance 211 * @param crt Certificate instance
212 * @return Newly allocated string with the certificate subject. 212 * @return Newly allocated string with the certificate subject.
213 */ 213 */
214 gchar * (* get_subject_name)(PurpleCertificate *crt); 214 gchar * (* get_subject_name)(PurpleCertificate *crt);
215 215
216 /**
217 * Check the subject name against that on the certificate
218 * @see purple_certificate_check_subject_name()
219 * @return TRUE if it is a match, else FALSE
220 */
221 gboolean (* check_subject_name)(PurpleCertificate *crt, const gchar *name);
222
216 /** Retrieve the certificate activation time */ 223 /** Retrieve the certificate activation time */
217 time_t (* get_activation_time)(PurpleCertificate *crt); 224 time_t (* get_activation_time)(PurpleCertificate *crt);
218 /** Retrieve the expiration time */ 225 /** Retrieve the expiration time */
219 time_t (* get_expiration_time)(PurpleCertificate *crt); 226 time_t (* get_expiration_time)(PurpleCertificate *crt);
220 227
411 * @return Newly allocated string with the certificate subject. 418 * @return Newly allocated string with the certificate subject.
412 */ 419 */
413 gchar * 420 gchar *
414 purple_certificate_get_subject_name(PurpleCertificate *crt); 421 purple_certificate_get_subject_name(PurpleCertificate *crt);
415 422
423 /**
424 * Check the subject name against that on the certificate
425 * @param crt Certificate instance
426 * @param name Name to check.
427 * @return TRUE if it is a match, else FALSE
428 */
429 gboolean
430 purple_certificate_check_subject_name(PurpleCertificate *crt, const gchar *name);
431
432
416 /*@}*/ 433 /*@}*/
417 434
418 /*****************************************************************************/ 435 /*****************************************************************************/
419 /** @name Certificate Pool Functions */ 436 /** @name Certificate Pool Functions */
420 /*****************************************************************************/ 437 /*****************************************************************************/