diff libpurple/certificate.c @ 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 6831c126bcf3
children 7b03727b10b4
line wrap: on
line diff
--- a/libpurple/certificate.c	Wed Jun 27 01:35:28 2007 +0000
+++ b/libpurple/certificate.c	Wed Jun 27 03:39:19 2007 +0000
@@ -141,6 +141,24 @@
 	return fpr;
 }
 
+gchar *
+purple_certificate_get_subject_name(PurpleCertificate *crt)
+{
+	PurpleCertificateScheme *scheme;
+	gchar *subject_name;
+
+	g_return_val_if_fail(crt, NULL);
+	g_return_val_if_fail(crt->scheme, NULL);
+
+	scheme = crt->scheme;
+
+	g_return_val_if_fail(scheme->get_subject_name, NULL);
+
+	subject_name = (scheme->get_subject_name)(crt);
+
+	return subject_name;
+}
+
 /****************************************************************************/
 /* Builtin Verifiers, Pools, etc.                                           */
 /****************************************************************************/