189837Skris=pod
289837Skris
389837Skris=head1 NAME
489837Skris
589837SkrisSSL_COMP_add_compression_method - handle SSL/TLS integrated compression methods
689837Skris
789837Skris=head1 SYNOPSIS
889837Skris
989837Skris #include <openssl/ssl.h>
1089837Skris
1189837Skris int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm);
1289837Skris
1389837Skris=head1 DESCRIPTION
1489837Skris
1589837SkrisSSL_COMP_add_compression_method() adds the compression method B<cm> with
1689837Skristhe identifier B<id> to the list of available compression methods. This
1789837Skrislist is globally maintained for all SSL operations within this application.
1889837SkrisIt cannot be set for specific SSL_CTX or SSL objects.
1989837Skris
2089837Skris=head1 NOTES
2189837Skris
2289837SkrisThe TLS standard (or SSLv3) allows the integration of compression methods
2389837Skrisinto the communication. The TLS RFC does however not specify compression
2489837Skrismethods or their corresponding identifiers, so there is currently no compatible
2589837Skrisway to integrate compression with unknown peers. It is therefore currently not
2689837Skrisrecommended to integrate compression into applications. Applications for
2789837Skrisnon-public use may agree on certain compression methods. Using different
2889837Skriscompression methods with the same identifier will lead to connection failure.
2989837Skris
3089837SkrisAn OpenSSL client speaking a protocol that allows compression (SSLv3, TLSv1)
3189837Skriswill unconditionally send the list of all compression methods enabled with
3289837SkrisSSL_COMP_add_compression_method() to the server during the handshake.
3389837SkrisUnlike the mechanisms to set a cipher list, there is no method available to
3489837Skrisrestrict the list of compression method on a per connection basis.
3589837Skris
3689837SkrisAn OpenSSL server will match the identifiers listed by a client against
3789837Skrisits own compression methods and will unconditionally activate compression
3889837Skriswhen a matching identifier is found. There is no way to restrict the list
3989837Skrisof compression methods supported on a per connection basis.
4089837Skris
4189837SkrisThe OpenSSL library has the compression methods B<COMP_rle()> and (when
4289837Skrisespecially enabled during compilation) B<COMP_zlib()> available.
4389837Skris
4489837Skris=head1 WARNINGS
4589837Skris
4689837SkrisOnce the identities of the compression methods for the TLS protocol have
4789837Skrisbeen standardized, the compression API will most likely be changed. Using
4889837Skrisit in the current state is not recommended.
4989837Skris
5089837Skris=head1 RETURN VALUES
5189837Skris
5289837SkrisSSL_COMP_add_compression_method() may return the following values:
5389837Skris
5489837Skris=over 4
5589837Skris
56267285Sjkim=item Z<>0
5789837Skris
5889837SkrisThe operation succeeded.
5989837Skris
60267285Sjkim=item Z<>1
6189837Skris
6289837SkrisThe operation failed. Check the error queue to find out the reason.
6389837Skris
6489837Skris=back
6589837Skris
6689837Skris=head1 SEE ALSO
6789837Skris
6889837SkrisL<ssl(3)|ssl(3)>
6989837Skris
7089837Skris=cut
71