summaryrefslogtreecommitdiff
path: root/src/lib/libssl/doc/SSL_want.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/doc/SSL_want.3')
-rw-r--r--src/lib/libssl/doc/SSL_want.3100
1 files changed, 100 insertions, 0 deletions
diff --git a/src/lib/libssl/doc/SSL_want.3 b/src/lib/libssl/doc/SSL_want.3
new file mode 100644
index 0000000000..5f9d89ea92
--- /dev/null
+++ b/src/lib/libssl/doc/SSL_want.3
@@ -0,0 +1,100 @@
1.Dd $Mdocdate: October 12 2014 $
2.Dt SSL_WANT 3
3.Os
4.Sh NAME
5.Nm SSL_want ,
6.Nm SSL_want_nothing ,
7.Nm SSL_want_read ,
8.Nm SSL_want_write ,
9.Nm SSL_want_x509_lookup
10.Nd obtain state information TLS/SSL I/O operation
11.Sh SYNOPSIS
12.In openssl/ssl.h
13.Ft int
14.Fn SSL_want "const SSL *ssl"
15.Ft int
16.Fn SSL_want_nothing "const SSL *ssl"
17.Ft int
18.Fn SSL_want_read "const SSL *ssl"
19.Ft int
20.Fn SSL_want_write "const SSL *ssl"
21.Ft int
22.Fn SSL_want_x509_lookup "const SSL *ssl"
23.Sh DESCRIPTION
24.Fn SSL_want
25returns state information for the
26.Vt SSL
27object
28.Fa ssl .
29.Pp
30The other
31.Fn SSL_want_*
32calls are shortcuts for the possible states returned by
33.Fn SSL_want .
34.Sh NOTES
35.Fn SSL_want
36examines the internal state information of the
37.Vt SSL
38object.
39Its return values are similar to those of
40.Xr SSL_get_error 3 .
41Unlike
42.Xr SSL_get_error 3 ,
43which also evaluates the error queue,
44the results are obtained by examining an internal state flag only.
45The information must therefore only be used for normal operation under
46non-blocking I/O.
47Error conditions are not handled and must be treated using
48.Xr SSL_get_error 3 .
49.Pp
50The result returned by
51.Fn SSL_want
52should always be consistent with the result of
53.Xr SSL_get_error 3 .
54.Sh RETURN VALUES
55The following return values can currently occur for
56.Fn SSL_want :
57.Bl -tag -width Ds
58.It .Dv SSL_NOTHING
59There is no data to be written or to be read.
60.It .Dv SSL_WRITING
61There are data in the SSL buffer that must be written to the underlying
62.Vt BIO
63layer in order to complete the actual
64.Fn SSL_*
65operation.
66A call to
67.Xr SSL_get_error 3
68should return
69.Dv SSL_ERROR_WANT_WRITE .
70.It Dv SSL_READING
71More data must be read from the underlying
72.Vt BIO
73layer in order to
74complete the actual
75.Fn SSL_*
76operation.
77A call to
78.Xr SSL_get_error 3
79should return
80.Dv SSL_ERROR_WANT_READ.
81.It Dv SSL_X509_LOOKUP
82The operation did not complete because an application callback set by
83.Xr SSL_CTX_set_client_cert_cb 3
84has asked to be called again.
85A call to
86.Xr SSL_get_error 3
87should return
88.Dv SSL_ERROR_WANT_X509_LOOKUP .
89.El
90.Pp
91.Fn SSL_want_nothing ,
92.Fn SSL_want_read ,
93.Fn SSL_want_write ,
94and
95.Fn SSL_want_x509_lookup
96return 1 when the corresponding condition is true or 0 otherwise.
97.Sh SEE ALSO
98.Xr err 3 ,
99.Xr ssl 3 ,
100.Xr SSL_get_error 3