Merge from vendor branch NTPD:
[dragonfly.git] / crypto / openssl-0.9.7e / doc / ssl / SSL_free.pod
1 =pod
2
3 =head1 NAME
4
5 SSL_free - free an allocated SSL structure
6
7 =head1 SYNOPSIS
8
9  #include <openssl/ssl.h>
10
11  void SSL_free(SSL *ssl);
12
13 =head1 DESCRIPTION
14
15 SSL_free() decrements the reference count of B<ssl>, and removes the SSL
16 structure pointed to by B<ssl> and frees up the allocated memory if the
17 the reference count has reached 0.
18
19 =head1 NOTES
20
21 SSL_free() also calls the free()ing procedures for indirectly affected items, if
22 applicable: the buffering BIO, the read and write BIOs,
23 cipher lists specially created for this B<ssl>, the B<SSL_SESSION>.
24 Do not explicitly free these indirectly freed up items before or after
25 calling SSL_free(), as trying to free things twice may lead to program
26 failure.
27
28 The ssl session has reference counts from two users: the SSL object, for
29 which the reference count is removed by SSL_free() and the internal
30 session cache. If the session is considered bad, because
31 L<SSL_shutdown(3)|SSL_shutdown(3)> was not called for the connection
32 and L<SSL_set_shutdown(3)|SSL_set_shutdown(3)> was not used to set the
33 SSL_SENT_SHUTDOWN state, the session will also be removed
34 from the session cache as required by RFC2246.
35
36 =head1 RETURN VALUES
37
38 SSL_free() does not provide diagnostic information.
39
40 L<SSL_new(3)|SSL_new(3)>, L<SSL_clear(3)|SSL_clear(3)>,
41 L<SSL_shutdown(3)|SSL_shutdown(3)>, L<SSL_set_shutdown(3)|SSL_set_shutdown(3)>,
42 L<ssl(3)|ssl(3)>
43
44 =cut