1 1.1 christos =pod 2 1.1 christos 3 1.1 christos =head1 NAME 4 1.1 christos 5 1.1 christos SSL_CTX_free - free an allocated SSL_CTX object 6 1.1 christos 7 1.1 christos =head1 SYNOPSIS 8 1.1 christos 9 1.1 christos #include <openssl/ssl.h> 10 1.1 christos 11 1.1 christos void SSL_CTX_free(SSL_CTX *ctx); 12 1.1 christos 13 1.1 christos =head1 DESCRIPTION 14 1.1 christos 15 1.1 christos SSL_CTX_free() decrements the reference count of B<ctx>, and removes the 16 1.1 christos SSL_CTX object pointed to by B<ctx> and frees up the allocated memory if the reference count has reached 0. 17 1.1 christos 18 1.1 christos It also calls the free()ing procedures for indirectly affected items, if 19 1.1 christos applicable: the session cache, the list of ciphers, the list of Client CAs, 20 1.1 christos the certificates and keys. 21 1.1 christos 22 1.1 christos If B<ctx> is NULL nothing is done. 23 1.1 christos 24 1.1 christos =head1 WARNINGS 25 1.1 christos 26 1.1 christos If a session-remove callback is set (SSL_CTX_sess_set_remove_cb()), this 27 1.1 christos callback will be called for each session being freed from B<ctx>'s 28 1.1 christos session cache. This implies, that all corresponding sessions from an 29 1.1 christos external session cache are removed as well. If this is not desired, the user 30 1.1 christos should explicitly unset the callback by calling 31 1.1 christos SSL_CTX_sess_set_remove_cb(B<ctx>, NULL) prior to calling SSL_CTX_free(). 32 1.1 christos 33 1.1 christos =head1 RETURN VALUES 34 1.1 christos 35 1.1 christos SSL_CTX_free() does not provide diagnostic information. 36 1.1 christos 37 1.1 christos =head1 SEE ALSO 38 1.1 christos 39 1.1 christos L<SSL_CTX_new(3)>, L<ssl(7)>, 40 1.1 christos L<SSL_CTX_sess_set_get_cb(3)> 41 1.1 christos 42 1.1 christos =head1 COPYRIGHT 43 1.1 christos 44 1.1 christos Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. 45 1.1 christos 46 1.1.1.2 christos Licensed under the Apache License 2.0 (the "License"). You may not use 47 1.1 christos this file except in compliance with the License. You can obtain a copy 48 1.1 christos in the file LICENSE in the source distribution or at 49 1.1 christos L<https://www.openssl.org/source/license.html>. 50 1.1 christos 51 1.1 christos =cut 52