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