Deleted Added
full compact
SSL_CTX_set_session_cache_mode.pod (89837) SSL_CTX_set_session_cache_mode.pod (109998)
1=pod
2
3=head1 NAME
4
5SSL_CTX_set_session_cache_mode, SSL_CTX_get_session_cache_mode - enable/disable session caching
6
7=head1 SYNOPSIS
8

--- 12 unchanged lines hidden (view full) ---

21=head1 NOTES
22
23The OpenSSL library can store/retrieve SSL/TLS sessions for later reuse.
24The sessions can be held in memory for each B<ctx>, if more than one
25SSL_CTX object is being maintained, the sessions are unique for each SSL_CTX
26object.
27
28In order to reuse a session, a client must send the session's id to the
1=pod
2
3=head1 NAME
4
5SSL_CTX_set_session_cache_mode, SSL_CTX_get_session_cache_mode - enable/disable session caching
6
7=head1 SYNOPSIS
8

--- 12 unchanged lines hidden (view full) ---

21=head1 NOTES
22
23The OpenSSL library can store/retrieve SSL/TLS sessions for later reuse.
24The sessions can be held in memory for each B<ctx>, if more than one
25SSL_CTX object is being maintained, the sessions are unique for each SSL_CTX
26object.
27
28In order to reuse a session, a client must send the session's id to the
29server. It can only send exactly one id. The server then decides whether it
30agrees in reusing the session or starts the handshake for a new session.
29server. It can only send exactly one id. The server then either
30agrees to reuse the session or it starts a full handshake (to create a new
31session).
31
32
32A server will lookup up the session in its internal session storage. If
33the session is not found in internal storage or internal storage is
34deactivated, the server will try the external storage if available.
33A server will lookup up the session in its internal session storage. If the
34session is not found in internal storage or lookups for the internal storage
35have been deactivated (SSL_SESS_CACHE_NO_INTERNAL_LOOKUP), the server will try
36the external storage if available.
35
36Since a client may try to reuse a session intended for use in a different
37context, the session id context must be set by the server (see
38L<SSL_CTX_set_session_id_context(3)|SSL_CTX_set_session_id_context(3)>).
39
40The following session cache modes and modifiers are available:
41
42=over 4

--- 9 unchanged lines hidden (view full) ---

52session to choose (due to the abstract BIO layer the SSL engine does not
53have details about the connection), the application must select the session
54to be reused by using the L<SSL_set_session(3)|SSL_set_session(3)>
55function. This option is not activated by default.
56
57=item SSL_SESS_CACHE_SERVER
58
59Server sessions are added to the session cache. When a client proposes a
37
38Since a client may try to reuse a session intended for use in a different
39context, the session id context must be set by the server (see
40L<SSL_CTX_set_session_id_context(3)|SSL_CTX_set_session_id_context(3)>).
41
42The following session cache modes and modifiers are available:
43
44=over 4

--- 9 unchanged lines hidden (view full) ---

54session to choose (due to the abstract BIO layer the SSL engine does not
55have details about the connection), the application must select the session
56to be reused by using the L<SSL_set_session(3)|SSL_set_session(3)>
57function. This option is not activated by default.
58
59=item SSL_SESS_CACHE_SERVER
60
61Server sessions are added to the session cache. When a client proposes a
60session to be reused, the session is looked up in the internal session cache.
61If the session is found, the server will try to reuse the session.
62This is the default.
62session to be reused, the server looks for the corresponding session in (first)
63the internal session cache (unless SSL_SESS_CACHE_NO_INTERNAL_LOOKUP is set),
64then (second) in the external cache if available. If the session is found, the
65server will try to reuse the session. This is the default.
63
64=item SSL_SESS_CACHE_BOTH
65
66Enable both SSL_SESS_CACHE_CLIENT and SSL_SESS_CACHE_SERVER at the same time.
67
68=item SSL_SESS_CACHE_NO_AUTO_CLEAR
69
70Normally the session cache is checked for expired sessions every
71255 connections using the
72L<SSL_CTX_flush_sessions(3)|SSL_CTX_flush_sessions(3)> function. Since
73this may lead to a delay which cannot be controlled, the automatic
74flushing may be disabled and
75L<SSL_CTX_flush_sessions(3)|SSL_CTX_flush_sessions(3)> can be called
76explicitly by the application.
77
78=item SSL_SESS_CACHE_NO_INTERNAL_LOOKUP
79
66
67=item SSL_SESS_CACHE_BOTH
68
69Enable both SSL_SESS_CACHE_CLIENT and SSL_SESS_CACHE_SERVER at the same time.
70
71=item SSL_SESS_CACHE_NO_AUTO_CLEAR
72
73Normally the session cache is checked for expired sessions every
74255 connections using the
75L<SSL_CTX_flush_sessions(3)|SSL_CTX_flush_sessions(3)> function. Since
76this may lead to a delay which cannot be controlled, the automatic
77flushing may be disabled and
78L<SSL_CTX_flush_sessions(3)|SSL_CTX_flush_sessions(3)> can be called
79explicitly by the application.
80
81=item SSL_SESS_CACHE_NO_INTERNAL_LOOKUP
82
80By setting this flag sessions are cached in the internal storage but
81they are not looked up automatically. If an external session cache
82is enabled, sessions are looked up in the external cache. As automatic
83lookup only applies for SSL/TLS servers, the flag has no effect on
83By setting this flag, session-resume operations in an SSL/TLS server will not
84automatically look up sessions in the internal cache, even if sessions are
85automatically stored there. If external session caching callbacks are in use,
86this flag guarantees that all lookups are directed to the external cache.
87As automatic lookup only applies for SSL/TLS servers, the flag has no effect on
84clients.
85
88clients.
89
90=item SSL_SESS_CACHE_NO_INTERNAL_STORE
91
92Depending on the presence of SSL_SESS_CACHE_CLIENT and/or SSL_SESS_CACHE_SERVER,
93sessions negotiated in an SSL/TLS handshake may be cached for possible reuse.
94Normally a new session is added to the internal cache as well as any external
95session caching (callback) that is configured for the SSL_CTX. This flag will
96prevent sessions being stored in the internal cache (though the application can
97add them manually using L<SSL_CTX_add_session(3)|SSL_CTX_add_session(3)>). Note:
98in any SSL/TLS servers where external caching is configured, any successful
99session lookups in the external cache (ie. for session-resume requests) would
100normally be copied into the local cache before processing continues - this flag
101prevents these additions to the internal cache as well.
102
103=item SSL_SESS_CACHE_NO_INTERNAL
104
105Enable both SSL_SESS_CACHE_NO_INTERNAL_LOOKUP and
106SSL_SESS_CACHE_NO_INTERNAL_STORE at the same time.
107
108
86=back
87
88The default mode is SSL_SESS_CACHE_SERVER.
89
90=head1 RETURN VALUES
91
92SSL_CTX_set_session_cache_mode() returns the previously set cache mode.
93
94SSL_CTX_get_session_cache_mode() returns the currently set cache mode.
95
96
97=head1 SEE ALSO
98
99L<ssl(3)|ssl(3)>, L<SSL_set_session(3)|SSL_set_session(3)>,
100L<SSL_session_reused(3)|SSL_session_reused(3)>,
109=back
110
111The default mode is SSL_SESS_CACHE_SERVER.
112
113=head1 RETURN VALUES
114
115SSL_CTX_set_session_cache_mode() returns the previously set cache mode.
116
117SSL_CTX_get_session_cache_mode() returns the currently set cache mode.
118
119
120=head1 SEE ALSO
121
122L<ssl(3)|ssl(3)>, L<SSL_set_session(3)|SSL_set_session(3)>,
123L<SSL_session_reused(3)|SSL_session_reused(3)>,
124L<SSL_CTX_add_session(3)|SSL_CTX_add_session(3)>,
101L<SSL_CTX_sess_number(3)|SSL_CTX_sess_number(3)>,
102L<SSL_CTX_sess_set_cache_size(3)|SSL_CTX_sess_set_cache_size(3)>,
103L<SSL_CTX_sess_set_get_cb(3)|SSL_CTX_sess_set_get_cb(3)>,
104L<SSL_CTX_set_session_id_context(3)|SSL_CTX_set_session_id_context(3)>,
105L<SSL_CTX_set_timeout(3)|SSL_CTX_set_timeout(3)>,
106L<SSL_CTX_flush_sessions(3)|SSL_CTX_flush_sessions(3)>
107
125L<SSL_CTX_sess_number(3)|SSL_CTX_sess_number(3)>,
126L<SSL_CTX_sess_set_cache_size(3)|SSL_CTX_sess_set_cache_size(3)>,
127L<SSL_CTX_sess_set_get_cb(3)|SSL_CTX_sess_set_get_cb(3)>,
128L<SSL_CTX_set_session_id_context(3)|SSL_CTX_set_session_id_context(3)>,
129L<SSL_CTX_set_timeout(3)|SSL_CTX_set_timeout(3)>,
130L<SSL_CTX_flush_sessions(3)|SSL_CTX_flush_sessions(3)>
131
132=head1 HISTORY
133
134SSL_SESS_CACHE_NO_INTERNAL_STORE and SSL_SESS_CACHE_NO_INTERNAL
135were introduced in OpenSSL 0.9.6h.
136
108=cut
137=cut