![]() |
![]()
| ![]() |
![]()
NAME
SYNOPSIS
int
int
DESCRIPTION
Sessions are generated within a certain context. When exporting/importing sessions with i2d_SSL_SESSION(3) and d2i_SSL_SESSION(3), 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 sid_ctx which is used to distinguish the contexts and is stored in exported sessions. The sid_ctx can be any kind of binary data with a given length; it is therefore possible to use, for instance, the name of the application, the hostname, the service name... The session id context
becomes part of the session. The session id context is set by the SSL/TLS
server. The
OpenSSL clients will check the session id context returned by the server when reusing a session. The maximum length of the sid_ctx is limited
to WARNINGSIf 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
SEE ALSOHISTORY
|