Patrick Welche <prlw1@cam.ac.uk>
[netbsd-mini2440.git] / external / ibm-public / postfix / dist / src / tls / tls_scache.h
blobb453c56b5f61645b35a6ece3b0a9cb46d158f4d4
1 /* $NetBSD$ */
3 #ifndef _TLS_SCACHE_H_INCLUDED_
4 #define _TLS_SCACHE_H_INCLUDED_
6 /*++
7 /* NAME
8 /* tls_scache 3h
9 /* SUMMARY
10 /* TLS session cache manager
11 /* SYNOPSIS
12 /* #include <tls_scache.h>
13 /* DESCRIPTION
14 /* .nf
17 * Utility library.
19 #include <dict.h>
20 #include <vstring.h>
23 * External interface.
25 typedef struct {
26 int flags; /* see below */
27 DICT *db; /* database handle */
28 char *cache_label; /* "smtpd", "smtp" or "lmtp" */
29 int verbose; /* enable verbose logging */
30 int timeout; /* smtp(d)_tls_session_cache_timeout */
31 char *saved_cursor; /* cursor cache ID */
32 } TLS_SCACHE;
34 #define TLS_SCACHE_FLAG_DEL_SAVED_CURSOR (1<<0)
36 extern TLS_SCACHE *tls_scache_open(const char *, const char *, int, int);
37 extern void tls_scache_close(TLS_SCACHE *);
38 extern int tls_scache_lookup(TLS_SCACHE *, const char *, VSTRING *);
39 extern int tls_scache_update(TLS_SCACHE *, const char *, const char *, ssize_t);
40 extern int tls_scache_delete(TLS_SCACHE *, const char *);
41 extern int tls_scache_sequence(TLS_SCACHE *, int, char **, VSTRING *);
43 #define TLS_SCACHE_DONT_NEED_CACHE_ID ((char **) 0)
44 #define TLS_SCACHE_DONT_NEED_SESSION ((VSTRING *) 0)
46 #define TLS_SCACHE_SEQUENCE_NOTHING \
47 TLS_SCACHE_DONT_NEED_CACHE_ID, TLS_SCACHE_DONT_NEED_SESSION
49 /* LICENSE
50 /* .ad
51 /* .fi
52 /* The Secure Mailer license must be distributed with this software.
53 /* AUTHOR(S)
54 /* Wietse Venema
55 /* IBM T.J. Watson Research
56 /* P.O. Box 704
57 /* Yorktown Heights, NY 10598, USA
58 /*--*/
60 #endif