NAME
SSLsetsession - set a TLS/SSL session to be used during TLS/SSL
connectSYNOPSIS
#include
int SSLsetsession(SSL *ssl, SSLSESSION *session);DESCRIPTION
SSLsetsession() sets sseessssiioonn to be used when the TLS/SSL connection is to be established. SSLsetsession() is only useful for TLS/SSL clients. When the session is set, the reference count of sseessssiioonn is incremented by 1. If the session is not reused, the reference count is decremented again during SSLconnect(). Whether the session was reused can be queried with the SSLsessionreused(3) call. If there is already a session set inside ssssll (because it was set with SSLsetsession() before or because the same ssssll was already used for a connection), SSLSESSIONfree() will be called for that session. NNOOTTEESS SSLSESSION objects keep internal link information about the session cache list, when being inserted into one SSLCTX object's session cache. One SSLSESSION object, regardless of its reference count, must therefore only be used with one SSLCTX object (and the SSL objects created from this SSLCTX object).RETURN VALUES
The following return values can occur: 0 The operation failed; check the error stack to find out the reason. 1 The operation succeeded.SEE ALSO
ssl(3), SSLSESSIONfree(3), SSLgetsession(3), SSLsessionreused(3), SSLCTXsetsessioncachemode(3)0.9.7l 2001-10-12 SSLsetsession(3)