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