1 /* $NetBSD: tlsproxy.h,v 1.1.1.1 2011/03/02 19:32:39 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 TLS_SESS_STATE *tls_context; /* llibtls state */ 38 int ssl_last_err; /* TLS I/O state */ 39 } TLSP_STATE; 40 41 #define TLSP_FLAG_DO_HANDSHAKE (1<<0) 42 43 extern TLSP_STATE *tlsp_state_create(const char *, VSTREAM *); 44 extern void tlsp_state_free(TLSP_STATE *); 45 46 /* LICENSE 47 /* .ad 48 /* .fi 49 /* The Secure Mailer license must be distributed with this software. 50 /* AUTHOR(S) 51 /* Wietse Venema 52 /* IBM T.J. Watson Research 53 /* P.O. Box 704 54 /* Yorktown Heights, NY 10598, USA 55 /*--*/ 56