1SSL_set_session(3)                  OpenSSL                 SSL_set_session(3)
2
3
4

NAME

6       SSL_set_session - set a TLS/SSL session to be used during TLS/SSL
7       connect
8

SYNOPSIS

10        #include <openssl/ssl.h>
11
12        int SSL_set_session(SSL *ssl, SSL_SESSION *session);
13

DESCRIPTION

15       SSL_set_session() sets session to be used when the TLS/SSL connection
16       is to be established. SSL_set_session() is only useful for TLS/SSL
17       clients.  When the session is set, the reference count of session is
18       incremented by 1. If the session is not reused, the reference count is
19       decremented again during SSL_connect(). Whether the session was reused
20       can be queried with the SSL_session_reused(3) call.
21
22       If there is already a session set inside ssl (because it was set with
23       SSL_set_session() before or because the same ssl was already used for a
24       connection), SSL_SESSION_free() will be called for that session.
25

NOTES

27       SSL_SESSION objects keep internal link information about the session
28       cache list, when being inserted into one SSL_CTX object's session
29       cache.  One SSL_SESSION object, regardless of its reference count, must
30       therefore only be used with one SSL_CTX object (and the SSL objects
31       created from this SSL_CTX object).
32

RETURN VALUES

34       The following return values can occur:
35
36       0   The operation failed; check the error stack to find out the reason.
37
38       1   The operation succeeded.
39

SEE ALSO

41       ssl(3), SSL_SESSION_free(3), SSL_get_session(3), SSL_session_reused(3),
42       SSL_CTX_set_session_cache_mode(3)
43
44
45
461.0.0e                            2001-10-12                SSL_set_session(3)
Impressum