diff 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
line wrap: on
line diff
--- a/libpurple/certificate.h	Mon Jul 09 03:26:18 2007 +0000
+++ b/libpurple/certificate.h	Mon Jul 09 03:47:36 2007 +0000
@@ -213,6 +213,13 @@
 	 */
 	gchar * (* get_subject_name)(PurpleCertificate *crt);
 
+	/**
+	 * Check the subject name against that on the certificate
+	 * @see purple_certificate_check_subject_name()
+	 * @return TRUE if it is a match, else FALSE
+	 */
+	gboolean (* check_subject_name)(PurpleCertificate *crt, const gchar *name);
+
 	/** Retrieve the certificate activation time */
 	time_t (* get_activation_time)(PurpleCertificate *crt);
 	/** Retrieve the expiration time */
@@ -413,6 +420,16 @@
 gchar *
 purple_certificate_get_subject_name(PurpleCertificate *crt);
 
+/**
+ * Check the subject name against that on the certificate
+ * @param crt   Certificate instance
+ * @param name  Name to check. 
+ * @return TRUE if it is a match, else FALSE
+ */
+gboolean
+purple_certificate_check_subject_name(PurpleCertificate *crt, const gchar *name);
+
+
 /*@}*/
 
 /*****************************************************************************/