summaryrefslogtreecommitdiff
path: root/src/lib/libssl/doc/SSL_accept.3
diff options
context:
space:
mode:
authorcvs2svn <admin@example.com>2015-03-08 16:48:49 +0000
committercvs2svn <admin@example.com>2015-03-08 16:48:49 +0000
commitdecf84ba5550c1656a7fdb51b5b81969590c3f03 (patch)
tree44872802e872bdfd60730fa9cf01d9d5751251c1 /src/lib/libssl/doc/SSL_accept.3
parent7a8f138352aa4eb7b65ac4b1a5fe7630fbee1427 (diff)
downloadopenbsd-libressl-v2.1.5.tar.gz
openbsd-libressl-v2.1.5.tar.bz2
openbsd-libressl-v2.1.5.zip
This commit was manufactured by cvs2git to create branch 'OPENBSD_5_7'.libressl-v2.1.5
Diffstat (limited to 'src/lib/libssl/doc/SSL_accept.3')
-rw-r--r--src/lib/libssl/doc/SSL_accept.3113
1 files changed, 0 insertions, 113 deletions
diff --git a/src/lib/libssl/doc/SSL_accept.3 b/src/lib/libssl/doc/SSL_accept.3
deleted file mode 100644
index 06465d1955..0000000000
--- a/src/lib/libssl/doc/SSL_accept.3
+++ /dev/null
@@ -1,113 +0,0 @@
1.\"
2.\" $OpenBSD: SSL_accept.3,v 1.2 2014/12/02 14:11:01 jmc Exp $
3.\"
4.Dd $Mdocdate: December 2 2014 $
5.Dt SSL_ACCEPT 3
6.Os
7.Sh NAME
8.Nm SSL_accept
9.Nd wait for a TLS/SSL client to initiate a TLS/SSL handshake
10.Sh SYNOPSIS
11.In openssl/ssl.h
12.Ft int
13.Fn SSL_accept "SSL *ssl"
14.Sh DESCRIPTION
15.Fn SSL_accept
16waits for a TLS/SSL client to initiate the TLS/SSL handshake.
17The communication channel must already have been set and assigned to the
18.Fa ssl
19object by setting an underlying
20.Vt BIO .
21.Sh NOTES
22The behaviour of
23.Fn SSL_accept
24depends on the underlying
25.Vt BIO .
26.Pp
27If the underlying
28.Vt BIO
29is
30.Em blocking ,
31.Fn SSL_accept
32will only return once the handshake has been finished or an error occurred,
33except for SGC (Server Gated Cryptography).
34For SGC,
35.Fn SSL_accept
36may return with \(mi1, but
37.Fn SSL_get_error
38will yield
39.Dv SSL_ERROR_WANT_READ/WRITE
40and
41.Fn SSL_accept
42should be called again.
43.Pp
44If the underlying
45.Vt BIO
46is
47.Em non-blocking ,
48.Fn SSL_accept
49will also return when the underlying
50.Vt BIO
51could not satisfy the needs of
52.Fn SSL_accept
53to continue the handshake, indicating the problem by the return value \(mi1.
54In this case a call to
55.Xr SSL_get_error 3
56with the
57return value of
58.Fn SSL_accept
59will yield
60.Dv SSL_ERROR_WANT_READ
61or
62.Dv SSL_ERROR_WANT_WRITE .
63The calling process then must repeat the call after taking appropriate action
64to satisfy the needs of
65.Fn SSL_accept .
66The action depends on the underlying
67.Dv BIO .
68When using a non-blocking socket, nothing is to be done, but
69.Xr select 2
70can be used to check for the required condition.
71When using a buffering
72.Vt BIO ,
73like a
74.Vt BIO
75pair, data must be written into or retrieved out of the
76.Vt BIO
77before being able to continue.
78.Sh RETURN VALUES
79The following return values can occur:
80.Bl -tag -width Ds
81.It 0
82The TLS/SSL handshake was not successful but was shut down controlled and by
83the specifications of the TLS/SSL protocol.
84Call
85.Xr SSL_get_error 3
86with the return value
87.Fa ret
88to find out the reason.
89.It 1
90The TLS/SSL handshake was successfully completed,
91and a TLS/SSL connection has been established.
92.It <0
93The TLS/SSL handshake was not successful because a fatal error occurred either
94at the protocol level or a connection failure occurred.
95The shutdown was not clean.
96It can also occur of action is need to continue the operation for non-blocking
97.Vt BIO Ns
98s.
99Call
100.Xr SSL_get_error 3
101with the return value
102.Fa ret
103to find out the reason.
104.El
105.Sh SEE ALSO
106.Xr bio 3 ,
107.Xr ssl 3 ,
108.Xr SSL_connect 3 ,
109.Xr SSL_CTX_new 3 ,
110.Xr SSL_do_handshake 3 ,
111.Xr SSL_get_error 3 ,
112.Xr SSL_set_connect_state 3 ,
113.Xr SSL_shutdown 3