1 /* $NetBSD: tlsproxy.h,v 1.1.1.2 2013/01/02 18:59:10 tron Exp $ */ 2 3 /*++ 4 /* NAME 5 /* tlsproxy 3h 6 /* SUMMARY 7 /* tlsproxy internal interfaces 8 /* SYNOPSIS 9 /* #include <tlsproxy.h> 10 /* DESCRIPTION 11 /* .nf 12 13 /* 14 * Utility library. 15 */ 16 #include <vstream.h> 17 #include <nbbio.h> 18 19 /* 20 * TLS library. 21 */ 22 #include <tls.h> 23 24 /* 25 * Internal interface. 26 */ 27 typedef struct { 28 int flags; /* see below */ 29 int req_flags; /* request flags, see tls_proxy.h */ 30 char *service; /* argv[0] */ 31 VSTREAM *plaintext_stream; /* local peer: postscreen(8), etc. */ 32 NBBIO *plaintext_buf; /* plaintext buffer */ 33 int ciphertext_fd; /* remote peer */ 34 EVENT_NOTIFY_FN ciphertext_timer; /* kludge */ 35 int timeout; /* read/write time limit */ 36 char *remote_endpt; /* printable remote endpoint */ 37 char *server_id; /* cache management */ 38 TLS_SESS_STATE *tls_context; /* llibtls state */ 39 int ssl_last_err; /* TLS I/O state */ 40 } TLSP_STATE; 41 42 #define TLSP_FLAG_DO_HANDSHAKE (1<<0) 43 44 extern TLSP_STATE *tlsp_state_create(const char *, VSTREAM *); 45 extern void tlsp_state_free(TLSP_STATE *); 46 47 /* LICENSE 48 /* .ad 49 /* .fi 50 /* The Secure Mailer license must be distributed with this software. 51 /* AUTHOR(S) 52 /* Wietse Venema 53 /* IBM T.J. Watson Research 54 /* P.O. Box 704 55 /* Yorktown Heights, NY 10598, USA 56 /*--*/ 57