1 #ifndef _TLS_MGR_CLNT_H_INCLUDED_
2 #define _TLS_MGR_CLNT_H_INCLUDED_
3 
4 /*++
5 /* NAME
6 /*	tls_mgr 3h
7 /* SUMMARY
8 /*	tlsmgr client interface
9 /* SYNOPSIS
10 /*	#include <tls_mgr.h>
11 /* DESCRIPTION
12 /* .nf
13 
14  /*
15   * TLS library
16   */
17 #include <tls_scache.h>			/* Session ticket keys */
18 
19  /*
20   * TLS manager protocol.
21   */
22 #define TLS_MGR_SERVICE		"tlsmgr"
23 #define TLS_MGR_CLASS		"private"
24 
25 #define TLS_MGR_ATTR_REQ	"request"
26 #define TLS_MGR_REQ_SEED	"seed"
27 #define TLS_MGR_REQ_POLICY	"policy"
28 #define TLS_MGR_REQ_LOOKUP	"lookup"
29 #define TLS_MGR_REQ_UPDATE	"update"
30 #define TLS_MGR_REQ_DELETE	"delete"
31 #define TLS_MGR_REQ_TKTKEY	"tktkey"
32 #define TLS_MGR_ATTR_CACHABLE	"cachable"
33 #define TLS_MGR_ATTR_CACHE_TYPE	"cache_type"
34 #define TLS_MGR_ATTR_SEED	"seed"
35 #define TLS_MGR_ATTR_CACHE_ID	"cache_id"
36 #define TLS_MGR_ATTR_SESSION	"session"
37 #define TLS_MGR_ATTR_SIZE	"size"
38 #define TLS_MGR_ATTR_STATUS	"status"
39 #define TLS_MGR_ATTR_KEYNAME	"keyname"
40 #define TLS_MGR_ATTR_KEYBUF	"keybuf"
41 #define TLS_MGR_ATTR_SESSTOUT	"timeout"
42 
43  /*
44   * TLS manager request status codes.
45   */
46 #define TLS_MGR_STAT_OK		0	/* success */
47 #define TLS_MGR_STAT_ERR	(-1)	/* object not found */
48 #define TLS_MGR_STAT_FAIL	(-2)	/* protocol error */
49 
50  /*
51   * Functional interface.
52   */
53 extern int tls_mgr_seed(VSTRING *, int);
54 extern int tls_mgr_policy(const char *, int *, int *);
55 extern int tls_mgr_lookup(const char *, const char *, VSTRING *);
56 extern int tls_mgr_update(const char *, const char *, const char *, ssize_t);
57 extern int tls_mgr_delete(const char *, const char *);
58 extern TLS_TICKET_KEY *tls_mgr_key(unsigned char *, int);
59 
60 /* LICENSE
61 /* .ad
62 /* .fi
63 /*	The Secure Mailer license must be distributed with this software.
64 /* AUTHOR(S)
65 /*	Wietse Venema
66 /*	IBM T.J. Watson Research
67 /*	P.O. Box 704
68 /*	Yorktown Heights, NY 10598, USA
69 /*--*/
70 
71 #endif
72