X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=doc%2Fssl%2FSSL_SESSION_free.pod;h=1906510e4168d9be2191e2d4476168fc9ee6ea0f;hp=110ec73ab622cc83d3dfec01462b100dd9d03b83;hb=0517ffc47c79136ba09fb34400e9e26c539615d1;hpb=477fd4596feb89fe943130c8b1a4e37a0d3764bb diff --git a/doc/ssl/SSL_SESSION_free.pod b/doc/ssl/SSL_SESSION_free.pod index 110ec73ab6..1906510e41 100644 --- a/doc/ssl/SSL_SESSION_free.pod +++ b/doc/ssl/SSL_SESSION_free.pod @@ -15,12 +15,13 @@ SSL_SESSION_free - free an allocated SSL_SESSION structure SSL_SESSION_free() decrements the reference count of B and removes the B structure pointed to by B and frees up the allocated memory, if the reference count has reached 0. +If B is NULL nothing is done. =head1 NOTES SSL_SESSION objects are allocated, when a TLS/SSL handshake operation is successfully completed. Depending on the settings, see -L, +L, the SSL_SESSION objects are internally referenced by the SSL_CTX and linked into its session cache. SSL objects may be using the SSL_SESSION object; as a session may be reused, several SSL objects may be using one SSL_SESSION @@ -31,13 +32,13 @@ dangling pointers. These failures may also appear delayed, e.g. when an SSL_SESSION 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 -L operation. +L operation. SSL_SESSION_free() must only be called for SSL_SESSION objects, for which the reference count was explicitly incremented (e.g. -by calling SSL_get1_session(), see L) +by calling SSL_get1_session(), see L) or when the SSL_SESSION object was generated outside a TLS handshake -operation, e.g. by using L. +operation, e.g. by using L. It must not be called on other SSL_SESSION objects, as this would cause incorrect reference counts and therefore program failures. @@ -47,9 +48,18 @@ SSL_SESSION_free() does not provide diagnostic information. =head1 SEE ALSO -L, L, -L, -L, - L +L, L, +L, +L, +L + +=head1 COPYRIGHT + +Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. + +Licensed under the OpenSSL license (the "License"). You may not use +this file except in compliance with the License. You can obtain a copy +in the file LICENSE in the source distribution or at +L. =cut