Rename SSL[_CTX]_add1_CA_list -> SSL[_CTX]_add1_to_CA_list
[openssl.git] / doc / man3 / SSL_alloc_buffers.pod
1 =pod
2
3 =head1 NAME
4
5 SSL_free_buffers, SSL_alloc_buffers - manage SSL structure buffers
6
7 =head1 SYNOPSIS
8
9  #include <openssl/ssl.h>
10
11  int SSL_free_buffers(SSL *ssl);
12  int SSL_alloc_buffers(SSL *ssl);
13
14 =head1 DESCRIPTION
15
16 SSL_free_buffers() frees the read and write buffers of the given B<ssl>.
17 SSL_alloc_buffers() allocates the read and write buffers of the given B<ssl>.
18
19 The B<SSL_MODE_RELEASE_BUFFERS> mode releases read or write buffers whenever
20 the buffers have been drained. These functions allow applications to manually
21 control when buffers are freed and allocated.
22
23 After freeing the buffers, the buffers are automatically reallocated upon a
24 new read or write. The SSL_alloc_buffers() does not need to be called, but
25 can be used to make sure the buffers are pre-allocated. This can be used to
26 avoid allocation during data processing or with CRYPTO_set_mem_functions()
27 to control where and how buffers are allocated.
28
29 =head1 RETURN VALUES
30
31 The following return values can occur:
32
33 =over 4
34
35 =item 0 (Failure)
36
37 The SSL_free_buffers() function returns 0 when there is pending data to be
38 read or written. The SSL_alloc_buffers() function returns 0 when there is
39 an allocation failure.
40
41 =item 1 (Success)
42
43 The SSL_free_buffers() function returns 1 if the buffers have been freed. This
44 value is also returned if the buffers had been freed before calling
45 SSL_free_buffers().
46 The SSL_alloc_buffers() function returns 1 if the buffers have been allocated.
47 This value is also returned if the buffers had been allocated before calling
48 SSL_alloc_buffers().
49
50 =back
51
52 =head1 SEE ALSO
53
54 L<SSL_free(3)>, L<SSL_clear(3)>,
55 L<SSL_new(3)>, L<SSL_CTX_set_mode(3)>,
56 L<CRYPTO_set_mem_functions>
57
58 =head1 COPYRIGHT
59
60 Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
61
62 Licensed under the OpenSSL license (the "License").  You may not use
63 this file except in compliance with the License.  You can obtain a copy
64 in the file LICENSE in the source distribution or at
65 L<https://www.openssl.org/source/license.html>.
66
67 =cut