Debian Codegraph @

templates/man3/SSL_CTX_set_generate_session_id.3ssl.pot

raw
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2026-06-05 06:44+0200\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <[email protected]>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 # #-#-#-#-# archlinux: SSL_CTX_set_generate_session_id.3ssl.pot (PACKAGE VERSION) #-#-#-#-#
20 #
21 #. #-#-#-#-# archlinux: SSL_CTX_set_generate_session_id.3ssl.pot (PACKAGE VERSION) #-#-#-#-#
22 #. Required to disable full justification in groff 1.23.0.
23 #. ========================================================================
24 #. type: IX
25 #. #-#-#-#-# debian-trixie: SSL_CTX_set_generate_session_id.3ssl.pot (PACKAGE VERSION) #-#-#-#-#
26 #. ========================================================================
27 #. type: IX
28 #. #-#-#-#-# debian-unstable: SSL_CTX_set_generate_session_id.3ssl.pot (PACKAGE VERSION) #-#-#-#-#
29 #. ========================================================================
30 #. type: IX
31 #: archlinux debian-trixie debian-unstable
32 #, no-wrap
33 msgid "Title"
34 msgstr ""
35
36 #
37 #. Required to disable full justification in groff 1.23.0.
38 #. ========================================================================
39 #. type: IX
40 #: archlinux
41 #, no-wrap
42 msgid "SSL_CTX_SET_GENERATE_SESSION_ID 3ssl"
43 msgstr ""
44
45 #. type: TH
46 #: archlinux debian-trixie debian-unstable
47 #, no-wrap
48 msgid "SSL_CTX_SET_GENERATE_SESSION_ID"
49 msgstr ""
50
51 #. type: TH
52 #: archlinux debian-trixie debian-unstable
53 #, no-wrap
54 msgid "2026-04-07"
55 msgstr ""
56
57 #. type: TH
58 #: archlinux debian-unstable
59 #, no-wrap
60 msgid "3.6.2"
61 msgstr ""
62
63 #. type: TH
64 #: archlinux debian-trixie debian-unstable
65 #, no-wrap
66 msgid "OpenSSL"
67 msgstr ""
68
69 #. type: SH
70 #: archlinux debian-trixie debian-unstable
71 #, no-wrap
72 msgid "NAME"
73 msgstr ""
74
75 #. type: Plain text
76 #: archlinux debian-trixie debian-unstable
77 msgid ""
78 "SSL_CTX_set_generate_session_id, SSL_set_generate_session_id, "
79 "SSL_has_matching_session_id, GEN_SESSION_CB \\&- manipulate generation of "
80 "SSL session IDs (server only)"
81 msgstr ""
82
83 #. type: IX
84 #: archlinux debian-trixie debian-unstable
85 #, no-wrap
86 msgid "SYNOPSIS"
87 msgstr ""
88
89 #. type: IX
90 #: archlinux debian-trixie debian-unstable
91 #, no-wrap
92 msgid "Header"
93 msgstr ""
94
95 #. type: Plain text
96 #: archlinux debian-trixie debian-unstable
97 #, no-wrap
98 msgid ""
99 "\\& #include E<lt>openssl/ssl.hE<gt>\n"
100 "\\&\n"
101 "\\& typedef int (*GEN_SESSION_CB)(SSL *ssl, unsigned char *id,\n"
102 "\\& unsigned int *id_len);\n"
103 "\\&\n"
104 "\\& int SSL_CTX_set_generate_session_id(SSL_CTX *ctx, GEN_SESSION_CB cb);\n"
105 "\\& int SSL_set_generate_session_id(SSL *ssl, GEN_SESSION_CB, cb);\n"
106 "\\& int SSL_has_matching_session_id(const SSL *ssl, const unsigned char *id,\n"
107 "\\& unsigned int id_len);\n"
108 msgstr ""
109
110 #. type: IX
111 #: archlinux debian-trixie debian-unstable
112 #, no-wrap
113 msgid "DESCRIPTION"
114 msgstr ""
115
116 #. type: Plain text
117 #: archlinux debian-trixie debian-unstable
118 msgid ""
119 "\\&B<SSL_CTX_set_generate_session_id()> sets the callback function for "
120 "generating new session ids for SSL/TLS sessions for B<ctx> to be B<cb>."
121 msgstr ""
122
123 #. type: Plain text
124 #: archlinux debian-trixie debian-unstable
125 msgid ""
126 "\\&B<SSL_set_generate_session_id()> sets the callback function for "
127 "generating new session ids for SSL/TLS sessions for B<ssl> to be B<cb>."
128 msgstr ""
129
130 #. type: Plain text
131 #: archlinux debian-trixie debian-unstable
132 msgid ""
133 "\\&B<SSL_has_matching_session_id()> checks, whether a session with id B<id> "
134 "(of length B<id_len>) is already contained in the internal session cache of "
135 "the parent context of B<ssl>."
136 msgstr ""
137
138 #. type: IX
139 #: archlinux debian-trixie debian-unstable
140 #, no-wrap
141 msgid "NOTES"
142 msgstr ""
143
144 #. type: Plain text
145 #: archlinux debian-trixie debian-unstable
146 msgid ""
147 "When a new session is established between client and server, the server "
148 "generates a session id. The session id is an arbitrary sequence of bytes. "
149 "The length of the session id is between 1 and 32 bytes. The session id is "
150 "not security critical but must be unique for the server. Additionally, the "
151 "session id is transmitted in the clear when reusing the session so it must "
152 "not contain sensitive information."
153 msgstr ""
154
155 #. type: Plain text
156 #: archlinux debian-trixie debian-unstable
157 msgid ""
158 "Without a callback being set, an OpenSSL server will generate a unique "
159 "session id from pseudo random numbers of the maximum possible length. Using "
160 "the callback function, the session id can be changed to contain additional "
161 "information like e.g. a host id in order to improve load balancing or "
162 "external caching techniques."
163 msgstr ""
164
165 #. type: Plain text
166 #: archlinux debian-trixie debian-unstable
167 msgid ""
168 "The callback function receives a pointer to the memory location to put "
169 "\\&B<id> into and a pointer to the maximum allowed length B<id_len>. The "
170 "buffer at location B<id> is only guaranteed to have the size B<id_len>. The "
171 "callback is only allowed to generate a shorter id and reduce B<id_len>; the "
172 "callback B<must never> increase B<id_len> or write to the location \\&B<id> "
173 "exceeding the given limit."
174 msgstr ""
175
176 #. type: Plain text
177 #: archlinux debian-trixie debian-unstable
178 msgid ""
179 "The location B<id> is filled with 0x00 before the callback is called, so the "
180 "callback may only fill part of the possible length and leave B<id_len> "
181 "untouched while maintaining reproducibility."
182 msgstr ""
183
184 #. type: Plain text
185 #: archlinux debian-trixie debian-unstable
186 msgid ""
187 "Since the sessions must be distinguished, session ids must be unique. "
188 "Without the callback a random number is used, so that the probability of "
189 "generating the same session id is extremely small (2^256 for SSLv3/TLSv1). "
190 "In order to assure the uniqueness of the generated session id, the callback "
191 "must call \\&B<SSL_has_matching_session_id()> and generate another id if a "
192 "conflict occurs. If an id conflict is not resolved, the handshake will "
193 "fail. If the application codes e.g. a unique host id, a unique process "
194 "number, and a unique sequence number into the session id, uniqueness could "
195 "easily be achieved without randomness added (it should however be taken care "
196 "that no confidential information is leaked this way). If the application can "
197 "not guarantee uniqueness, it is recommended to use the maximum B<id_len> and "
198 "fill in the bytes not used to code special information with random data to "
199 "avoid collisions."
200 msgstr ""
201
202 #. type: Plain text
203 #: archlinux debian-trixie debian-unstable
204 msgid ""
205 "\\&B<SSL_has_matching_session_id()> will only query the internal session "
206 "cache, not the external one. Since the session id is generated before the "
207 "handshake is completed, it is not immediately added to the cache. If another "
208 "thread is using the same internal session cache, a race condition can occur "
209 "in that another thread generates the same session id. Collisions can also "
210 "occur when using an external session cache, since the external cache is not "
211 "tested with B<SSL_has_matching_session_id()> and the same race condition "
212 "applies."
213 msgstr ""
214
215 #. type: Plain text
216 #: archlinux debian-trixie debian-unstable
217 msgid ""
218 "The callback must return 0 if it cannot generate a session id for whatever "
219 "reason and return 1 on success."
220 msgstr ""
221
222 #. type: IX
223 #: archlinux debian-trixie debian-unstable
224 #, no-wrap
225 msgid "RETURN VALUES"
226 msgstr ""
227
228 #. type: Plain text
229 #: archlinux debian-trixie debian-unstable
230 msgid ""
231 "\\&B<SSL_CTX_set_generate_session_id()> and B<SSL_set_generate_session_id()> "
232 "return 1 on success and 0 for failure."
233 msgstr ""
234
235 #. type: Plain text
236 #: archlinux debian-trixie debian-unstable
237 msgid ""
238 "\\&B<SSL_has_matching_session_id()> returns 1 if another session with the "
239 "same id is already in the cache, or 0 otherwise."
240 msgstr ""
241
242 #. type: IX
243 #: archlinux debian-trixie debian-unstable
244 #, no-wrap
245 msgid "EXAMPLES"
246 msgstr ""
247
248 #. type: Plain text
249 #: archlinux debian-trixie debian-unstable
250 msgid ""
251 "The callback function listed will generate a session id with the server id "
252 "given, and will fill the rest with pseudo random bytes:"
253 msgstr ""
254
255 #. type: Plain text
256 #: archlinux debian-trixie debian-unstable
257 #, no-wrap
258 msgid ""
259 "\\& const char session_id_prefix = \"www-18\";\n"
260 "\\&\n"
261 "\\& #define MAX_SESSION_ID_ATTEMPTS 10\n"
262 "\\& static int generate_session_id(SSL *ssl, unsigned char *id,\n"
263 "\\& unsigned int *id_len)\n"
264 "\\& {\n"
265 "\\& unsigned int count = 0;\n"
266 "\\&\n"
267 "\\& do {\n"
268 "\\& RAND_pseudo_bytes(id, *id_len);\n"
269 "\\& /*\n"
270 "\\& * Prefix the session_id with the required prefix. NB: If our\n"
271 "\\& * prefix is too long, clip it - but there will be worse effects\n"
272 "\\& * anyway, e.g. the server could only possibly create 1 session\n"
273 "\\& * ID (i.e. the prefix!) so all future session negotiations will\n"
274 "\\& * fail due to conflicts.\n"
275 "\\& */\n"
276 "\\& memcpy(id, session_id_prefix, strlen(session_id_prefix) E<lt> *id_len ?\n"
277 "\\& strlen(session_id_prefix) : *id_len);\n"
278 "\\& } while (SSL_has_matching_session_id(ssl, id, *id_len)\n"
279 "\\& && ++count E<lt> MAX_SESSION_ID_ATTEMPTS);\n"
280 "\\& if (count E<gt>= MAX_SESSION_ID_ATTEMPTS)\n"
281 "\\& return 0;\n"
282 "\\& return 1;\n"
283 "\\& }\n"
284 msgstr ""
285
286 #. type: IX
287 #: archlinux debian-trixie debian-unstable
288 #, no-wrap
289 msgid "SEE ALSO"
290 msgstr ""
291
292 #. type: Plain text
293 #: archlinux debian-trixie debian-unstable
294 msgid "\\&B<ssl>\\|(7), B<SSL_get_version>\\|(3)"
295 msgstr ""
296
297 #. type: IX
298 #: archlinux debian-trixie debian-unstable
299 #, no-wrap
300 msgid "COPYRIGHT"
301 msgstr ""
302
303 #. type: Plain text
304 #: archlinux debian-trixie debian-unstable
305 msgid "Copyright 2001-2020 The OpenSSL Project Authors. All Rights Reserved."
306 msgstr ""
307
308 #. type: Plain text
309 #: archlinux debian-trixie debian-unstable
310 msgid ""
311 "Licensed under the Apache License 2.0 (the \"License\"). You may not use "
312 "this file except in compliance with the License. You can obtain a copy in "
313 "the file LICENSE in the source distribution or at E<lt>https://"
314 "www.openssl.org/source/license.htmlE<gt>."
315 msgstr ""
316
317 #. ========================================================================
318 #. type: IX
319 #: debian-trixie debian-unstable
320 #, no-wrap
321 msgid "SSL_CTX_SET_GENERATE_SESSION_ID 3SSL"
322 msgstr ""
323
324 #. type: TH
325 #: debian-trixie
326 #, no-wrap
327 msgid "3.5.6"
328 msgstr ""