SSL_COMP_add_compression_method.pod revision 279264
1=pod
2
3=head1 NAME
4
5SSL_COMP_add_compression_method - handle SSL/TLS integrated compression methods
6
7=head1 SYNOPSIS
8
9 #include <openssl/ssl.h>
10
11 int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm);
12
13=head1 DESCRIPTION
14
15SSL_COMP_add_compression_method() adds the compression method B<cm> with
16the identifier B<id> to the list of available compression methods. This
17list is globally maintained for all SSL operations within this application.
18It cannot be set for specific SSL_CTX or SSL objects.
19
20=head1 NOTES
21
22The TLS standard (or SSLv3) allows the integration of compression methods
23into the communication. The TLS RFC does however not specify compression
24methods or their corresponding identifiers, so there is currently no compatible
25way to integrate compression with unknown peers. It is therefore currently not
26recommended to integrate compression into applications. Applications for
27non-public use may agree on certain compression methods. Using different
28compression methods with the same identifier will lead to connection failure.
29
30An OpenSSL client speaking a protocol that allows compression (SSLv3, TLSv1)
31will unconditionally send the list of all compression methods enabled with
32SSL_COMP_add_compression_method() to the server during the handshake.
33Unlike the mechanisms to set a cipher list, there is no method available to
34restrict the list of compression method on a per connection basis.
35
36An OpenSSL server will match the identifiers listed by a client against
37its own compression methods and will unconditionally activate compression
38when a matching identifier is found. There is no way to restrict the list
39of compression methods supported on a per connection basis.
40
41The OpenSSL library has the compression methods B<COMP_rle()> and (when
42especially enabled during compilation) B<COMP_zlib()> available.
43
44=head1 WARNINGS
45
46Once the identities of the compression methods for the TLS protocol have
47been standardized, the compression API will most likely be changed. Using
48it in the current state is not recommended.
49
50=head1 RETURN VALUES
51
52SSL_COMP_add_compression_method() may return the following values:
53
54=over 4
55
56=item Z<>0
57
58The operation succeeded.
59
60=item Z<>1
61
62The operation failed. Check the error queue to find out the reason.
63
64=back
65
66=head1 SEE ALSO
67
68L<ssl(3)|ssl(3)>
69
70=cut
71