Manual Pages for UNIX Darwin command on man SSL_CTX_set_session_id_context
MyWebUniversity

Manual Pages for UNIX Darwin command on man SSL_CTX_set_session_id_context

SSLCTXsetsessionidcontext(3) OpenSSL SSLCTXsetsessionidcontext(3)

NAME

SSLCTXsetsessionidcontext, SSLsetsessionidcontext - set

context within which session can be reused (server side only)

SYNOPSIS

#include

int SSLCTXsetsessionidcontext(SSLCTX *ctx, const unsigned char *sidctx, unsigned int sidctxlen); int SSLsetsessionidcontext(SSL *ssl, const unsigned char *sidctx, unsigned int sidctxlen);

DESCRIPTION

SSLCTXsetsessionidcontext() sets the context ssiiddccttxx of length ssiiddccttxxlleenn within which a session can be reused for the ccttxx object. SSLsetsessionidcontext() sets the context ssiiddccttxx of length ssiiddccttxxlleenn within which a session can be reused for the ssssll object. NNOOTTEESS Sessions are generated within a certain context. When exporting/importing sessions with ii22ddSSSSLLSSEESSSSIIOONN/dd22iiSSSSLLSSEESSSSIIOONN it

would be possible, to re-import a session generated from another

context (e.g. another application), which might lead to malfunctions. Therefore each application must set its own session id context ssiiddccttxx which is used to distinguish the contexts and is stored in exported sessions. The ssiiddccttxx can be any kind of binary data with a given length, it is therefore possible to use e.g. the name of the application and/or the hostname and/or service name ... The session id context becomes part of the session. The session id context is set by the SSL/TLS server. The SSLCTXsetsessionidcontext() and SSLsetsessionidcontext() functions are therefore only useful on the server side. OpenSSL clients will check the session id context returned by the server when reusing a session. The maximum length of the ssiiddccttxx is limited to SSSSLLMMAAXXSSSSLLSSEESSSSIIOONNIIDDLLEENNGGTTHH. WWAARRNNIINNGGSS If the session id context is not set on an SSL/TLS server and client certificates are used, stored sessions will not be reused but a fatal error will be flagged and the handshake will fail. If a server returns a different session id context to an OpenSSL client when reusing a session, an error will be flagged and the handshake will fail. OpenSSL servers will always return the correct session id context, as an OpenSSL server checks the session id context itself before reusing a session as described above.

RETURN VALUES

SSLCTXsetsessionidcontext() and SSLsetsessionidcontext() return the following values: 0 The length ssiiddccttxxlleenn of the session id context ssiiddccttxx exceeded the maximum allowed length of SSSSLLMMAAXXSSSSLLSSEESSSSIIOONNIIDDLLEENNGGTTHH. The error is logged to the error stack. 1 The operation succeeded.

SEE ALSO

ssl(3)

0.9.7l 2004-06-14 SSLCTXsetsessionidcontext(3)




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