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