1SSL_COMP_add_compression_method(3) OpenSSL SSL_COMP_add_compression_method(3)
2
3
4
6 SSL_COMP_add_compression_method, SSL_COMP_free_compression_methods -
7 handle SSL/TLS integrated compression methods
8
10 #include <openssl/ssl.h>
11
12 int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm);
13
14 +void SSL_COMP_free_compression_methods(void);
15
17 SSL_COMP_add_compression_method() adds the compression method cm with
18 the identifier id to the list of available compression methods. This
19 list is globally maintained for all SSL operations within this
20 application. It cannot be set for specific SSL_CTX or SSL objects.
21
22 SSL_COMP_free_compression_methods() frees the internal table of
23 compression methods that were built internally, and possibly augmented
24 by adding SSL_COMP_add_compression_method().
25
27 The TLS standard (or SSLv3) allows the integration of compression
28 methods into the communication. The TLS RFC does however not specify
29 compression methods or their corresponding identifiers, so there is
30 currently no compatible way to integrate compression with unknown
31 peers. It is therefore currently not recommended to integrate
32 compression into applications. Applications for non-public use may
33 agree on certain compression methods. Using different compression
34 methods with the same identifier will lead to connection failure.
35
36 An OpenSSL client speaking a protocol that allows compression (SSLv3,
37 TLSv1) will unconditionally send the list of all compression methods
38 enabled with SSL_COMP_add_compression_method() to the server during the
39 handshake. Unlike the mechanisms to set a cipher list, there is no
40 method available to restrict the list of compression method on a per
41 connection basis.
42
43 An OpenSSL server will match the identifiers listed by a client against
44 its own compression methods and will unconditionally activate
45 compression when a matching identifier is found. There is no way to
46 restrict the list of compression methods supported on a per connection
47 basis.
48
49 If enabled during compilation, the OpenSSL library will have the
50 COMP_zlib() compression method available.
51
53 Once the identities of the compression methods for the TLS protocol
54 have been standardized, the compression API will most likely be
55 changed. Using it in the current state is not recommended.
56
57 It is also not recommended to use compression if data transfered
58 contain untrusted parts that can be manipulated by an attacker as he
59 could then get information about the encrypted data. See the CRIME
60 attack. For that reason the default loading of the zlib compression
61 method is disabled and enabled only if the environment variable
62 OPENSSL_DEFAULT_ZLIB is present during the library initialization.
63
65 SSL_COMP_add_compression_method() may return the following values:
66
67 0 The operation succeeded.
68
69 1 The operation failed. Check the error queue to find out the reason.
70
72 ssl(3)
73
74
75
761.0.2o 2019-09-10SSL_COMP_add_compression_method(3)