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