Manual Pages for UNIX Darwin command on man SSL_CTX_get_session_cache_mode
MyWebUniversity

Manual Pages for UNIX Darwin command on man SSL_CTX_get_session_cache_mode

SSLCTXsetsessioncachemode(3) OpenSSL SSLCTXsetsessioncachemode(3)

NAME

SSLCTXsetsessioncachemode, SSLCTXgetsessioncachemode -

enable/disable session caching

SYNOPSIS

#include

long SSLCTXsetsessioncachemode(SSLCTX ctx, long mode); long SSLCTXgetsessioncachemode(SSLCTX ctx);

DESCRIPTION

SSLCTXsetsessioncachemode() enables/disables session caching by setting the operational mode for ccttxx to . SSLCTXgetsessioncachemode() returns the currently used cache mode. NNOOTTEESS The OpenSSL library can store/retrieve SSL/TLS sessions for later reuse. The sessions can be held in memory for each ccttxx, if more than one SSLCTX object is being maintained, the sessions are unique for each SSLCTX object. In order to reuse a session, a client must send the session's id to the server. It can only send exactly one id. The server then either agrees to reuse the session or it starts a full handshake (to create a new session). A server will lookup up the session in its internal session storage. If the session is not found in internal storage or lookups for the internal storage have been deactivated (SSLSESSCACHENOINTERNALLOOKUP), the server will try the external storage if available. Since a client may try to reuse a session intended for use in a different context, the session id context must be set by the server (see SSLCTXsetsessionidcontext(3)). The following session cache modes and modifiers are available: SSLSESSCACHEOFF No session caching for client or server takes place. SSLSESSCACHECLIENT Client sessions are added to the session cache. As there is no reliable way for the OpenSSL library to know whether a session should be reused or which session to choose (due to the abstract BIO layer the SSL engine does not have details about the connection), the application must select the session to be reused by using the SSLsetsession(3) function. This option is not activated by default. SSLSESSCACHESERVER Server sessions are added to the session cache. When a client proposes a session to be reused, the server looks for the corresponding session in (first) the internal session cache (unless SSLSESSCACHENOINTERNALLOOKUP is set), then (second) in the external cache if available. If the session is found, the server will try to reuse the session. This is the default. SSLSESSCACHEBOTH Enable both SSLSESSCACHECLIENT and SSLSESSCACHESERVER at the same time. SSLSESSCACHENOAUTOCLEAR Normally the session cache is checked for expired sessions every 255 connections using the SSLCTXflushsessions(3) function. Since this may lead to a delay which cannot be controlled, the automatic flushing may be disabled and SSLCTXflushsessions(3) can be called explicitly by the application. SSLSESSCACHENOINTERNALLOOKUP

By setting this flag, session-resume operations in an SSL/TLS

server will not automatically look up sessions in the internal cache, even if sessions are automatically stored there. If external session caching callbacks are in use, this flag guarantees that all lookups are directed to the external cache. As automatic lookup only applies for SSL/TLS servers, the flag has no effect on clients. SSLSESSCACHENOINTERNALSTORE Depending on the presence of SSLSESSCACHECLIENT and/or SSLSESSCACHESERVER, sessions negotiated in an SSL/TLS handshake may be cached for possible reuse. Normally a new session is added to the internal cache as well as any external session caching (callback) that is configured for the SSLCTX. This flag will prevent sessions being stored in the internal cache (though the application can add them manually using SSLCTXaddsession(3)). Note: in any SSL/TLS servers where external caching is configured, any successful session lookups in the external cache (ie. for

session-resume requests) would normally be copied into the local

cache before processing continues - this flag prevents these

additions to the internal cache as well. SSLSESSCACHENOINTERNAL Enable both SSLSESSCACHENOINTERNALLOOKUP and SSLSESSCACHENOINTERNALSTORE at the same time. The default mode is SSLSESSCACHESERVER.

RETURN VALUES

SSLCTXsetsessioncachemode() returns the previously set cache mode. SSLCTXgetsessioncachemode() returns the currently set cache mode.

SEE ALSO

ssl(3), SSLsetsession(3), SSLsessionreused(3), SSLCTXaddsession(3), SSLCTXsessnumber(3), SSLCTXsesssetcachesize(3), SSLCTXsesssetgetcb(3), SSLCTXsetsessionidcontext(3), SSLCTXsettimeout(3), SSLCTXflushsessions(3) HISTORY SSLSESSCACHENOINTERNALSTORE and SSLSESSCACHENOINTERNAL were introduced in OpenSSL 0.9.6h.

0.9.7l 2002-10-29 SSLCTXsetsessioncachemode(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™