diff options
author | bentley <> | 2014-10-12 09:33:04 +0000 |
---|---|---|
committer | bentley <> | 2014-10-12 09:33:04 +0000 |
commit | 82b7f378b6907ab315a6e50322d2a0a8794a0aa9 (patch) | |
tree | a5087bf8d016a6041c2b6822fbecfd8f6c5e70b1 /src/lib/libssl/doc/SSL_connect.3 | |
parent | 0a63f0cf49369e1926567ab62e04e3355cedf0cd (diff) | |
download | openbsd-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.3 | 99 |
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 | ||
13 | initiates the TLS/SSL handshake with a server. | ||
14 | The communication channel must already have been set and assigned to the | ||
15 | .Fa ssl | ||
16 | by setting an underlying | ||
17 | .Vt BIO . | ||
18 | .Sh NOTES | ||
19 | The behaviour of | ||
20 | .Fn SSL_connect | ||
21 | depends on the underlying | ||
22 | .Vt BIO. | ||
23 | .Pp | ||
24 | If the underlying | ||
25 | .Vt BIO | ||
26 | is | ||
27 | .Em blocking , | ||
28 | .Fn SSL_connect | ||
29 | will only return once the handshake has been finished or an error occurred. | ||
30 | .Pp | ||
31 | If the underlying | ||
32 | .Vt BIO | ||
33 | is | ||
34 | .Em non-blocking , | ||
35 | .Fn SSL_connect | ||
36 | will also return when the underlying | ||
37 | .Vt BIO | ||
38 | could not satisfy the needs of | ||
39 | .Fn SSL_connect | ||
40 | to continue the handshake, indicating the problem with the return value \(mi1. | ||
41 | In this case a call to | ||
42 | .Xr SSL_get_error 3 | ||
43 | with the return value of | ||
44 | .Fn SSL_connect | ||
45 | will yield | ||
46 | .Dv SSL_ERROR_WANT_READ | ||
47 | or | ||
48 | .Dv SSL_ERROR_WANT_WRITE . | ||
49 | The calling process then must repeat the call after taking appropriate action | ||
50 | to satisfy the needs of | ||
51 | .Fn SSL_connect . | ||
52 | The action depends on the underlying | ||
53 | .Vt BIO . | ||
54 | When using a non-blocking socket, nothing is to be done, but | ||
55 | .Xr select 2 | ||
56 | can be used to check for the required condition. | ||
57 | When using a buffering | ||
58 | .Vt BIO , | ||
59 | like a | ||
60 | .Vt BIO | ||
61 | pair, data must be written into or retrieved out of the | ||
62 | .Vt BIO | ||
63 | before being able to continue. | ||
64 | .Sh RETURN VALUES | ||
65 | The following return values can occur: | ||
66 | .Bl -tag -width Ds | ||
67 | .It 0 | ||
68 | The TLS/SSL handshake was not successful but was shut down controlled and | ||
69 | by the specifications of the TLS/SSL protocol. | ||
70 | Call | ||
71 | .Xr SSL_get_error 3 | ||
72 | with the return value | ||
73 | .Fa ret | ||
74 | to find out the reason. | ||
75 | .It 1 | ||
76 | The TLS/SSL handshake was successfully completed, | ||
77 | and a TLS/SSL connection has been established. | ||
78 | .It <0 | ||
79 | The TLS/SSL handshake was not successful, because either a fatal error occurred | ||
80 | at the protocol level or a connection failure occurred. | ||
81 | The shutdown was not clean. | ||
82 | It can also occur if action is needed to continue the operation for | ||
83 | non-blocking | ||
84 | .Vt BIO Ns s. | ||
85 | Call | ||
86 | .Xr SSL_get_error 3 | ||
87 | with the return value | ||
88 | .Fa ret | ||
89 | to 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 | ||