1SSL_ALLOC_BUFFERS(3)                OpenSSL               SSL_ALLOC_BUFFERS(3)
2
3
4

NAME

6       SSL_free_buffers, SSL_alloc_buffers - manage SSL structure buffers
7

SYNOPSIS

9        #include <openssl/ssl.h>
10
11        int SSL_free_buffers(SSL *ssl);
12        int SSL_alloc_buffers(SSL *ssl);
13

DESCRIPTION

15       SSL_free_buffers() frees the read and write buffers of the given ssl.
16       SSL_alloc_buffers() allocates the read and write buffers of the given
17       ssl.
18
19       The SSL_MODE_RELEASE_BUFFERS mode releases read or write buffers
20       whenever the buffers have been drained. These functions allow
21       applications to manually control when buffers are freed and allocated.
22
23       After freeing the buffers, the buffers are automatically reallocated
24       upon a new read or write. The SSL_alloc_buffers() does not need to be
25       called, but can be used to make sure the buffers are pre-allocated.
26       This can be used to avoid allocation during data processing or with
27       CRYPTO_set_mem_functions() to control where and how buffers are
28       allocated.
29

RETURN VALUES

31       The following return values can occur:
32
33       0 (Failure)
34           The SSL_free_buffers() function returns 0 when there is pending
35           data to be read or written. The SSL_alloc_buffers() function
36           returns 0 when there is an allocation failure.
37
38       1 (Success)
39           The SSL_free_buffers() function returns 1 if the buffers have been
40           freed. This value is also returned if the buffers had been freed
41           before calling SSL_free_buffers().  The SSL_alloc_buffers()
42           function returns 1 if the buffers have been allocated.  This value
43           is also returned if the buffers had been allocated before calling
44           SSL_alloc_buffers().
45

SEE ALSO

47       SSL_free(3), SSL_clear(3), SSL_new(3), SSL_CTX_set_mode(3),
48       CRYPTO_set_mem_functions
49
51       Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
52
53       Licensed under the OpenSSL license (the "License").  You may not use
54       this file except in compliance with the License.  You can obtain a copy
55       in the file LICENSE in the source distribution or at
56       <https://www.openssl.org/source/license.html>.
57
58
59
601.1.1d                            2019-10-03              SSL_ALLOC_BUFFERS(3)
Impressum