SSL_free.pod 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. the reference count has reached 0.
  11. =head1 NOTES
  12. SSL_free() also calls the free()ing procedures for indirectly affected items, if
  13. applicable: the buffering BIO, the read and write BIOs,
  14. cipher lists specially created for this B<ssl>, the B<SSL_SESSION>.
  15. Do not explicitly free these indirectly freed up items before or after
  16. calling SSL_free(), as trying to free things twice may lead to program
  17. failure.
  18. The ssl session has reference counts from two users: the SSL object, for
  19. which the reference count is removed by SSL_free() and the internal
  20. session cache. If the session is considered bad, because
  21. L<SSL_shutdown(3)|SSL_shutdown(3)> was not called for the connection
  22. and L<SSL_set_shutdown(3)|SSL_set_shutdown(3)> was not used to set the
  23. SSL_SENT_SHUTDOWN state, the session will also be removed
  24. from the session cache as required by RFC2246.
  25. =head1 RETURN VALUES
  26. SSL_free() does not provide diagnostic information.
  27. L<SSL_new(3)|SSL_new(3)>, L<SSL_clear(3)|SSL_clear(3)>,
  28. L<SSL_shutdown(3)|SSL_shutdown(3)>, L<SSL_set_shutdown(3)|SSL_set_shutdown(3)>,
  29. L<ssl(3)|ssl(3)>
  30. =cut