mbedtls_ssl_set_session() is only used within mbedTLS.
 
Symbols
loading...
Files
loading...
SummarySyntaxArgumentsRelatedReferencesCall TreeData Use

Return value

\c 0 if successful. \c MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE if the session could not be loaded because one session has already been loaded. This error is non-fatal, and has no observable effect on the SSL context or the session that was attempted to be loaded. Another negative error code on other kinds of failure.

Notes

Even if this call succeeds, it is not guaranteed that the next handshake will indeed be shortened through the use of session resumption: The server is always free to reject any attempt for resumption and fall back to a full handshake. This function can handle a variety of mechanisms for session resumption: For TLS 1.2, both session ID-based resumption and ticket-based resumption will be considered. For TLS 1.3, sessions equate to tickets, and loading one session by calling this function will lead to its corresponding ticket being advertised as resumption PSK by the client. This depends on session tickets being enabled (see #MBEDTLS_SSL_SESSION_TICKETS configuration option) though. If session tickets are disabled, a call to this function with a TLS 1.3 session, will not have any effect on the next handshake for the SSL context \p ssl.

References