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