SSL_free.pod 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. =pod
  2. =head1 NAME
  3. SSL_free - free an allocated SSL structure
  4. =head1 SYNOPSIS
  5. #include <openssl/ssl.h>
  6. void SSL_free(SSL *ssl);
  7. =head1 DESCRIPTION
  8. SSL_free() decrements the reference count of B<ssl>, and removes the SSL
  9. structure pointed to by B<ssl> and frees up the allocated memory if the
  10. reference count has reached 0.
  11. If B<ssl> is NULL nothing is done.
  12. =head1 NOTES
  13. SSL_free() also calls the free()ing procedures for indirectly affected items, if
  14. applicable: the buffering BIO, the read and write BIOs,
  15. cipher lists specially created for this B<ssl>, the B<SSL_SESSION>.
  16. Do not explicitly free these indirectly freed up items before or after
  17. calling SSL_free(), as trying to free things twice may lead to program
  18. failure.
  19. The ssl session has reference counts from two users: the SSL object, for
  20. which the reference count is removed by SSL_free() and the internal
  21. session cache. If the session is considered bad, because
  22. L<SSL_shutdown(3)> was not called for the connection
  23. and L<SSL_set_shutdown(3)> was not used to set the
  24. SSL_SENT_SHUTDOWN state, the session will also be removed
  25. from the session cache as required by RFC2246.
  26. =head1 RETURN VALUES
  27. SSL_free() does not provide diagnostic information.
  28. L<SSL_new(3)>, L<SSL_clear(3)>,
  29. L<SSL_shutdown(3)>, L<SSL_set_shutdown(3)>,
  30. L<ssl(7)>
  31. =head1 COPYRIGHT
  32. Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
  33. Licensed under the Apache License 2.0 (the "License"). You may not use
  34. this file except in compliance with the License. You can obtain a copy
  35. in the file LICENSE in the source distribution or at
  36. L<https://www.openssl.org/source/license.html>.
  37. =cut