1*2e5cb688Stron /*	$NetBSD: tls_mgr.h,v 1.1.1.2 2014/07/06 19:27:54 tron Exp $	*/
241fbaed0Stron 
341fbaed0Stron #ifndef _TLS_MGR_CLNT_H_INCLUDED_
441fbaed0Stron #define _TLS_MGR_CLNT_H_INCLUDED_
541fbaed0Stron 
641fbaed0Stron /*++
741fbaed0Stron /* NAME
841fbaed0Stron /*	tls_mgr 3h
941fbaed0Stron /* SUMMARY
1041fbaed0Stron /*	tlsmgr client interface
1141fbaed0Stron /* SYNOPSIS
1241fbaed0Stron /*	#include <tls_mgr.h>
1341fbaed0Stron /* DESCRIPTION
1441fbaed0Stron /* .nf
1541fbaed0Stron 
1641fbaed0Stron  /*
17*2e5cb688Stron   * TLS library
18*2e5cb688Stron   */
19*2e5cb688Stron #include <tls_scache.h>			/* Session ticket keys */
20*2e5cb688Stron 
21*2e5cb688Stron  /*
2241fbaed0Stron   * TLS manager protocol.
2341fbaed0Stron   */
2441fbaed0Stron #define TLS_MGR_SERVICE		"tlsmgr"
2541fbaed0Stron #define TLS_MGR_CLASS		"private"
2641fbaed0Stron 
2741fbaed0Stron #define TLS_MGR_ATTR_REQ	"request"
2841fbaed0Stron #define TLS_MGR_REQ_SEED	"seed"
2941fbaed0Stron #define TLS_MGR_REQ_POLICY	"policy"
3041fbaed0Stron #define TLS_MGR_REQ_LOOKUP	"lookup"
3141fbaed0Stron #define TLS_MGR_REQ_UPDATE	"update"
3241fbaed0Stron #define TLS_MGR_REQ_DELETE	"delete"
33*2e5cb688Stron #define TLS_MGR_REQ_TKTKEY	"tktkey"
3441fbaed0Stron #define TLS_MGR_ATTR_CACHABLE	"cachable"
3541fbaed0Stron #define TLS_MGR_ATTR_CACHE_TYPE	"cache_type"
3641fbaed0Stron #define TLS_MGR_ATTR_SEED	"seed"
3741fbaed0Stron #define TLS_MGR_ATTR_CACHE_ID	"cache_id"
3841fbaed0Stron #define TLS_MGR_ATTR_SESSION	"session"
3941fbaed0Stron #define TLS_MGR_ATTR_SIZE	"size"
4041fbaed0Stron #define TLS_MGR_ATTR_STATUS	"status"
41*2e5cb688Stron #define TLS_MGR_ATTR_KEYNAME	"keyname"
42*2e5cb688Stron #define TLS_MGR_ATTR_KEYBUF	"keybuf"
43*2e5cb688Stron #define TLS_MGR_ATTR_SESSTOUT	"timeout"
4441fbaed0Stron 
4541fbaed0Stron  /*
4641fbaed0Stron   * TLS manager request status codes.
4741fbaed0Stron   */
4841fbaed0Stron #define TLS_MGR_STAT_OK		0	/* success */
4941fbaed0Stron #define TLS_MGR_STAT_ERR	(-1)	/* object not found */
5041fbaed0Stron #define TLS_MGR_STAT_FAIL	(-2)	/* protocol error */
5141fbaed0Stron 
5241fbaed0Stron  /*
5341fbaed0Stron   * Functional interface.
5441fbaed0Stron   */
5541fbaed0Stron extern int tls_mgr_seed(VSTRING *, int);
56*2e5cb688Stron extern int tls_mgr_policy(const char *, int *, int *);
5741fbaed0Stron extern int tls_mgr_lookup(const char *, const char *, VSTRING *);
5841fbaed0Stron extern int tls_mgr_update(const char *, const char *, const char *, ssize_t);
5941fbaed0Stron extern int tls_mgr_delete(const char *, const char *);
60*2e5cb688Stron extern TLS_TICKET_KEY *tls_mgr_key(unsigned char *, int);
6141fbaed0Stron 
6241fbaed0Stron /* LICENSE
6341fbaed0Stron /* .ad
6441fbaed0Stron /* .fi
6541fbaed0Stron /*	The Secure Mailer license must be distributed with this software.
6641fbaed0Stron /* AUTHOR(S)
6741fbaed0Stron /*	Wietse Venema
6841fbaed0Stron /*	IBM T.J. Watson Research
6941fbaed0Stron /*	P.O. Box 704
7041fbaed0Stron /*	Yorktown Heights, NY 10598, USA
7141fbaed0Stron /*--*/
7241fbaed0Stron 
7341fbaed0Stron #endif
74