diff libpurple/certificate.h @ 18962:fcd05c39803e

- Add purple_certificate_get_subject_name and associated libpurple machinery
author William Ehlhardt <williamehlhardt@gmail.com>
date Wed, 27 Jun 2007 03:39:19 +0000
parents 9205841eed06
children 3d63bd78675d
line wrap: on
line diff
--- a/libpurple/certificate.h	Wed Jun 27 01:35:28 2007 +0000
+++ b/libpurple/certificate.h	Wed Jun 27 03:39:19 2007 +0000
@@ -151,7 +151,18 @@
 	 */
 	gchar * (* get_issuer_unique_id)(PurpleCertificate *crt);
 
-	
+	/**
+	 * Gets the certificate subject's name
+	 *
+	 * For X.509, this is the "Common Name" field, as we're only using it
+	 * for hostname verification at the moment
+	 *
+	 * @see purple_certificate_get_subject_name()
+	 *
+	 * @param crt   Certificate instance
+	 * @return Newly allocated string with the certificate subject.
+	 */
+	gchar * (* get_subject_name)(PurpleCertificate *crt);
 	/* TODO: Fill out this structure */
 };
 
@@ -306,6 +317,19 @@
 GByteArray *
 purple_certificate_get_fingerprint_sha1(PurpleCertificate *crt);
 
+
+/**
+ * Gets the certificate subject's name
+ *
+ * For X.509, this is the "Common Name" field, as we're only using it
+ * for hostname verification at the moment
+ *
+ * @param crt   Certificate instance
+ * @return Newly allocated string with the certificate subject.
+ */
+gchar *
+purple_certificate_get_subject_name(PurpleCertificate *crt);
+
 /*@}*/
 
 /*****************************************************************************/