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