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