diff libpurple/certificate.c @ 18984:2b4150624cf2

- Add purple_certificate_pool_mkpath helper function
author William Ehlhardt <williamehlhardt@gmail.com>
date Thu, 05 Jul 2007 05:35:23 +0000
parents 8948cd6bb8bc
children 806c610ac5a0
line wrap: on
line diff
--- a/libpurple/certificate.c	Thu Jul 05 04:59:36 2007 +0000
+++ b/libpurple/certificate.c	Thu Jul 05 05:35:23 2007 +0000
@@ -176,6 +176,24 @@
 	return subject_name;
 }
 
+gchar *
+purple_certificate_pool_mkpath(PurpleCertificatePool *pool, const gchar *id)
+{
+	gchar *path;
+	
+	g_return_val_if_fail(pool, NULL);
+	g_return_val_if_fail(pool->scheme_name, NULL);
+	g_return_val_if_fail(pool->name, NULL);
+
+	path = g_build_filename(purple_user_dir(),
+				pool->scheme_name,
+				pool->name,
+				id,
+				NULL);
+	return path;
+}
+
+
 /****************************************************************************/
 /* Builtin Verifiers, Pools, etc.                                           */
 /****************************************************************************/