2
0

SSL_alloc_buffers.pod 2.0 KB

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