1SSL_clear(3)                        OpenSSL                       SSL_clear(3)
2
3
4

NAME

6       SSL_clear - reset SSL object to allow another connection
7

SYNOPSIS

9        #include <openssl/ssl.h>
10
11        int SSL_clear(SSL *ssl);
12

DESCRIPTION

14       Reset ssl to allow another connection. All settings (method, ciphers,
15       BIOs) are kept.
16

NOTES

18       SSL_clear is used to prepare an SSL object for a new connection. While
19       all settings are kept, a side effect is the handling of the current SSL
20       session.  If a session is still open, it is considered bad and will be
21       removed from the session cache, as required by RFC2246. A session is
22       considered open, if SSL_shutdown(3) was not called for the connection
23       or at least SSL_set_shutdown(3) was used to set the SSL_SENT_SHUTDOWN
24       state.
25
26       If a session was closed cleanly, the session object will be kept and
27       all settings corresponding. This explicitly means, that e.g. the
28       special method used during the session will be kept for the next
29       handshake. So if the session was a TLSv1 session, a SSL client object
30       will use a TLSv1 client method for the next handshake and a SSL server
31       object will use a TLSv1 server method, even if SSLv23_*_methods were
32       chosen on startup. This will might lead to connection failures (see
33       SSL_new(3)) for a description of the method's properties.
34

WARNINGS

36       SSL_clear() resets the SSL object to allow for another connection. The
37       reset operation however keeps several settings of the last sessions
38       (some of these settings were made automatically during the last
39       handshake). It only makes sense when opening a new session (or reusing
40       an old one) with the same peer that shares these settings.  SSL_clear()
41       is not a short form for the sequence SSL_free(3); SSL_new(3); .
42

RETURN VALUES

44       The following return values can occur:
45
46       0   The SSL_clear() operation could not be performed. Check the error
47           stack to find out the reason.
48
49       1   The SSL_clear() operation was successful.
50
51       SSL_new(3), SSL_free(3), SSL_shutdown(3), SSL_set_shutdown(3),
52       SSL_CTX_set_options(3), ssl(3), SSL_CTX_set_client_cert_cb(3)
53
54
55
561.0.0e                            2002-02-27                      SSL_clear(3)
Impressum