Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
Standard preamble:
========================================================================
..
.... \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
. ds C` "" . ds C' "" 'br\} . ds C` . ds C' 'br\}
Escape single quotes in literal strings from groff's Unicode transform.
If the F register is >0, we'll generate index entries on stderr for
titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
entries marked with X<> in POD. Of course, you'll have to process the
output yourself in some meaningful fashion.
Avoid warning from groff about undefined register 'F'.
.. .nr rF 0 . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF ========================================================================
Title "COMP_CTX_NEW 3ossl"
way too many mistakes in technical documents.
\fBCOMP_CTX_new() is used to create a new COMP_CTX structure used to compress data.
\fBCOMP_CTX_free() is used to free the returned COMP_CTX. If the argument is NULL, nothing is done.
\fBCOMP_CTX_get_method() returns the COMP_METHOD of the given ctx.
\fBCOMP_CTX_get_type() and COMP_get_type() return the NID for the COMP_CTX and \fBCOMP_METHOD, respectively. COMP_get_name() returns the name of the algorithm of the given COMP_METHOD.
\fBCOMP_compress_block() compresses b<ilen> bytes from the buffer in into the buffer b<out> of size olen using the algorithm specified by ctx.
\fBCOMP_expand_block() expands ilen bytes from the buffer in into the buffer out of size olen using the algorithm specified by ctx.
Methods (COMP_METHOD) may be specified by one of these functions. These functions will be available even if their corresponding compression algorithm is not configured into the OpenSSL library. In such a case, NULL will be returned.
\fBBIO_f_zlib(), BIO_f_brotli() BIO_f_zstd() each return a BIO_METHOD that may be used to create a BIO via BIO_new\|(3) to read and write compressed files or streams. The functions are only available if the corresponding algorithm is compiled into the OpenSSL library. NULL may be returned if the algorithm fails to load dynamically.
Compression support and compression algorithms must be enabled and built into the library before use. Refer to the INSTALL.md file when configuring OpenSSL.
ZLIB may be found at <https://zlib.net>
Brotli may be found at <https://github.com/google/brotli>.
Zstandard may be found at <https://github.com/facebook/zstd>.
Compression of SSL/TLS records is not recommended, as it has been shown to lead to the CRIME attack <https://en.wikipedia.org/wiki/CRIME>. It is disabled by default, and may be enabled by clearing the SSL_OP_NO_COMPRESSION option and setting the security level as appropriate. See the documentation for the SSL_CTX_set_options\|(3) and \fBSSL_set_options\|(3) functions.
Compression is also used to support certificate compression as described in RFC8879 <https://datatracker.ietf.org/doc/html/rfc8879>. It may be disabled via the SSL_OP_NO_TX_CERTIFICATE_COMPRESSION and SSL_OP_NO_RX_CERTIFICATE_COMPRESSION options of the \fBSSL_CTX_set_options\|(3) or SSL_set_options\|(3) functions.
\fBCOMP_zlib(), COMP_brotli() and COMP_zstd() are stream-based compression methods. Internal state (including compression dictionary) is maintained between calls. If an error is returned, the stream is corrupted, and should be closed.
\fBCOMP_zlib_oneshot(), COMP_brotli_oneshot() and COMP_zstd_oneshot() are not stream-based. These methods do not maintain state between calls. An error in one call does not affect future calls.
\fBCOMP_CTX_get_method(), COMP_zlib(), COMP_zlib_oneshot(), COMP_brotli(), COMP_brotli_oneshot(), \fBCOMP_zstd(), and COMP_zstd_oneshot() return a COMP_METHOD on success, or NULL on failure.
\fBCOMP_CTX_get_type() and COMP_get_type() return a NID value. On failure, NID_undef is returned.
\fBCOMP_compress_block() and COMP_expand_block() return the number of bytes stored in the output buffer out. This may be 0. On failure, \-1 is returned.
\fBCOMP_get_name() returns a const char * that must not be freed on success, or NULL on failure.
\fBBIO_f_zlib(), BIO_f_brotli() and BIO_f_zstd() return NULL on error, and a BIO_METHOD on success.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.