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