1344779Sdim=pod 2317017Sdim 3353358Sdim=head1 NAME 4353358Sdim 5353358SdimSSL_COMP_add_compression_method - handle SSL/TLS integrated compression methods 6317017Sdim 7317017Sdim=head1 SYNOPSIS 8327952Sdim 9327952Sdim #include <openssl/ssl.h> 10317017Sdim 11317017Sdim int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm); 12317017Sdim 13317017Sdim=head1 DESCRIPTION 14317017Sdim 15317017SdimSSL_COMP_add_compression_method() adds the compression method B<cm> with 16317017Sdimthe identifier B<id> to the list of available compression methods. This 17317017Sdimlist is globally maintained for all SSL operations within this application. 18317017SdimIt cannot be set for specific SSL_CTX or SSL objects. 19327952Sdim 20317969Sdim=head1 NOTES 21327952Sdim 22327952SdimThe TLS standard (or SSLv3) allows the integration of compression methods 23327952Sdiminto the communication. The TLS RFC does however not specify compression 24317017Sdimmethods or their corresponding identifiers, so there is currently no compatible 25327952Sdimway to integrate compression with unknown peers. It is therefore currently not 26327952Sdimrecommended to integrate compression into applications. Applications for 27327952Sdimnon-public use may agree on certain compression methods. Using different 28327952Sdimcompression methods with the same identifier will lead to connection failure. 29327952Sdim 30317017SdimAn OpenSSL client speaking a protocol that allows compression (SSLv3, TLSv1) 31317017Sdimwill unconditionally send the list of all compression methods enabled with 32317017SdimSSL_COMP_add_compression_method() to the server during the handshake. 33317969SdimUnlike the mechanisms to set a cipher list, there is no method available to 34317969Sdimrestrict the list of compression method on a per connection basis. 35317969Sdim 36317969SdimAn OpenSSL server will match the identifiers listed by a client against 37317969Sdimits own compression methods and will unconditionally activate compression 38317969Sdimwhen a matching identifier is found. There is no way to restrict the list 39317969Sdimof compression methods supported on a per connection basis. 40317969Sdim 41317969SdimThe OpenSSL library has the compression methods B<COMP_rle()> and (when 42327952Sdimespecially enabled during compilation) B<COMP_zlib()> available. 43317969Sdim 44317969Sdim=head1 WARNINGS 45317969Sdim 46344779SdimOnce the identities of the compression methods for the TLS protocol have 47317969Sdimbeen standardized, the compression API will most likely be changed. Using 48317969Sdimit in the current state is not recommended. 49317969Sdim 50317969Sdim=head1 RETURN VALUES 51317969Sdim 52317969SdimSSL_COMP_add_compression_method() may return the following values: 53317969Sdim 54317969Sdim=over 4 55317969Sdim 56317969Sdim=item Z<>0 57317969Sdim 58317969SdimThe operation succeeded. 59317969Sdim 60317969Sdim=item Z<>1 61344779Sdim 62317017SdimThe operation failed. Check the error queue to find out the reason. 63317017Sdim 64317017Sdim=back 65 66=head1 SEE ALSO 67 68L<ssl(3)|ssl(3)> 69 70=cut 71