Manual Pages for UNIX Darwin command on man SSL_SESSION_free
MyWebUniversity

Manual Pages for UNIX Darwin command on man SSL_SESSION_free

SSLSESSIONfree(3) OpenSSL SSLSESSIONfree(3)

NAME

SSLSESSIONfree - free an allocated SSLSESSION structure

SYNOPSIS

#include

void SSLSESSIONfree(SSLSESSION *session);

DESCRIPTION

SSLSESSIONfree() decrements the reference count of sseessssiioonn and removes the SSSSLLSSEESSSSIIOONN structure pointed to by sseessssiioonn and frees up the allocated memory, if the the reference count has reached 0. NNOOTTEESS SSLSESSION objects are allocated, when a TLS/SSL handshake operation is successfully completed. Depending on the settings, see SSLCTXsetsessioncachemode(3), the SSLSESSION objects are internally referenced by the SSLCTX and linked into its session cache. SSL objects may be using the SSLSESSION object; as a session may be reused, several SSL objects may be using one SSLSESSION object at the same time. It is therefore crucial to keep the reference count (usage information) correct and not delete a SSLSESSION object that is still used, as this may lead to program failures due to dangling pointers. These failures may also appear delayed, e.g. when an SSLSESSION object was completely freed as the reference count incorrectly became 0, but it is still referenced in the internal session cache and the cache list is processed during a SSLCTXflushsessions(3) operation. SSLSESSIONfree() must only be called for SSLSESSION objects, for which the reference count was explicitly incremented (e.g. by calling SSLget1session(), see SSLgetsession(3)) or when the SSLSESSION object was generated outside a TLS handshake operation, e.g. by using d2iSSLSESSION(3). It must not be called on other SSLSESSION objects, as this would cause incorrect reference counts and therefore program failures.

RETURN VALUES

SSLSESSIONfree() does not provide diagnostic information.

SEE ALSO

ssl(3), SSLgetsession(3), SSLCTXsetsessioncachemode(3), SSLCTXflushsessions(3), d2iSSLSESSION(3)

0.9.7l 2001-10-12 SSLSESSIONfree(3)




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