aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-private.h
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-07-31 03:16:11 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-07-31 03:16:11 +0800
commitb0633536f2b5e11a1a1ab032bad38218c31173db (patch)
tree69da48419125f8df2b6fe07166fd526b5353d20a /camel/camel-private.h
parentedc715415f16324b248eca2067d2700042a27ed4 (diff)
downloadgsoc2013-evolution-b0633536f2b5e11a1a1ab032bad38218c31173db.tar.gz
gsoc2013-evolution-b0633536f2b5e11a1a1ab032bad38218c31173db.tar.zst
gsoc2013-evolution-b0633536f2b5e11a1a1ab032bad38218c31173db.zip
New source file implementing a very basic certificate database. This is
2002-07-30 Jeffrey Stedfast <fejj@ximian.com> * camel-certdb.c: New source file implementing a very basic certificate database. This is mostly just here because the Mozilla NSS certdb seems to not be working for everyone's Evolution install (works fine for me and Ettore but not many other people). * camel-tcp-stream-ssl.c (ssl_bad_cert): If we have this certificate in our own CamelCertDB, then get the trust value from that and only prompt the user if the trust is unknown. * camel-tcp-stream-openssl.c (ssl_verify): Same. * camel.c (camel_init): Create our default certdb. svn path=/trunk/; revision=17642
Diffstat (limited to 'camel/camel-private.h')
-rw-r--r--camel/camel-private.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/camel/camel-private.h b/camel/camel-private.h
index 5c978da9ac..0530c27fe7 100644
--- a/camel/camel-private.h
+++ b/camel/camel-private.h
@@ -215,6 +215,26 @@ struct _CamelDataWrapperPrivate {
#define CAMEL_DATA_WRAPPER_UNLOCK(dw, l)
#endif
+/* most of this stuff really is private, but the lock can be used by subordinate classes */
+struct _CamelCertDBPrivate {
+#ifdef ENABLE_THREADS
+ GMutex *db_lock; /* for the db hashtable/array */
+ GMutex *io_lock; /* load/save lock, for access to saved_count, etc */
+ GMutex *alloc_lock; /* for setting up and using allocators */
+ GMutex *ref_lock; /* for reffing/unreffing certs */
+#else
+ gpointer dummy;
+#endif
+};
+
+#ifdef ENABLE_THREADS
+#define CAMEL_CERTDB_LOCK(db, l) (g_mutex_lock (((CamelCertDB *) db)->priv->l))
+#define CAMEL_CERTDB_UNLOCK(db, l) (g_mutex_unlock (((CamelCertDB *) db)->priv->l))
+#else
+#define CAMEL_CERTDB_LOCK(db, l)
+#define CAMEL_CERTDB_UNLOCK(db, l)
+#endif
+
#ifdef __cplusplus
}
#endif /* __cplusplus */