Debian Codegraph @

upstream/debian-unstable/man3/SSL_COMP_add_compression_method.3ssl

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\" ========================================================================
56 .\"
57 .IX Title "SSL_COMP_ADD_COMPRESSION_METHOD 3SSL"
58 .TH SSL_COMP_ADD_COMPRESSION_METHOD 3SSL 2026-04-07 3.6.2 OpenSSL
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 SSL_COMP_add_compression_method, SSL_COMP_get_compression_methods,
65 SSL_COMP_get0_name, SSL_COMP_get_id, SSL_COMP_free_compression_methods
66 \&\- handle SSL/TLS integrated compression methods
67 .SH SYNOPSIS
68 .IX Header "SYNOPSIS"
69 .Vb 1
70 \& #include <openssl/ssl.h>
71 \&
72 \& int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm);
73 \& STACK_OF(SSL_COMP) *SSL_COMP_get_compression_methods(void);
74 \& const char *SSL_COMP_get0_name(const SSL_COMP *comp);
75 \& int SSL_COMP_get_id(const SSL_COMP *comp);
76 .Ve
77 .PP
78 The following function has been deprecated since OpenSSL 1.1.0, and can be
79 hidden entirely by defining \fBOPENSSL_API_COMPAT\fR with a suitable version value,
80 see \fBopenssl_user_macros\fR\|(7):
81 .PP
82 .Vb 1
83 \& void SSL_COMP_free_compression_methods(void);
84 .Ve
85 .SH DESCRIPTION
86 .IX Header "DESCRIPTION"
87 \&\fBSSL_COMP_add_compression_method()\fR adds the compression method \fBcm\fR with
88 the identifier \fBid\fR to the list of available compression methods. This
89 list is globally maintained for all SSL operations within this application.
90 It cannot be set for specific SSL_CTX or SSL objects.
91 .PP
92 \&\fBSSL_COMP_get_compression_methods()\fR returns a stack of all of the available
93 compression methods or NULL on error.
94 .PP
95 \&\fBSSL_COMP_get0_name()\fR returns the name of the compression method \fBcomp\fR.
96 .PP
97 \&\fBSSL_COMP_get_id()\fR returns the id of the compression method \fBcomp\fR.
98 .PP
99 \&\fBSSL_COMP_free_compression_methods()\fR releases any resources acquired to
100 maintain the internal table of compression methods.
101 .SH NOTES
102 .IX Header "NOTES"
103 The TLS standard (or SSLv3) allows the integration of compression methods
104 into the communication. The TLS RFC does however not specify compression
105 methods or their corresponding identifiers, so there is currently no compatible
106 way to integrate compression with unknown peers. It is therefore currently not
107 recommended to integrate compression into applications. Applications for
108 non-public use may agree on certain compression methods. Using different
109 compression methods with the same identifier will lead to connection failure.
110 .PP
111 An OpenSSL client speaking a protocol that allows compression (SSLv3, TLSv1)
112 will unconditionally send the list of all compression methods enabled with
113 \&\fBSSL_COMP_add_compression_method()\fR to the server during the handshake.
114 Unlike the mechanisms to set a cipher list, there is no method available to
115 restrict the list of compression method on a per connection basis.
116 .PP
117 An OpenSSL server will match the identifiers listed by a client against
118 its own compression methods and will unconditionally activate compression
119 when a matching identifier is found. There is no way to restrict the list
120 of compression methods supported on a per connection basis.
121 .PP
122 If enabled during compilation, the OpenSSL library will have the
123 following compression methods available:
124 .IP \fBCOMP_zlib()\fR 4
125 .IX Item "COMP_zlib()"
126 .PD 0
127 .IP \fBCOMP_brotli()\fR 4
128 .IX Item "COMP_brotli()"
129 .IP \fBCOMP_brotli_oneshot()\fR 4
130 .IX Item "COMP_brotli_oneshot()"
131 .IP \fBCOMP_zstd()\fR 4
132 .IX Item "COMP_zstd()"
133 .IP \fBCOMP_zstd_oneshot()\fR 4
134 .IX Item "COMP_zstd_oneshot()"
135 .PD
136 .SH "RETURN VALUES"
137 .IX Header "RETURN VALUES"
138 \&\fBSSL_COMP_add_compression_method()\fR may return the following values:
139 .IP 0 4
140 The operation succeeded.
141 .IP 1 4
142 .IX Item "1"
143 The operation failed. Check the error queue to find out the reason.
144 .PP
145 \&\fBSSL_COMP_get_compression_methods()\fR returns the stack of compressions methods or
146 NULL on error.
147 .PP
148 \&\fBSSL_COMP_get0_name()\fR returns the name of the compression method or NULL on error.
149 .PP
150 \&\fBSSL_COMP_get_id()\fR returns the name of the compression method or \-1 on error.
151 .SH "SEE ALSO"
152 .IX Header "SEE ALSO"
153 \&\fBssl\fR\|(7)
154 .SH HISTORY
155 .IX Header "HISTORY"
156 The \fBSSL_COMP_free_compression_methods()\fR function was deprecated in OpenSSL 1.1.0.
157 The \fBSSL_COMP_get0_name()\fR and \fBSSL_comp_get_id()\fR functions were added in OpenSSL 1.1.0d.
158 .SH COPYRIGHT
159 .IX Header "COPYRIGHT"
160 Copyright 2001\-2020 The OpenSSL Project Authors. All Rights Reserved.
161 .PP
162 Licensed under the Apache License 2.0 (the "License"). You may not use
163 this file except in compliance with the License. You can obtain a copy
164 in the file LICENSE in the source distribution or at
165 <https://www.openssl.org/source/license.html>.