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