summaryrefslogtreecommitdiff
path: root/external/bsd/libevent/man/bufferevent_ssl.h.3
blob: 6f7ec85a052aa8d3d3078594b243f5ad611359a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
.TH "event2/bufferevent_ssl.h" 3 "Tue Jan 31 2017" "libevent" \" -*- nroff -*-
.ad l
.nh
.SH NAME
event2/bufferevent_ssl.h \- OpenSSL support for bufferevents\&.  

.SH SYNOPSIS
.br
.PP
\fC#include <event2/visibility\&.h>\fP
.br
\fC#include <event2/event\-config\&.h>\fP
.br
\fC#include <event2/bufferevent\&.h>\fP
.br
\fC#include <event2/util\&.h>\fP
.br

.SS "Enumerations"

.in +1c
.ti -1c
.RI "enum \fBbufferevent_ssl_state\fP { \fBBUFFEREVENT_SSL_OPEN\fP = 0, \fBBUFFEREVENT_SSL_CONNECTING\fP = 1, \fBBUFFEREVENT_SSL_ACCEPTING\fP = 2 }
.RI "\fIThe state of an SSL object to be used when creating a new SSL bufferevent\&. \fP""
.br
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "EVENT2_EXPORT_SYMBOL unsigned long \fBbufferevent_get_openssl_error\fP (struct \fBbufferevent\fP *bev)"
.br
.RI "\fIReturn the most recent OpenSSL error reported on an SSL bufferevent\&. \fP"
.ti -1c
.RI "EVENT2_EXPORT_SYMBOL struct \fBbufferevent\fP * \fBbufferevent_openssl_filter_new\fP (struct \fBevent_base\fP *base, struct \fBbufferevent\fP *underlying, struct ssl_st *ssl, enum \fBbufferevent_ssl_state\fP state, int options)"
.br
.RI "\fICreate a new SSL bufferevent to send its data over another bufferevent\&. \fP"
.ti -1c
.RI "EVENT2_EXPORT_SYMBOL int \fBbufferevent_openssl_get_allow_dirty_shutdown\fP (struct \fBbufferevent\fP *bev)"
.br
.RI "\fIControl how to report dirty SSL shutdowns\&. \fP"
.ti -1c
.RI "EVENT2_EXPORT_SYMBOL struct ssl_st * \fBbufferevent_openssl_get_ssl\fP (struct \fBbufferevent\fP *bufev)"
.br
.RI "\fIReturn the underlying openssl SSL * object for an SSL bufferevent\&. \fP"
.ti -1c
.RI "EVENT2_EXPORT_SYMBOL void \fBbufferevent_openssl_set_allow_dirty_shutdown\fP (struct \fBbufferevent\fP *bev, int allow_dirty_shutdown)"
.br
.ti -1c
.RI "EVENT2_EXPORT_SYMBOL struct \fBbufferevent\fP * \fBbufferevent_openssl_socket_new\fP (struct \fBevent_base\fP *base, \fBevutil_socket_t\fP fd, struct ssl_st *ssl, enum \fBbufferevent_ssl_state\fP state, int options)"
.br
.RI "\fICreate a new SSL bufferevent to send its data over an SSL * on a socket\&. \fP"
.ti -1c
.RI "EVENT2_EXPORT_SYMBOL int \fBbufferevent_ssl_renegotiate\fP (struct \fBbufferevent\fP *bev)"
.br
.RI "\fITells a bufferevent to begin SSL renegotiation\&. \fP"
.in -1c
.SH "Detailed Description"
.PP 
OpenSSL support for bufferevents\&. 


.SH "Function Documentation"
.PP 
.SS "EVENT2_EXPORT_SYMBOL unsigned long bufferevent_get_openssl_error (struct \fBbufferevent\fP * bev)"

.PP
Return the most recent OpenSSL error reported on an SSL bufferevent\&. 
.SS "EVENT2_EXPORT_SYMBOL struct \fBbufferevent\fP* bufferevent_openssl_filter_new (struct \fBevent_base\fP * base, struct \fBbufferevent\fP * underlying, struct ssl_st * ssl, enum \fBbufferevent_ssl_state\fP state, int options)"

.PP
Create a new SSL bufferevent to send its data over another bufferevent\&. 
.PP
\fBParameters:\fP
.RS 4
\fIbase\fP An \fBevent_base\fP to use to detect reading and writing\&. It must also be the base for the underlying bufferevent\&. 
.br
\fIunderlying\fP A socket to use for this SSL 
.br
\fIssl\fP A SSL* object from openssl\&. 
.br
\fIstate\fP The current state of the SSL connection 
.br
\fIoptions\fP One or more bufferevent_options 
.RE
.PP
\fBReturns:\fP
.RS 4
A new bufferevent on success, or NULL on failure 
.RE
.PP

.SS "EVENT2_EXPORT_SYMBOL int bufferevent_openssl_get_allow_dirty_shutdown (struct \fBbufferevent\fP * bev)"

.PP
Control how to report dirty SSL shutdowns\&. If the peer (or the network, or an attacker) closes the TCP connection before closing the SSL channel, and the protocol is SSL >= v3, this is a 'dirty' shutdown\&. If allow_dirty_shutdown is 0 (default), this is reported as BEV_EVENT_ERROR\&.
.PP
If instead allow_dirty_shutdown=1, a dirty shutdown is reported as BEV_EVENT_EOF\&.
.PP
(Note that if the protocol is < SSLv3, you will always receive BEV_EVENT_EOF, since SSL 2 and earlier cannot distinguish a secure connection close from a dirty one\&. This is one reason (among many) not to use SSL 2\&.) 
.SS "EVENT2_EXPORT_SYMBOL struct ssl_st* bufferevent_openssl_get_ssl (struct \fBbufferevent\fP * bufev)"

.PP
Return the underlying openssl SSL * object for an SSL bufferevent\&. 
.SS "EVENT2_EXPORT_SYMBOL struct \fBbufferevent\fP* bufferevent_openssl_socket_new (struct \fBevent_base\fP * base, \fBevutil_socket_t\fP fd, struct ssl_st * ssl, enum \fBbufferevent_ssl_state\fP state, int options)"

.PP
Create a new SSL bufferevent to send its data over an SSL * on a socket\&. 
.PP
\fBParameters:\fP
.RS 4
\fIbase\fP An \fBevent_base\fP to use to detect reading and writing 
.br
\fIfd\fP A socket to use for this SSL 
.br
\fIssl\fP A SSL* object from openssl\&. 
.br
\fIstate\fP The current state of the SSL connection 
.br
\fIoptions\fP One or more bufferevent_options 
.RE
.PP
\fBReturns:\fP
.RS 4
A new bufferevent on success, or NULL on failure\&. 
.RE
.PP

.SS "EVENT2_EXPORT_SYMBOL int bufferevent_ssl_renegotiate (struct \fBbufferevent\fP * bev)"

.PP
Tells a bufferevent to begin SSL renegotiation\&. 
.SH "Author"
.PP 
Generated automatically by Doxygen for libevent from the source code\&.