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