diff options
Diffstat (limited to 'src/lib/libssl/doc/SSL_clear.3')
-rw-r--r-- | src/lib/libssl/doc/SSL_clear.3 | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/src/lib/libssl/doc/SSL_clear.3 b/src/lib/libssl/doc/SSL_clear.3 deleted file mode 100644 index 8d49a840ca..0000000000 --- a/src/lib/libssl/doc/SSL_clear.3 +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | .\" | ||
2 | .\" $OpenBSD: SSL_clear.3,v 1.2 2014/12/02 14:11:01 jmc Exp $ | ||
3 | .\" | ||
4 | .Dd $Mdocdate: December 2 2014 $ | ||
5 | .Dt SSL_CLEAR 3 | ||
6 | .Os | ||
7 | .Sh NAME | ||
8 | .Nm SSL_clear | ||
9 | .Nd reset SSL object to allow another connection | ||
10 | .Sh SYNOPSIS | ||
11 | .In openssl/ssl.h | ||
12 | .Ft int | ||
13 | .Fn SSL_clear "SSL *ssl" | ||
14 | .Sh DESCRIPTION | ||
15 | Reset | ||
16 | .Fa ssl | ||
17 | to allow another connection. | ||
18 | All settings (method, ciphers, BIOs) are kept. | ||
19 | .Sh NOTES | ||
20 | .Fn SSL_clear | ||
21 | is used to prepare an | ||
22 | .Vt SSL | ||
23 | object for a new connection. | ||
24 | While all settings are kept, | ||
25 | a side effect is the handling of the current SSL session. | ||
26 | If a session is still | ||
27 | .Em open , | ||
28 | it is considered bad and will be removed from the session cache, | ||
29 | as required by RFC2246. | ||
30 | A session is considered open if | ||
31 | .Xr SSL_shutdown 3 | ||
32 | was not called for the connection or at least | ||
33 | .Xr SSL_set_shutdown 3 | ||
34 | was used to | ||
35 | set the | ||
36 | .Dv SSL_SENT_SHUTDOWN | ||
37 | state. | ||
38 | .Pp | ||
39 | If a session was closed cleanly, | ||
40 | the session object will be kept and all settings corresponding. | ||
41 | This explicitly means that for example the special method used during the | ||
42 | session will be kept for the next handshake. | ||
43 | So if the session was a TLSv1 session, a | ||
44 | .Vt SSL | ||
45 | client object will use a TLSv1 client method for the next handshake and a | ||
46 | .Vt SSL | ||
47 | server object will use a TLSv1 server method, even if | ||
48 | .Fn SSLv23_*_method Ns s | ||
49 | were chosen on startup. | ||
50 | This might lead to connection failures (see | ||
51 | .Xr SSL_new 3 ) | ||
52 | for a description of the method's properties. | ||
53 | .Sh WARNINGS | ||
54 | .Fn SSL_clear | ||
55 | resets the | ||
56 | .Vt SSL | ||
57 | object to allow for another connection. | ||
58 | The reset operation however keeps several settings of the last sessions | ||
59 | (some of these settings were made automatically during the last handshake). | ||
60 | It only makes sense for a new connection with the exact same peer that shares | ||
61 | these settings, | ||
62 | and may fail if that peer changes its settings between connections. | ||
63 | Use the sequence | ||
64 | .Xr SSL_get_session 3 ; | ||
65 | .Xr SSL_new 3 ; | ||
66 | .Xr SSL_set_session 3 ; | ||
67 | .Xr SSL_free 3 | ||
68 | instead to avoid such failures (or simply | ||
69 | .Xr SSL_free 3 ; | ||
70 | .Xr SSL_new 3 | ||
71 | if session reuse is not desired). | ||
72 | .Sh RETURN VALUES | ||
73 | The following return values can occur: | ||
74 | .Bl -tag -width Ds | ||
75 | .It 0 | ||
76 | The | ||
77 | .Fn SSL_clear | ||
78 | operation could not be performed. | ||
79 | Check the error stack to find out the reason. | ||
80 | .It 1 | ||
81 | The | ||
82 | .Fn SSL_clear | ||
83 | operation was successful. | ||
84 | .El | ||
85 | .Sh SEE ALSO | ||
86 | .Xr ssl 3 , | ||
87 | .Xr SSL_CTX_set_client_cert_cb 3 , | ||
88 | .Xr SSL_CTX_set_options 3 , | ||
89 | .Xr SSL_free 3 , | ||
90 | .Xr SSL_new 3 , | ||
91 | .Xr SSL_set_shutdown 3 , | ||
92 | .Xr SSL_shutdown 3 | ||