diff options
author | cvs2svn <admin@example.com> | 2025-04-14 17:32:06 +0000 |
---|---|---|
committer | cvs2svn <admin@example.com> | 2025-04-14 17:32:06 +0000 |
commit | eb8dd9dca1228af0cd132f515509051ecfabf6f6 (patch) | |
tree | edb6da6af7e865d488dc1a29309f1e1ec226e603 /src/lib/libssl/man | |
parent | 247f0352e0ed72a4f476db9dc91f4d982bc83eb2 (diff) | |
download | openbsd-tb_20250414.tar.gz openbsd-tb_20250414.tar.bz2 openbsd-tb_20250414.zip |
This commit was manufactured by cvs2git to create tag 'tb_20250414'.tb_20250414
Diffstat (limited to 'src/lib/libssl/man')
126 files changed, 0 insertions, 19883 deletions
diff --git a/src/lib/libssl/man/BIO_f_ssl.3 b/src/lib/libssl/man/BIO_f_ssl.3 deleted file mode 100644 index 3b74a3d6a4..0000000000 --- a/src/lib/libssl/man/BIO_f_ssl.3 +++ /dev/null | |||
@@ -1,609 +0,0 @@ | |||
1 | .\" $OpenBSD: BIO_f_ssl.3,v 1.16 2024/01/13 18:37:51 tb Exp $ | ||
2 | .\" full merge up to: OpenSSL f672aee4 Feb 9 11:52:40 2016 -0500 | ||
3 | .\" selective merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800 | ||
4 | .\" | ||
5 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | ||
6 | .\" Copyright (c) 2000, 2003, 2009, 2014-2016 The OpenSSL Project. | ||
7 | .\" All rights reserved. | ||
8 | .\" | ||
9 | .\" Redistribution and use in source and binary forms, with or without | ||
10 | .\" modification, are permitted provided that the following conditions | ||
11 | .\" are met: | ||
12 | .\" | ||
13 | .\" 1. Redistributions of source code must retain the above copyright | ||
14 | .\" notice, this list of conditions and the following disclaimer. | ||
15 | .\" | ||
16 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
17 | .\" notice, this list of conditions and the following disclaimer in | ||
18 | .\" the documentation and/or other materials provided with the | ||
19 | .\" distribution. | ||
20 | .\" | ||
21 | .\" 3. All advertising materials mentioning features or use of this | ||
22 | .\" software must display the following acknowledgment: | ||
23 | .\" "This product includes software developed by the OpenSSL Project | ||
24 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
25 | .\" | ||
26 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
27 | .\" endorse or promote products derived from this software without | ||
28 | .\" prior written permission. For written permission, please contact | ||
29 | .\" openssl-core@openssl.org. | ||
30 | .\" | ||
31 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
32 | .\" nor may "OpenSSL" appear in their names without prior written | ||
33 | .\" permission of the OpenSSL Project. | ||
34 | .\" | ||
35 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
36 | .\" acknowledgment: | ||
37 | .\" "This product includes software developed by the OpenSSL Project | ||
38 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
39 | .\" | ||
40 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
41 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
42 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
43 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
44 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
45 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
46 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
47 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
48 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
49 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
50 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
51 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
52 | .\" | ||
53 | .Dd $Mdocdate: January 13 2024 $ | ||
54 | .Dt BIO_F_SSL 3 | ||
55 | .Os | ||
56 | .Sh NAME | ||
57 | .Nm BIO_f_ssl , | ||
58 | .Nm BIO_set_ssl , | ||
59 | .Nm BIO_get_ssl , | ||
60 | .Nm BIO_set_ssl_mode , | ||
61 | .Nm BIO_set_ssl_renegotiate_bytes , | ||
62 | .Nm BIO_get_num_renegotiates , | ||
63 | .Nm BIO_set_ssl_renegotiate_timeout , | ||
64 | .Nm BIO_new_ssl , | ||
65 | .Nm BIO_new_ssl_connect , | ||
66 | .Nm BIO_new_buffer_ssl_connect , | ||
67 | .Nm BIO_ssl_copy_session_id , | ||
68 | .Nm BIO_ssl_shutdown , | ||
69 | .Nm BIO_do_handshake | ||
70 | .Nd SSL BIO | ||
71 | .Sh SYNOPSIS | ||
72 | .In openssl/bio.h | ||
73 | .In openssl/ssl.h | ||
74 | .Ft const BIO_METHOD * | ||
75 | .Fn BIO_f_ssl void | ||
76 | .Ft long | ||
77 | .Fo BIO_set_ssl | ||
78 | .Fa "BIO *b" | ||
79 | .Fa "SSL *ssl" | ||
80 | .Fa "long c" | ||
81 | .Fc | ||
82 | .Ft long | ||
83 | .Fo BIO_get_ssl | ||
84 | .Fa "BIO *b" | ||
85 | .Fa "SSL *sslp" | ||
86 | .Fc | ||
87 | .Ft long | ||
88 | .Fo BIO_set_ssl_mode | ||
89 | .Fa "BIO *b" | ||
90 | .Fa "long client" | ||
91 | .Fc | ||
92 | .Ft long | ||
93 | .Fo BIO_set_ssl_renegotiate_bytes | ||
94 | .Fa "BIO *b" | ||
95 | .Fa "long num" | ||
96 | .Fc | ||
97 | .Ft long | ||
98 | .Fo BIO_set_ssl_renegotiate_timeout | ||
99 | .Fa "BIO *b" | ||
100 | .Fa "long seconds" | ||
101 | .Fc | ||
102 | .Ft long | ||
103 | .Fo BIO_get_num_renegotiates | ||
104 | .Fa "BIO *b" | ||
105 | .Fc | ||
106 | .Ft BIO * | ||
107 | .Fn BIO_new_ssl "SSL_CTX *ctx" "int client" | ||
108 | .Ft BIO * | ||
109 | .Fn BIO_new_ssl_connect "SSL_CTX *ctx" | ||
110 | .Ft BIO * | ||
111 | .Fn BIO_new_buffer_ssl_connect "SSL_CTX *ctx" | ||
112 | .Ft int | ||
113 | .Fn BIO_ssl_copy_session_id "BIO *to" "BIO *from" | ||
114 | .Ft void | ||
115 | .Fn BIO_ssl_shutdown "BIO *bio" | ||
116 | .Ft long | ||
117 | .Fn BIO_do_handshake "BIO *b" | ||
118 | .Sh DESCRIPTION | ||
119 | .Fn BIO_f_ssl | ||
120 | returns the | ||
121 | .Vt SSL | ||
122 | .Vt BIO | ||
123 | method. | ||
124 | This is a filter | ||
125 | .Vt BIO | ||
126 | which is a wrapper around the OpenSSL | ||
127 | .Vt SSL | ||
128 | routines adding a | ||
129 | .Vt BIO | ||
130 | .Dq flavor | ||
131 | to SSL I/O. | ||
132 | .Pp | ||
133 | I/O performed on an | ||
134 | .Vt SSL | ||
135 | .Vt BIO | ||
136 | communicates using the SSL protocol with | ||
137 | the | ||
138 | .Vt SSL Ns 's | ||
139 | read and write | ||
140 | .Vt BIO Ns s . | ||
141 | If an SSL connection is not established then an attempt is made to establish | ||
142 | one on the first I/O call. | ||
143 | .Pp | ||
144 | If a | ||
145 | .Vt BIO | ||
146 | is appended to an | ||
147 | .Vt SSL | ||
148 | .Vt BIO | ||
149 | using | ||
150 | .Xr BIO_push 3 , | ||
151 | it is automatically used as the | ||
152 | .Vt SSL | ||
153 | .Vt BIO Ns 's read and write | ||
154 | .Vt BIO Ns s . | ||
155 | .Pp | ||
156 | Calling | ||
157 | .Xr BIO_reset 3 | ||
158 | on an | ||
159 | .Vt SSL | ||
160 | .Vt BIO | ||
161 | closes down any current SSL connection by calling | ||
162 | .Xr SSL_shutdown 3 . | ||
163 | .Xr BIO_reset 3 | ||
164 | is then sent to the next | ||
165 | .Vt BIO | ||
166 | in the chain; this will typically disconnect the underlying transport. | ||
167 | The | ||
168 | .Vt SSL | ||
169 | .Vt BIO | ||
170 | is then reset to the initial accept or connect state. | ||
171 | .Pp | ||
172 | If the close flag is set when an | ||
173 | .Vt SSL | ||
174 | .Vt BIO | ||
175 | is freed then the internal | ||
176 | .Vt SSL | ||
177 | structure is also freed using | ||
178 | .Xr SSL_free 3 . | ||
179 | .Pp | ||
180 | .Fn BIO_set_ssl | ||
181 | sets the internal | ||
182 | .Vt SSL | ||
183 | pointer of | ||
184 | .Vt BIO | ||
185 | .Fa b | ||
186 | to | ||
187 | .Fa ssl | ||
188 | using | ||
189 | the close flag | ||
190 | .Fa c . | ||
191 | .Pp | ||
192 | .Fn BIO_get_ssl | ||
193 | retrieves the | ||
194 | .Vt SSL | ||
195 | pointer of | ||
196 | .Vt BIO | ||
197 | .Fa b ; | ||
198 | it can then be manipulated using the standard SSL library functions. | ||
199 | .Pp | ||
200 | .Fn BIO_set_ssl_mode | ||
201 | sets the | ||
202 | .Vt SSL | ||
203 | .Vt BIO | ||
204 | mode to | ||
205 | .Fa client . | ||
206 | If | ||
207 | .Fa client | ||
208 | is 1, client mode is set. | ||
209 | If | ||
210 | .Fa client | ||
211 | is 0, server mode is set. | ||
212 | .Pp | ||
213 | .Fn BIO_set_ssl_renegotiate_bytes | ||
214 | sets the renegotiate byte count to | ||
215 | .Fa num . | ||
216 | When set, after every | ||
217 | .Fa num | ||
218 | bytes of I/O (read and write) the SSL session is automatically renegotiated. | ||
219 | .Fa num | ||
220 | must be at least 512 bytes. | ||
221 | .Pp | ||
222 | .Fn BIO_set_ssl_renegotiate_timeout | ||
223 | sets the renegotiate timeout to | ||
224 | .Fa seconds . | ||
225 | When the renegotiate timeout elapses, the session is automatically renegotiated. | ||
226 | .Pp | ||
227 | .Fn BIO_get_num_renegotiates | ||
228 | returns the total number of session renegotiations due to I/O or timeout. | ||
229 | .Pp | ||
230 | .Fn BIO_new_ssl | ||
231 | allocates an | ||
232 | .Vt SSL | ||
233 | .Vt BIO | ||
234 | using | ||
235 | .Vt SSL_CTX | ||
236 | .Va ctx | ||
237 | and using client mode if | ||
238 | .Fa client | ||
239 | is nonzero. | ||
240 | .Pp | ||
241 | .Fn BIO_new_ssl_connect | ||
242 | creates a new | ||
243 | .Vt BIO | ||
244 | chain consisting of an | ||
245 | .Vt SSL | ||
246 | .Vt BIO | ||
247 | (using | ||
248 | .Fa ctx ) | ||
249 | followed by a connect BIO. | ||
250 | .Pp | ||
251 | .Fn BIO_new_buffer_ssl_connect | ||
252 | creates a new | ||
253 | .Vt BIO | ||
254 | chain consisting of a buffering | ||
255 | .Vt BIO , | ||
256 | an | ||
257 | .Vt SSL | ||
258 | .Vt BIO | ||
259 | (using | ||
260 | .Fa ctx ) | ||
261 | and a connect | ||
262 | .Vt BIO . | ||
263 | .Pp | ||
264 | .Fn BIO_ssl_copy_session_id | ||
265 | copies an SSL session id between | ||
266 | .Vt BIO | ||
267 | chains | ||
268 | .Fa from | ||
269 | and | ||
270 | .Fa to . | ||
271 | It does this by locating the | ||
272 | .Vt SSL | ||
273 | .Vt BIO Ns s | ||
274 | in each chain and calling | ||
275 | .Xr SSL_copy_session_id 3 | ||
276 | on the internal | ||
277 | .Vt SSL | ||
278 | pointer. | ||
279 | .Pp | ||
280 | .Fn BIO_ssl_shutdown | ||
281 | closes down an SSL connection on | ||
282 | .Vt BIO | ||
283 | chain | ||
284 | .Fa bio . | ||
285 | It does this by locating the | ||
286 | .Vt SSL | ||
287 | .Vt BIO | ||
288 | in the | ||
289 | chain and calling | ||
290 | .Xr SSL_shutdown 3 | ||
291 | on its internal | ||
292 | .Vt SSL | ||
293 | pointer. | ||
294 | .Pp | ||
295 | .Fn BIO_do_handshake | ||
296 | attempts to complete an SSL handshake on the supplied | ||
297 | .Vt BIO | ||
298 | and establish the SSL connection. | ||
299 | It returns 1 if the connection was established successfully. | ||
300 | A zero or negative value is returned if the connection could not be | ||
301 | established; the call | ||
302 | .Xr BIO_should_retry 3 | ||
303 | should be used for non blocking connect | ||
304 | .Vt BIO Ns s | ||
305 | to determine if the call should be retried. | ||
306 | If an SSL connection has already been established, this call has no effect. | ||
307 | .Pp | ||
308 | When a chain containing an SSL BIO is copied with | ||
309 | .Xr BIO_dup_chain 3 , | ||
310 | .Xr SSL_dup 3 | ||
311 | is called internally to copy the | ||
312 | .Vt SSL | ||
313 | object from the existing BIO object to the new BIO object, | ||
314 | and the internal data related to | ||
315 | .Fn BIO_set_ssl_renegotiate_bytes | ||
316 | and | ||
317 | .Fn BIO_set_ssl_renegotiate_timeout | ||
318 | is also copied. | ||
319 | .Pp | ||
320 | .Vt SSL | ||
321 | .Vt BIO Ns s | ||
322 | are exceptional in that if the underlying transport is non-blocking they can | ||
323 | still request a retry in exceptional circumstances. | ||
324 | Specifically this will happen if a session renegotiation takes place during a | ||
325 | .Xr BIO_read 3 | ||
326 | operation. | ||
327 | One case where this happens is when step up occurs. | ||
328 | .Pp | ||
329 | In OpenSSL 0.9.6 and later the SSL flag | ||
330 | .Dv SSL_AUTO_RETRY | ||
331 | can be set to disable this behaviour. | ||
332 | In other words, when this flag is set an | ||
333 | .Vt SSL | ||
334 | .Vt BIO | ||
335 | using a blocking transport will never request a retry. | ||
336 | .Pp | ||
337 | Since unknown | ||
338 | .Xr BIO_ctrl 3 | ||
339 | operations are sent through filter | ||
340 | .Vt BIO Ns s , | ||
341 | the server name and port can be set using | ||
342 | .Xr BIO_set_conn_hostname 3 | ||
343 | and | ||
344 | .Xr BIO_set_conn_port 3 | ||
345 | on the | ||
346 | .Vt BIO | ||
347 | returned by | ||
348 | .Fn BIO_new_ssl_connect | ||
349 | without having to locate the connect | ||
350 | .Vt BIO | ||
351 | first. | ||
352 | .Pp | ||
353 | Applications do not have to call | ||
354 | .Fn BIO_do_handshake | ||
355 | but may wish to do so to separate the handshake process from other I/O | ||
356 | processing. | ||
357 | .Pp | ||
358 | .Fn BIO_set_ssl , | ||
359 | .Fn BIO_get_ssl , | ||
360 | .Fn BIO_set_ssl_mode , | ||
361 | .Fn BIO_set_ssl_renegotiate_bytes , | ||
362 | .Fn BIO_set_ssl_renegotiate_timeout , | ||
363 | .Fn BIO_get_num_renegotiates , | ||
364 | and | ||
365 | .Fn BIO_do_handshake | ||
366 | are implemented as macros. | ||
367 | .Sh RETURN VALUES | ||
368 | .Fn BIO_f_ssl | ||
369 | returns a pointer to a static | ||
370 | .Vt BIO_METHOD | ||
371 | structure. | ||
372 | .Pp | ||
373 | When called on an SSL BIO object, | ||
374 | .Xr BIO_method_type 3 | ||
375 | returns the constant | ||
376 | .Dv BIO_TYPE_SSL | ||
377 | and | ||
378 | .Xr BIO_method_name 3 | ||
379 | returns a pointer to the static string | ||
380 | .Qq ssl . | ||
381 | .Pp | ||
382 | .Fn BIO_set_ssl , | ||
383 | .Fn BIO_get_ssl , | ||
384 | .Fn BIO_set_ssl_mode , | ||
385 | .Fn BIO_set_ssl_renegotiate_bytes , | ||
386 | .Fn BIO_set_ssl_renegotiate_timeout , | ||
387 | and | ||
388 | .Fn BIO_get_num_renegotiates | ||
389 | return 1 on success or a value less than or equal to 0 | ||
390 | if an error occurred. | ||
391 | .Pp | ||
392 | .Fn BIO_new_ssl , | ||
393 | .Fn BIO_new_ssl_connect , | ||
394 | and | ||
395 | .Fn BIO_new_buffer_ssl_connect | ||
396 | returns a pointer to a newly allocated | ||
397 | .Vt BIO | ||
398 | chain or | ||
399 | .Dv NULL | ||
400 | if an error occurred. | ||
401 | .Pp | ||
402 | .Fn BIO_ssl_copy_session_id | ||
403 | returns 1 on success or 0 on error. | ||
404 | .Pp | ||
405 | .Fn BIO_do_handshake | ||
406 | returns 1 if the connection was established successfully | ||
407 | or a value less than or equal to 0 otherwise. | ||
408 | .Sh EXAMPLES | ||
409 | This SSL/TLS client example attempts to retrieve a page from an SSL/TLS web | ||
410 | server. | ||
411 | The I/O routines are identical to those of the unencrypted example in | ||
412 | .Xr BIO_s_connect 3 . | ||
413 | .Bd -literal | ||
414 | BIO *sbio, *out; | ||
415 | int len; | ||
416 | char tmpbuf[1024]; | ||
417 | SSL_CTX *ctx; | ||
418 | SSL *ssl; | ||
419 | |||
420 | ERR_load_crypto_strings(); | ||
421 | ERR_load_SSL_strings(); | ||
422 | OpenSSL_add_all_algorithms(); | ||
423 | |||
424 | /* | ||
425 | * We would seed the PRNG here if the platform didn't do it automatically | ||
426 | */ | ||
427 | |||
428 | ctx = SSL_CTX_new(SSLv23_client_method()); | ||
429 | |||
430 | /* | ||
431 | * We'd normally set some stuff like the verify paths and mode here because | ||
432 | * as things stand this will connect to any server whose certificate is | ||
433 | * signed by any CA. | ||
434 | */ | ||
435 | |||
436 | sbio = BIO_new_ssl_connect(ctx); | ||
437 | |||
438 | BIO_get_ssl(sbio, &ssl); | ||
439 | |||
440 | if (!ssl) { | ||
441 | fprintf(stderr, "Can't locate SSL pointer\en"); | ||
442 | /* whatever ... */ | ||
443 | } | ||
444 | |||
445 | /* Don't want any retries */ | ||
446 | SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY); | ||
447 | |||
448 | /* We might want to do other things with ssl here */ | ||
449 | |||
450 | BIO_set_conn_hostname(sbio, "localhost:https"); | ||
451 | |||
452 | out = BIO_new_fp(stdout, BIO_NOCLOSE); | ||
453 | if (BIO_do_connect(sbio) <= 0) { | ||
454 | fprintf(stderr, "Error connecting to server\en"); | ||
455 | ERR_print_errors_fp(stderr); | ||
456 | /* whatever ... */ | ||
457 | } | ||
458 | |||
459 | if (BIO_do_handshake(sbio) <= 0) { | ||
460 | fprintf(stderr, "Error establishing SSL connection\en"); | ||
461 | ERR_print_errors_fp(stderr); | ||
462 | /* whatever ... */ | ||
463 | } | ||
464 | |||
465 | /* Could examine ssl here to get connection info */ | ||
466 | |||
467 | BIO_puts(sbio, "GET / HTTP/1.0\en\en"); | ||
468 | for (;;) { | ||
469 | len = BIO_read(sbio, tmpbuf, 1024); | ||
470 | if(len <= 0) break; | ||
471 | BIO_write(out, tmpbuf, len); | ||
472 | } | ||
473 | BIO_free_all(sbio); | ||
474 | BIO_free(out); | ||
475 | .Ed | ||
476 | .Pp | ||
477 | Here is a simple server example. | ||
478 | It makes use of a buffering | ||
479 | .Vt BIO | ||
480 | to allow lines to be read from the | ||
481 | .Vt SSL | ||
482 | .Vt BIO | ||
483 | using | ||
484 | .Xr BIO_gets 3 . | ||
485 | It creates a pseudo web page containing the actual request from a client and | ||
486 | also echoes the request to standard output. | ||
487 | .Bd -literal | ||
488 | BIO *sbio, *bbio, *acpt, *out; | ||
489 | int len; | ||
490 | char tmpbuf[1024]; | ||
491 | SSL_CTX *ctx; | ||
492 | SSL *ssl; | ||
493 | |||
494 | ctx = SSL_CTX_new(SSLv23_server_method()); | ||
495 | |||
496 | if (!SSL_CTX_use_certificate_file(ctx,"server.pem",SSL_FILETYPE_PEM) | ||
497 | || !SSL_CTX_use_PrivateKey_file(ctx,"server.pem",SSL_FILETYPE_PEM) | ||
498 | || !SSL_CTX_check_private_key(ctx)) { | ||
499 | fprintf(stderr, "Error setting up SSL_CTX\en"); | ||
500 | ERR_print_errors_fp(stderr); | ||
501 | return 0; | ||
502 | } | ||
503 | |||
504 | /* | ||
505 | * Might do other things here like setting verify locations and DH and/or | ||
506 | * RSA temporary key callbacks | ||
507 | */ | ||
508 | |||
509 | /* New SSL BIO setup as server */ | ||
510 | sbio = BIO_new_ssl(ctx,0); | ||
511 | |||
512 | BIO_get_ssl(sbio, &ssl); | ||
513 | |||
514 | if (!ssl) { | ||
515 | fprintf(stderr, "Can't locate SSL pointer\en"); | ||
516 | /* whatever ... */ | ||
517 | } | ||
518 | |||
519 | /* Don't want any retries */ | ||
520 | SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY); | ||
521 | |||
522 | /* Create the buffering BIO */ | ||
523 | |||
524 | bbio = BIO_new(BIO_f_buffer()); | ||
525 | |||
526 | /* Add to chain */ | ||
527 | sbio = BIO_push(bbio, sbio); | ||
528 | |||
529 | acpt = BIO_new_accept("4433"); | ||
530 | |||
531 | /* | ||
532 | * By doing this when a new connection is established we automatically | ||
533 | * have sbio inserted into it. The BIO chain is now 'swallowed' by the | ||
534 | * accept BIO and will be freed when the accept BIO is freed. | ||
535 | */ | ||
536 | |||
537 | BIO_set_accept_bios(acpt,sbio); | ||
538 | |||
539 | out = BIO_new_fp(stdout, BIO_NOCLOSE); | ||
540 | |||
541 | /* Wait for incoming connection */ | ||
542 | if (BIO_do_accept(acpt) <= 0) { | ||
543 | fprintf(stderr, "Error setting up accept BIO\en"); | ||
544 | ERR_print_errors_fp(stderr); | ||
545 | return 0; | ||
546 | } | ||
547 | |||
548 | /* We only want one connection so remove and free accept BIO */ | ||
549 | |||
550 | sbio = BIO_pop(acpt); | ||
551 | |||
552 | BIO_free_all(acpt); | ||
553 | |||
554 | if (BIO_do_handshake(sbio) <= 0) { | ||
555 | fprintf(stderr, "Error in SSL handshake\en"); | ||
556 | ERR_print_errors_fp(stderr); | ||
557 | return 0; | ||
558 | } | ||
559 | |||
560 | BIO_puts(sbio, "HTTP/1.0 200 OK\er\enContent-type: text/plain\er\en\er\en"); | ||
561 | BIO_puts(sbio, "\er\enConnection Established\er\enRequest headers:\er\en"); | ||
562 | BIO_puts(sbio, "--------------------------------------------------\er\en"); | ||
563 | |||
564 | for (;;) { | ||
565 | len = BIO_gets(sbio, tmpbuf, 1024); | ||
566 | if (len <= 0) | ||
567 | break; | ||
568 | BIO_write(sbio, tmpbuf, len); | ||
569 | BIO_write(out, tmpbuf, len); | ||
570 | /* Look for blank line signifying end of headers */ | ||
571 | if ((tmpbuf[0] == '\er') || (tmpbuf[0] == '\en')) | ||
572 | break; | ||
573 | } | ||
574 | |||
575 | BIO_puts(sbio, "--------------------------------------------------\er\en"); | ||
576 | BIO_puts(sbio, "\er\en"); | ||
577 | |||
578 | /* Since there is a buffering BIO present we had better flush it */ | ||
579 | BIO_flush(sbio); | ||
580 | |||
581 | BIO_free_all(sbio); | ||
582 | .Ed | ||
583 | .Sh SEE ALSO | ||
584 | .Xr BIO_new 3 , | ||
585 | .Xr ssl 3 | ||
586 | .Sh HISTORY | ||
587 | .Fn BIO_f_ssl , | ||
588 | .Fn BIO_set_ssl , | ||
589 | and | ||
590 | .Fn BIO_get_ssl | ||
591 | first appeared in SSLeay 0.6.0. | ||
592 | .Fn BIO_set_ssl_mode , | ||
593 | .Fn BIO_new_ssl , | ||
594 | and | ||
595 | .Fn BIO_ssl_copy_session_id | ||
596 | first appeared in SSLeay 0.8.0. | ||
597 | .Fn BIO_ssl_shutdown | ||
598 | and | ||
599 | .Fn BIO_do_handshake | ||
600 | first appeared in SSLeay 0.8.1. | ||
601 | .Fn BIO_set_ssl_renegotiate_bytes , | ||
602 | .Fn BIO_get_num_renegotiates , | ||
603 | .Fn BIO_set_ssl_renegotiate_timeout , | ||
604 | .Fn BIO_new_ssl_connect , | ||
605 | and | ||
606 | .Fn BIO_new_buffer_ssl_connect | ||
607 | first appeared in SSLeay 0.9.0. | ||
608 | All these functions have been available since | ||
609 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/DTLSv1_listen.3 b/src/lib/libssl/man/DTLSv1_listen.3 deleted file mode 100644 index 047ec0a7ff..0000000000 --- a/src/lib/libssl/man/DTLSv1_listen.3 +++ /dev/null | |||
@@ -1,187 +0,0 @@ | |||
1 | .\" $OpenBSD: DTLSv1_listen.3,v 1.4 2018/03/27 17:35:50 schwarze Exp $ | ||
2 | .\" OpenSSL 7795475f Dec 18 13:18:31 2015 -0500 | ||
3 | .\" | ||
4 | .\" This file was written by Matt Caswell <matt@openssl.org>. | ||
5 | .\" Copyright (c) 2015 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 27 2018 $ | ||
52 | .Dt DTLSV1_LISTEN 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm DTLSv1_listen | ||
56 | .Nd listen for incoming DTLS connections | ||
57 | .Sh SYNOPSIS | ||
58 | .In openssl/ssl.h | ||
59 | .Ft int | ||
60 | .Fo DTLSv1_listen | ||
61 | .Fa "SSL *ssl" | ||
62 | .Fa "struct sockaddr *peer" | ||
63 | .Fc | ||
64 | .Sh DESCRIPTION | ||
65 | .Fn DTLSv1_listen | ||
66 | listens for new incoming DTLS connections. | ||
67 | If a ClientHello is received that does not contain a cookie, then | ||
68 | .Fn DTLSv1_listen | ||
69 | responds with a HelloVerifyRequest. | ||
70 | If a ClientHello is received with a cookie that is verified, then | ||
71 | control is returned to user code to enable the handshake to be | ||
72 | completed (for example by using | ||
73 | .Xr SSL_accept 3 ) . | ||
74 | .Pp | ||
75 | .Fn DTLSv1_listen | ||
76 | is currently implemented as a macro. | ||
77 | .Pp | ||
78 | Datagram based protocols can be susceptible to Denial of Service | ||
79 | attacks. | ||
80 | A DTLS attacker could, for example, submit a series of handshake | ||
81 | initiation requests that cause the server to allocate state (and | ||
82 | possibly perform cryptographic operations) thus consuming server | ||
83 | resources. | ||
84 | The attacker could also (with UDP) quite simply forge the source IP | ||
85 | address in such an attack. | ||
86 | .Pp | ||
87 | As a counter measure to that DTLS includes a stateless cookie mechanism. | ||
88 | The idea is that when a client attempts to connect to a server it sends | ||
89 | a ClientHello message. | ||
90 | The server responds with a HelloVerifyRequest which contains a unique | ||
91 | cookie. | ||
92 | The client then resends the ClientHello, but this time includes the | ||
93 | cookie in the message thus proving that the client is capable of | ||
94 | receiving messages sent to that address. | ||
95 | All of this can be done by the server without allocating any state, and | ||
96 | thus without consuming expensive resources. | ||
97 | .Pp | ||
98 | OpenSSL implements this capability via the | ||
99 | .Fn DTLSv1_listen | ||
100 | function. | ||
101 | The | ||
102 | .Fa ssl | ||
103 | parameter should be a newly allocated | ||
104 | .Vt SSL | ||
105 | object with its read and write BIOs set, in the same way as might | ||
106 | be done for a call to | ||
107 | .Xr SSL_accept 3 . | ||
108 | Typically the read BIO will be in an "unconnected" state and thus | ||
109 | capable of receiving messages from any peer. | ||
110 | .Pp | ||
111 | When a ClientHello is received that contains a cookie that has been | ||
112 | verified, then | ||
113 | .Fn DTLSv1_listen | ||
114 | will return with the | ||
115 | .Fa ssl | ||
116 | parameter updated into a state where the handshake can be continued by a | ||
117 | call to (for example) | ||
118 | .Xr SSL_accept 3 . | ||
119 | Additionally the | ||
120 | .Vt struct sockaddr | ||
121 | pointed to by | ||
122 | .Fa peer | ||
123 | will be filled in with details of the peer that sent the ClientHello. | ||
124 | It is the calling code's responsibility to ensure that the | ||
125 | .Fa peer | ||
126 | location is sufficiently large to accommodate the addressing scheme in use. | ||
127 | For example this might be done by allocating space for a | ||
128 | .Vt struct sockaddr_storage | ||
129 | and casting the pointer to it to a | ||
130 | .Vt struct sockaddr * | ||
131 | for the call to | ||
132 | .Fn DTLSv1_listen . | ||
133 | Typically user code is expected to "connect" the underlying socket | ||
134 | to the peer and continue the handshake in a connected state. | ||
135 | .Pp | ||
136 | Prior to calling | ||
137 | .Fn DTLSv1_listen | ||
138 | user code must ensure that cookie generation and verification callbacks | ||
139 | have been set up using | ||
140 | .Fn SSL_CTX_set_cookie_generate_cb | ||
141 | and | ||
142 | .Fn SSL_CTX_set_cookie_verify_cb | ||
143 | respectively. | ||
144 | .Pp | ||
145 | Since | ||
146 | .Fn DTLSv1_listen | ||
147 | operates entirely statelessly whilst processing incoming ClientHellos, | ||
148 | it is unable to process fragmented messages (since this would require | ||
149 | the allocation of state). | ||
150 | An implication of this is that | ||
151 | .Fn DTLSv1_listen | ||
152 | only supports ClientHellos that fit inside a single datagram. | ||
153 | .Sh RETURN VALUES | ||
154 | From OpenSSL 1.1.0 a return value of >= 1 indicates success. | ||
155 | In this instance the | ||
156 | .Fa peer | ||
157 | value will be filled in and the | ||
158 | .Fa ssl | ||
159 | object set up ready to continue the handshake. | ||
160 | .Pp | ||
161 | A return value of 0 indicates a non-fatal error. | ||
162 | This could (for example) be because of non-blocking IO, or some invalid | ||
163 | message having been received from a peer. | ||
164 | Errors may be placed on the OpenSSL error queue with further information | ||
165 | if appropriate. | ||
166 | Typically user code is expected to retry the call to | ||
167 | .Fn DTLSv1_listen | ||
168 | in the event of a non-fatal error. | ||
169 | Any old errors on the error queue will be cleared in the subsequent | ||
170 | call. | ||
171 | .Pp | ||
172 | A return value of <0 indicates a fatal error. | ||
173 | This could (for example) be because of a failure to allocate sufficient | ||
174 | memory for the operation. | ||
175 | .Pp | ||
176 | Prior to OpenSSL 1.1.0 fatal and non-fatal errors both produce return | ||
177 | codes <= 0 (in typical implementations user code treats all errors as | ||
178 | non-fatal), whilst return codes >0 indicate success. | ||
179 | .Sh SEE ALSO | ||
180 | .Xr BIO_new 3 , | ||
181 | .Xr ssl 3 , | ||
182 | .Xr SSL_accept 3 , | ||
183 | .Xr SSL_get_error 3 | ||
184 | .Sh HISTORY | ||
185 | .Fn DTLSv1_listen | ||
186 | first appeared in OpenSSL 0.9.8m and has been available since | ||
187 | .Ox 4.9 . | ||
diff --git a/src/lib/libssl/man/Makefile b/src/lib/libssl/man/Makefile deleted file mode 100644 index c8f6e28541..0000000000 --- a/src/lib/libssl/man/Makefile +++ /dev/null | |||
@@ -1,134 +0,0 @@ | |||
1 | # $OpenBSD: Makefile,v 1.77 2022/07/13 20:52:36 schwarze Exp $ | ||
2 | |||
3 | .include <bsd.own.mk> | ||
4 | |||
5 | MAN = BIO_f_ssl.3 \ | ||
6 | DTLSv1_listen.3 \ | ||
7 | OPENSSL_init_ssl.3 \ | ||
8 | PEM_read_SSL_SESSION.3 \ | ||
9 | SSL_CIPHER_get_name.3 \ | ||
10 | SSL_COMP_add_compression_method.3 \ | ||
11 | SSL_CTX_add1_chain_cert.3 \ | ||
12 | SSL_CTX_add_extra_chain_cert.3 \ | ||
13 | SSL_CTX_add_session.3 \ | ||
14 | SSL_CTX_ctrl.3 \ | ||
15 | SSL_CTX_flush_sessions.3 \ | ||
16 | SSL_CTX_free.3 \ | ||
17 | SSL_CTX_get0_certificate.3 \ | ||
18 | SSL_CTX_get_ex_new_index.3 \ | ||
19 | SSL_CTX_get_verify_mode.3 \ | ||
20 | SSL_CTX_load_verify_locations.3 \ | ||
21 | SSL_CTX_new.3 \ | ||
22 | SSL_CTX_sess_number.3 \ | ||
23 | SSL_CTX_sess_set_cache_size.3 \ | ||
24 | SSL_CTX_sess_set_get_cb.3 \ | ||
25 | SSL_CTX_sessions.3 \ | ||
26 | SSL_CTX_set1_groups.3 \ | ||
27 | SSL_CTX_set_alpn_select_cb.3 \ | ||
28 | SSL_CTX_set_cert_store.3 \ | ||
29 | SSL_CTX_set_cert_verify_callback.3 \ | ||
30 | SSL_CTX_set_cipher_list.3 \ | ||
31 | SSL_CTX_set_client_CA_list.3 \ | ||
32 | SSL_CTX_set_client_cert_cb.3 \ | ||
33 | SSL_CTX_set_default_passwd_cb.3 \ | ||
34 | SSL_CTX_set_generate_session_id.3 \ | ||
35 | SSL_CTX_set_info_callback.3 \ | ||
36 | SSL_CTX_set_keylog_callback.3 \ | ||
37 | SSL_CTX_set_max_cert_list.3 \ | ||
38 | SSL_CTX_set_min_proto_version.3 \ | ||
39 | SSL_CTX_set_mode.3 \ | ||
40 | SSL_CTX_set_msg_callback.3 \ | ||
41 | SSL_CTX_set_options.3 \ | ||
42 | SSL_CTX_set_quiet_shutdown.3 \ | ||
43 | SSL_CTX_set_read_ahead.3 \ | ||
44 | SSL_CTX_set_security_level.3 \ | ||
45 | SSL_CTX_set_session_cache_mode.3 \ | ||
46 | SSL_CTX_set_session_id_context.3 \ | ||
47 | SSL_CTX_set_ssl_version.3 \ | ||
48 | SSL_CTX_set_timeout.3 \ | ||
49 | SSL_CTX_set_tlsext_servername_callback.3 \ | ||
50 | SSL_CTX_set_tlsext_status_cb.3 \ | ||
51 | SSL_CTX_set_tlsext_ticket_key_cb.3 \ | ||
52 | SSL_CTX_set_tlsext_use_srtp.3 \ | ||
53 | SSL_CTX_set_tmp_dh_callback.3 \ | ||
54 | SSL_CTX_set_tmp_rsa_callback.3 \ | ||
55 | SSL_CTX_set_verify.3 \ | ||
56 | SSL_CTX_use_certificate.3 \ | ||
57 | SSL_SESSION_free.3 \ | ||
58 | SSL_SESSION_get0_cipher.3 \ | ||
59 | SSL_SESSION_get0_peer.3 \ | ||
60 | SSL_SESSION_get_compress_id.3 \ | ||
61 | SSL_SESSION_get_ex_new_index.3 \ | ||
62 | SSL_SESSION_get_id.3 \ | ||
63 | SSL_SESSION_get_protocol_version.3 \ | ||
64 | SSL_SESSION_get_time.3 \ | ||
65 | SSL_SESSION_has_ticket.3 \ | ||
66 | SSL_SESSION_is_resumable.3 \ | ||
67 | SSL_SESSION_new.3 \ | ||
68 | SSL_SESSION_print.3 \ | ||
69 | SSL_SESSION_set1_id_context.3 \ | ||
70 | SSL_accept.3 \ | ||
71 | SSL_alert_type_string.3 \ | ||
72 | SSL_clear.3 \ | ||
73 | SSL_connect.3 \ | ||
74 | SSL_copy_session_id.3 \ | ||
75 | SSL_do_handshake.3 \ | ||
76 | SSL_dup.3 \ | ||
77 | SSL_dup_CA_list.3 \ | ||
78 | SSL_export_keying_material.3 \ | ||
79 | SSL_free.3 \ | ||
80 | SSL_get_SSL_CTX.3 \ | ||
81 | SSL_get_certificate.3 \ | ||
82 | SSL_get_ciphers.3 \ | ||
83 | SSL_get_client_CA_list.3 \ | ||
84 | SSL_get_client_random.3 \ | ||
85 | SSL_get_current_cipher.3 \ | ||
86 | SSL_get_default_timeout.3 \ | ||
87 | SSL_get_error.3 \ | ||
88 | SSL_get_ex_data_X509_STORE_CTX_idx.3 \ | ||
89 | SSL_get_ex_new_index.3 \ | ||
90 | SSL_get_fd.3 \ | ||
91 | SSL_get_finished.3 \ | ||
92 | SSL_get_peer_cert_chain.3 \ | ||
93 | SSL_get_peer_certificate.3 \ | ||
94 | SSL_get_rbio.3 \ | ||
95 | SSL_get_server_tmp_key.3 \ | ||
96 | SSL_get_session.3 \ | ||
97 | SSL_get_shared_ciphers.3 \ | ||
98 | SSL_get_state.3 \ | ||
99 | SSL_get_verify_result.3 \ | ||
100 | SSL_get_version.3 \ | ||
101 | SSL_library_init.3 \ | ||
102 | SSL_load_client_CA_file.3 \ | ||
103 | SSL_new.3 \ | ||
104 | SSL_num_renegotiations.3 \ | ||
105 | SSL_pending.3 \ | ||
106 | SSL_read.3 \ | ||
107 | SSL_read_early_data.3 \ | ||
108 | SSL_renegotiate.3 \ | ||
109 | SSL_rstate_string.3 \ | ||
110 | SSL_session_reused.3 \ | ||
111 | SSL_set1_host.3 \ | ||
112 | SSL_set1_param.3 \ | ||
113 | SSL_set_SSL_CTX.3 \ | ||
114 | SSL_set_bio.3 \ | ||
115 | SSL_set_connect_state.3 \ | ||
116 | SSL_set_fd.3 \ | ||
117 | SSL_set_max_send_fragment.3 \ | ||
118 | SSL_set_psk_use_session_callback.3 \ | ||
119 | SSL_set_session.3 \ | ||
120 | SSL_set_shutdown.3 \ | ||
121 | SSL_set_tmp_ecdh.3 \ | ||
122 | SSL_set_verify_result.3 \ | ||
123 | SSL_shutdown.3 \ | ||
124 | SSL_state_string.3 \ | ||
125 | SSL_want.3 \ | ||
126 | SSL_write.3 \ | ||
127 | d2i_SSL_SESSION.3 \ | ||
128 | ssl.3 | ||
129 | |||
130 | all clean cleandir depend includes obj tags: | ||
131 | |||
132 | install: maninstall | ||
133 | |||
134 | .include <bsd.man.mk> | ||
diff --git a/src/lib/libssl/man/OPENSSL_init_ssl.3 b/src/lib/libssl/man/OPENSSL_init_ssl.3 deleted file mode 100644 index f37dccfaac..0000000000 --- a/src/lib/libssl/man/OPENSSL_init_ssl.3 +++ /dev/null | |||
@@ -1,76 +0,0 @@ | |||
1 | .\" $OpenBSD: OPENSSL_init_ssl.3,v 1.4 2019/06/14 13:41:31 schwarze Exp $ | ||
2 | .\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org> | ||
3 | .\" | ||
4 | .\" Permission to use, copy, modify, and distribute this software for any | ||
5 | .\" purpose with or without fee is hereby granted, provided that the above | ||
6 | .\" copyright notice and this permission notice appear in all copies. | ||
7 | .\" | ||
8 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
9 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
10 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
11 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
12 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
13 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
14 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
15 | .\" | ||
16 | .Dd $Mdocdate: June 14 2019 $ | ||
17 | .Dt OPENSSL_INIT_SSL 3 | ||
18 | .Os | ||
19 | .Sh NAME | ||
20 | .Nm OPENSSL_init_ssl | ||
21 | .Nd initialise the crypto and ssl libraries | ||
22 | .Sh SYNOPSIS | ||
23 | .In openssl/ssl.h | ||
24 | .Ft int | ||
25 | .Fo OPENSSL_init_ssl | ||
26 | .Fa "uint64_t options" | ||
27 | .Fa "const void *dummy" | ||
28 | .Fc | ||
29 | .Sh DESCRIPTION | ||
30 | This function is deprecated. | ||
31 | It is never useful for any application program to call it explicitly. | ||
32 | The library automatically calls it internally with an | ||
33 | .Fa options | ||
34 | argument of 0 whenever needed. | ||
35 | It is safest to assume that any function may do so. | ||
36 | .Pp | ||
37 | To enable or disable the standard configuration file, instead use | ||
38 | .Xr OPENSSL_config 3 | ||
39 | or | ||
40 | .Xr OPENSSL_no_config 3 , | ||
41 | respectively. | ||
42 | To load a non-standard configuration file, refer to | ||
43 | .Xr CONF_modules_load_file 3 . | ||
44 | .Pp | ||
45 | .Fn OPENSSL_init_ssl | ||
46 | calls | ||
47 | .Xr OPENSSL_init_crypto 3 , | ||
48 | .Xr SSL_load_error_strings 3 , | ||
49 | and | ||
50 | .Xr SSL_library_init 3 . | ||
51 | .Pp | ||
52 | The | ||
53 | .Fa options | ||
54 | argument is passed on to | ||
55 | .Xr OPENSSL_init_crypto 3 | ||
56 | and the | ||
57 | .Fa dummy | ||
58 | argument is ignored. | ||
59 | .Pp | ||
60 | If this function is called more than once, | ||
61 | none of the calls except the first one have any effect. | ||
62 | .Sh RETURN VALUES | ||
63 | .Fn OPENSSL_init_ssl | ||
64 | is intended to return 1 on success or 0 on error. | ||
65 | .Sh SEE ALSO | ||
66 | .Xr CONF_modules_load_file 3 , | ||
67 | .Xr OPENSSL_config 3 , | ||
68 | .Xr ssl 3 | ||
69 | .Sh HISTORY | ||
70 | .Fn OPENSSL_init_ssl | ||
71 | first appeared in OpenSSL 1.1.0 and has been available since | ||
72 | .Ox 6.3 . | ||
73 | .Sh BUGS | ||
74 | .Fn OPENSSL_init_ssl | ||
75 | silently ignores even more configuration failures than | ||
76 | .Xr OPENSSL_init_crypto 3 . | ||
diff --git a/src/lib/libssl/man/PEM_read_SSL_SESSION.3 b/src/lib/libssl/man/PEM_read_SSL_SESSION.3 deleted file mode 100644 index 3eb1414c62..0000000000 --- a/src/lib/libssl/man/PEM_read_SSL_SESSION.3 +++ /dev/null | |||
@@ -1,147 +0,0 @@ | |||
1 | .\" $OpenBSD: PEM_read_SSL_SESSION.3,v 1.4 2019/06/12 09:36:30 schwarze Exp $ | ||
2 | .\" OpenSSL doc/man3/PEM_read_CMS.pod b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Rich Salz <rsalz@openssl.org>. | ||
5 | .\" Copyright (c) 2016 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: June 12 2019 $ | ||
52 | .Dt PEM_READ_SSL_SESSION 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm PEM_read_SSL_SESSION , | ||
56 | .Nm PEM_read_bio_SSL_SESSION , | ||
57 | .Nm PEM_write_SSL_SESSION , | ||
58 | .Nm PEM_write_bio_SSL_SESSION | ||
59 | .Nd encode and decode SSL session objects in PEM format | ||
60 | .Sh SYNOPSIS | ||
61 | .In openssl/ssl.h | ||
62 | .Ft SSL_SESSION * | ||
63 | .Fo PEM_read_SSL_SESSION | ||
64 | .Fa "FILE *fp" | ||
65 | .Fa "SSL_SESSION **a" | ||
66 | .Fa "pem_password_cb *cb" | ||
67 | .Fa "void *u" | ||
68 | .Fc | ||
69 | .Ft SSL_SESSION * | ||
70 | .Fo PEM_read_bio_SSL_SESSION | ||
71 | .Fa "BIO *bp" | ||
72 | .Fa "SSL_SESSION **a" | ||
73 | .Fa "pem_password_cb *cb" | ||
74 | .Fa "void *u" | ||
75 | .Fc | ||
76 | .Ft int | ||
77 | .Fo PEM_write_SSL_SESSION | ||
78 | .Fa "FILE *fp" | ||
79 | .Fa "const SSL_SESSION *a" | ||
80 | .Fc | ||
81 | .Ft int | ||
82 | .Fo PEM_write_bio_SSL_SESSION | ||
83 | .Fa "BIO *bp" | ||
84 | .Fa "const SSL_SESSION *a" | ||
85 | .Fc | ||
86 | .Sh DESCRIPTION | ||
87 | These routines convert between local instances of ASN.1 | ||
88 | .Vt SSL_SESSION | ||
89 | objects and the PEM encoding. | ||
90 | .Pp | ||
91 | .Fn PEM_read_SSL_SESSION | ||
92 | reads a PEM-encoded | ||
93 | .Vt SSL_SESSION | ||
94 | object from the file | ||
95 | .Fa fp | ||
96 | and returns it. | ||
97 | The | ||
98 | .Fa cb | ||
99 | and | ||
100 | .Fa u | ||
101 | parameters are as described in | ||
102 | .Xr PEM_read_bio_PrivateKey 3 . | ||
103 | .Pp | ||
104 | .Fn PEM_read_bio_SSL_SESSION | ||
105 | is similar to | ||
106 | .Fn PEM_read_SSL_SESSION | ||
107 | but reads from the BIO | ||
108 | .Fa bp . | ||
109 | .Pp | ||
110 | .Fn PEM_write_SSL_SESSION | ||
111 | writes the PEM encoding of the object | ||
112 | .Fa a | ||
113 | to the file | ||
114 | .Fa fp . | ||
115 | .Pp | ||
116 | .Fn PEM_write_bio_SSL_SESSION | ||
117 | similarly writes to the BIO | ||
118 | .Fa bp . | ||
119 | .Sh RETURN VALUES | ||
120 | .Fn PEM_read_SSL_SESSION | ||
121 | and | ||
122 | .Fn PEM_read_bio_SSL_SESSION | ||
123 | return a pointer to an allocated object, which should be released by | ||
124 | calling | ||
125 | .Xr SSL_SESSION_free 3 , | ||
126 | or | ||
127 | .Dv NULL | ||
128 | on error. | ||
129 | .Pp | ||
130 | .Fn PEM_write_SSL_SESSION | ||
131 | and | ||
132 | .Fn PEM_write_bio_SSL_SESSION | ||
133 | return the number of bytes written or 0 on error. | ||
134 | .Sh SEE ALSO | ||
135 | .Xr PEM_read 3 , | ||
136 | .Xr ssl 3 | ||
137 | .Sh HISTORY | ||
138 | .Fn PEM_read_SSL_SESSION | ||
139 | and | ||
140 | .Fn PEM_write_SSL_SESSION | ||
141 | first appeared in SSLeay 0.5.2. | ||
142 | .Fn PEM_read_bio_SSL_SESSION | ||
143 | and | ||
144 | .Fn PEM_write_bio_SSL_SESSION | ||
145 | first appeared in SSLeay 0.6.0. | ||
146 | These functions have been available since | ||
147 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_CIPHER_get_name.3 b/src/lib/libssl/man/SSL_CIPHER_get_name.3 deleted file mode 100644 index 86c1d3c0ba..0000000000 --- a/src/lib/libssl/man/SSL_CIPHER_get_name.3 +++ /dev/null | |||
@@ -1,398 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CIPHER_get_name.3,v 1.17 2024/07/16 10:19:38 tb Exp $ | ||
2 | .\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" selective merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800 | ||
4 | .\" | ||
5 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>, | ||
6 | .\" Dr. Stephen Henson <steve@openssl.org>, Todd Short <tshort@akamai.com>, | ||
7 | .\" and Paul Yang <yang.yang@baishancloud.com>. | ||
8 | .\" Copyright (c) 2000, 2005, 2009, 2013, 2014, 2015, 2016, 2017 | ||
9 | .\" The OpenSSL Project. All rights reserved. | ||
10 | .\" | ||
11 | .\" Redistribution and use in source and binary forms, with or without | ||
12 | .\" modification, are permitted provided that the following conditions | ||
13 | .\" are met: | ||
14 | .\" | ||
15 | .\" 1. Redistributions of source code must retain the above copyright | ||
16 | .\" notice, this list of conditions and the following disclaimer. | ||
17 | .\" | ||
18 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
19 | .\" notice, this list of conditions and the following disclaimer in | ||
20 | .\" the documentation and/or other materials provided with the | ||
21 | .\" distribution. | ||
22 | .\" | ||
23 | .\" 3. All advertising materials mentioning features or use of this | ||
24 | .\" software must display the following acknowledgment: | ||
25 | .\" "This product includes software developed by the OpenSSL Project | ||
26 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
27 | .\" | ||
28 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
29 | .\" endorse or promote products derived from this software without | ||
30 | .\" prior written permission. For written permission, please contact | ||
31 | .\" openssl-core@openssl.org. | ||
32 | .\" | ||
33 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
34 | .\" nor may "OpenSSL" appear in their names without prior written | ||
35 | .\" permission of the OpenSSL Project. | ||
36 | .\" | ||
37 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
38 | .\" acknowledgment: | ||
39 | .\" "This product includes software developed by the OpenSSL Project | ||
40 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
41 | .\" | ||
42 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
43 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
44 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
45 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
46 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
47 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
48 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
49 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
50 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
51 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
52 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
53 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
54 | .\" | ||
55 | .Dd $Mdocdate: July 16 2024 $ | ||
56 | .Dt SSL_CIPHER_GET_NAME 3 | ||
57 | .Os | ||
58 | .Sh NAME | ||
59 | .Nm SSL_CIPHER_get_name , | ||
60 | .Nm SSL_CIPHER_get_bits , | ||
61 | .Nm SSL_CIPHER_get_version , | ||
62 | .Nm SSL_CIPHER_get_cipher_nid , | ||
63 | .Nm SSL_CIPHER_get_digest_nid , | ||
64 | .Nm SSL_CIPHER_get_handshake_digest , | ||
65 | .Nm SSL_CIPHER_get_kx_nid , | ||
66 | .Nm SSL_CIPHER_get_auth_nid , | ||
67 | .Nm SSL_CIPHER_is_aead , | ||
68 | .Nm SSL_CIPHER_find , | ||
69 | .Nm SSL_CIPHER_get_id , | ||
70 | .Nm SSL_CIPHER_description | ||
71 | .Nd get SSL_CIPHER properties | ||
72 | .Sh SYNOPSIS | ||
73 | .In openssl/ssl.h | ||
74 | .Ft const char * | ||
75 | .Fn SSL_CIPHER_get_name "const SSL_CIPHER *cipher" | ||
76 | .Ft int | ||
77 | .Fn SSL_CIPHER_get_bits "const SSL_CIPHER *cipher" "int *alg_bits" | ||
78 | .Ft const char * | ||
79 | .Fn SSL_CIPHER_get_version "const SSL_CIPHER *cipher" | ||
80 | .Ft int | ||
81 | .Fn SSL_CIPHER_get_cipher_nid "const SSL_CIPHER *cipher" | ||
82 | .Ft int | ||
83 | .Fn SSL_CIPHER_get_digest_nid "const SSL_CIPHER *cipher" | ||
84 | .Ft "const EVP_MD *" | ||
85 | .Fn SSL_CIPHER_get_handshake_digest "const SSL_CIPHER *cipher" | ||
86 | .Ft int | ||
87 | .Fn SSL_CIPHER_get_kx_nid "const SSL_CIPHER *cipher" | ||
88 | .Ft int | ||
89 | .Fn SSL_CIPHER_get_auth_nid "const SSL_CIPHER *cipher" | ||
90 | .Ft int | ||
91 | .Fn SSL_CIPHER_is_aead "const SSL_CIPHER *cipher" | ||
92 | .Ft const SSL_CIPHER * | ||
93 | .Fn SSL_CIPHER_find "SSL *ssl" "const unsigned char *ptr" | ||
94 | .Ft unsigned long | ||
95 | .Fn SSL_CIPHER_get_id "const SSL_CIPHER *cipher" | ||
96 | .Ft char * | ||
97 | .Fn SSL_CIPHER_description "const SSL_CIPHER *cipher" "char *buf" "int size" | ||
98 | .Sh DESCRIPTION | ||
99 | .Fn SSL_CIPHER_get_name | ||
100 | returns a pointer to the name of | ||
101 | .Fa cipher . | ||
102 | .Pp | ||
103 | .Fn SSL_CIPHER_get_bits | ||
104 | returns the number of secret bits used for | ||
105 | .Fa cipher . | ||
106 | If | ||
107 | .Fa alg_bits | ||
108 | is not | ||
109 | .Dv NULL , | ||
110 | the number of bits processed by the chosen algorithm is stored into it. | ||
111 | .Pp | ||
112 | .Fn SSL_CIPHER_get_version | ||
113 | returns a string which indicates the SSL/TLS protocol version that first | ||
114 | defined the cipher. | ||
115 | This is currently | ||
116 | .Qq TLSv1/SSLv3 . | ||
117 | In some cases it should possibly return | ||
118 | .Qq TLSv1.2 | ||
119 | but the function does not; use | ||
120 | .Fn SSL_CIPHER_description | ||
121 | instead. | ||
122 | .Pp | ||
123 | .Fn SSL_CIPHER_get_cipher_nid | ||
124 | returns the cipher NID corresponding to the | ||
125 | .Fa cipher . | ||
126 | If there is no cipher (e.g. for cipher suites with no encryption), then | ||
127 | .Dv NID_undef | ||
128 | is returned. | ||
129 | .Pp | ||
130 | .Fn SSL_CIPHER_get_digest_nid | ||
131 | returns the digest NID corresponding to the MAC used by the | ||
132 | .Fa cipher | ||
133 | during record encryption/decryption. | ||
134 | If there is no digest (e.g. for AEAD cipher suites), then | ||
135 | .Dv NID_undef | ||
136 | is returned. | ||
137 | .Pp | ||
138 | .Fn SSL_CIPHER_get_handshake_digest | ||
139 | returns the | ||
140 | .Vt EVP_MD | ||
141 | object representing the digest used during a TLS handshake with the cipher | ||
142 | .Fa c , | ||
143 | which may be different to the digest used in the message authentication code | ||
144 | for encrypted records. | ||
145 | .Pp | ||
146 | .Fn SSL_CIPHER_get_kx_nid | ||
147 | returns the key exchange NID corresponding to the method used by the | ||
148 | .Fa cipher . | ||
149 | If there is no key exchange, then | ||
150 | .Dv NID_undef | ||
151 | is returned. | ||
152 | Examples of possible return values include | ||
153 | .Dv NID_kx_rsa , | ||
154 | .Dv NID_kx_dhe , | ||
155 | and | ||
156 | .Dv NID_kx_ecdhe . | ||
157 | .Pp | ||
158 | .Fn SSL_CIPHER_get_auth_nid | ||
159 | returns the authentication NID corresponding to the method used by the | ||
160 | .Fa cipher . | ||
161 | If there is no authentication, | ||
162 | .Dv NID_undef | ||
163 | is returned. | ||
164 | Examples of possible return values include | ||
165 | .Dv NID_auth_rsa | ||
166 | and | ||
167 | .Dv NID_auth_ecdsa . | ||
168 | .Pp | ||
169 | .Fn SSL_CIPHER_is_aead | ||
170 | returns 1 if the | ||
171 | .Fa cipher | ||
172 | is AEAD (e.g. GCM or ChaCha20/Poly1305), or 0 if it is not AEAD. | ||
173 | .Pp | ||
174 | .Fn SSL_CIPHER_find | ||
175 | returns a pointer to a | ||
176 | .Vt SSL_CIPHER | ||
177 | structure which has the cipher ID specified in | ||
178 | .Fa ptr . | ||
179 | The | ||
180 | .Fa ptr | ||
181 | parameter is an array of length two which stores the two-byte | ||
182 | TLS cipher ID (as allocated by IANA) in network byte order. | ||
183 | .Fa SSL_CIPHER_find | ||
184 | returns | ||
185 | .Dv NULL | ||
186 | if an error occurs or the indicated cipher is not found. | ||
187 | .Pp | ||
188 | .Fn SSL_CIPHER_get_id | ||
189 | returns the ID of the given | ||
190 | .Fa cipher , | ||
191 | which must not be | ||
192 | .Dv NULL . | ||
193 | The ID here is an OpenSSL-specific concept, which stores a prefix | ||
194 | of 0x0300 in the higher two bytes and the IANA-specified cipher | ||
195 | suite ID in the lower two bytes. | ||
196 | For instance, TLS_RSA_WITH_NULL_MD5 has IANA ID "0x00, 0x01", so | ||
197 | .Fn SSL_CIPHER_get_id | ||
198 | returns 0x03000001. | ||
199 | .Pp | ||
200 | .Fn SSL_CIPHER_description | ||
201 | copies a textual description of | ||
202 | .Fa cipher | ||
203 | into the buffer | ||
204 | .Fa buf , | ||
205 | which must be at least | ||
206 | .Fa size | ||
207 | bytes long. | ||
208 | The | ||
209 | .Fa cipher | ||
210 | argument must not be a | ||
211 | .Dv NULL | ||
212 | pointer. | ||
213 | If | ||
214 | .Fa buf | ||
215 | is | ||
216 | .Dv NULL , | ||
217 | a buffer is allocated using | ||
218 | .Xr asprintf 3 ; | ||
219 | that buffer should be freed using the | ||
220 | .Xr free 3 | ||
221 | function. | ||
222 | If | ||
223 | .Fa len | ||
224 | is too small to hold the description, a pointer to the static string | ||
225 | .Qq Buffer too small | ||
226 | is returned. | ||
227 | If memory allocation fails, which can happen even if a | ||
228 | .Fa buf | ||
229 | of sufficient size is provided, a pointer to the static string | ||
230 | .Qq OPENSSL_malloc Error | ||
231 | is returned and the content of | ||
232 | .Fa buf | ||
233 | remains unchanged. | ||
234 | .Pp | ||
235 | The string returned by | ||
236 | .Fn SSL_CIPHER_description | ||
237 | consists of several fields separated by whitespace: | ||
238 | .Bl -tag -width Ds | ||
239 | .It Aq Ar ciphername | ||
240 | Textual representation of the cipher name. | ||
241 | .It Aq Ar protocol version | ||
242 | Protocol version: | ||
243 | .Sy SSLv3 , | ||
244 | .Sy TLSv1.2 , | ||
245 | or | ||
246 | .Sy TLSv1.3 . | ||
247 | The TLSv1.0 ciphers are flagged with SSLv3. | ||
248 | No new ciphers were added by TLSv1.1. | ||
249 | .It Kx= Ns Aq Ar key exchange | ||
250 | Key exchange method: | ||
251 | .Sy DH , | ||
252 | .Sy ECDH , | ||
253 | .Sy GOST , | ||
254 | .Sy RSA , | ||
255 | or | ||
256 | .Sy TLSv1.3 . | ||
257 | .It Au= Ns Aq Ar authentication | ||
258 | Authentication method: | ||
259 | .Sy ECDSA , | ||
260 | .Sy GOST01 , | ||
261 | .Sy RSA , | ||
262 | .Sy TLSv1.3 , | ||
263 | or | ||
264 | .Sy None . | ||
265 | .Sy None | ||
266 | is the representation of anonymous ciphers. | ||
267 | .It Enc= Ns Aq Ar symmetric encryption method | ||
268 | Encryption method with number of secret bits: | ||
269 | .Sy 3DES(168) , | ||
270 | .Sy RC4(128) , | ||
271 | .Sy AES(128) , | ||
272 | .Sy AES(256) , | ||
273 | .Sy AESGCM(128) , | ||
274 | .Sy AESGCM(256) , | ||
275 | .Sy Camellia(128) , | ||
276 | .Sy Camellia(256) , | ||
277 | .Sy ChaCha20-Poly1305 , | ||
278 | .Sy GOST-28178-89-CNT , | ||
279 | or | ||
280 | .Sy None . | ||
281 | .It Mac= Ns Aq Ar message authentication code | ||
282 | Message digest: | ||
283 | .Sy MD5 , | ||
284 | .Sy SHA1 , | ||
285 | .Sy SHA256 , | ||
286 | .Sy SHA384 , | ||
287 | .Sy AEAD , | ||
288 | .Sy GOST94 , | ||
289 | .Sy GOST89IMIT , | ||
290 | or | ||
291 | .Sy STREEBOG256 . | ||
292 | .El | ||
293 | .Sh RETURN VALUES | ||
294 | .Fn SSL_CIPHER_get_name | ||
295 | returns an internal pointer to a NUL-terminated string. | ||
296 | .Fn SSL_CIPHER_get_version | ||
297 | returns a pointer to a static NUL-terminated string. | ||
298 | If | ||
299 | .Fa cipher | ||
300 | is a | ||
301 | .Dv NULL | ||
302 | pointer, both functions return a pointer to the static string | ||
303 | .Qq Pq NONE . | ||
304 | .Pp | ||
305 | .Fn SSL_CIPHER_get_bits | ||
306 | returns a positive integer representing the number of secret bits | ||
307 | or 0 if | ||
308 | .Fa cipher | ||
309 | is a | ||
310 | .Dv NULL | ||
311 | pointer. | ||
312 | .Pp | ||
313 | .Fn SSL_CIPHER_get_cipher_nid , | ||
314 | .Fn SSL_CIPHER_get_digest_nid , | ||
315 | .Fn SSL_CIPHER_get_kx_nid , | ||
316 | and | ||
317 | .Fn SSL_CIPHER_get_auth_nid | ||
318 | return an NID constant or | ||
319 | .Dv NID_undef | ||
320 | if an error occurred. | ||
321 | .Fn SSL_CIPHER_get_handshake_digest | ||
322 | returns a valid | ||
323 | .Vt EVP_MD | ||
324 | object or | ||
325 | .Dv NULL | ||
326 | if an error occurred. | ||
327 | .Pp | ||
328 | .Fn SSL_CIPHER_is_aead | ||
329 | returns 1 if the | ||
330 | .Fa cipher | ||
331 | is AEAD or 0 otherwise. | ||
332 | .Pp | ||
333 | .Fn SSL_CIPHER_find | ||
334 | returns a pointer to a valid | ||
335 | .Vt SSL_CIPHER | ||
336 | structure or | ||
337 | .Dv NULL | ||
338 | if an error occurred. | ||
339 | .Pp | ||
340 | .Fn SSL_CIPHER_get_id | ||
341 | returns a 32-bit unsigned integer. | ||
342 | .Pp | ||
343 | .Fn SSL_CIPHER_description | ||
344 | returns | ||
345 | .Fa buf | ||
346 | or a newly allocated string on success or a pointer to a static | ||
347 | string on error. | ||
348 | .Sh EXAMPLES | ||
349 | An example for the output of | ||
350 | .Fn SSL_CIPHER_description : | ||
351 | .Bd -literal | ||
352 | ECDHE-RSA-AES256-GCM-SHA256 TLSv1.2 Kx=ECDH Au=RSA Enc=AESGCM(256) Mac=AEAD | ||
353 | .Ed | ||
354 | .Pp | ||
355 | A complete list can be retrieved by invoking the following command: | ||
356 | .Pp | ||
357 | .Dl $ openssl ciphers -v ALL:COMPLEMENTOFALL | ||
358 | .Sh SEE ALSO | ||
359 | .Xr openssl 1 , | ||
360 | .Xr ssl 3 , | ||
361 | .Xr SSL_get_ciphers 3 , | ||
362 | .Xr SSL_get_current_cipher 3 | ||
363 | .Sh HISTORY | ||
364 | .Fn SSL_CIPHER_description | ||
365 | first appeared in SSLeay 0.8.0. | ||
366 | .Fn SSL_CIPHER_get_name , | ||
367 | .Fn SSL_CIPHER_get_bits , | ||
368 | and | ||
369 | .Fn SSL_CIPHER_get_version | ||
370 | first appeared in SSLeay 0.8.1. | ||
371 | These functions have been available since | ||
372 | .Ox 2.4 . | ||
373 | .Pp | ||
374 | .Fn SSL_CIPHER_get_id | ||
375 | first appeared in OpenSSL 1.0.1 and has been available since | ||
376 | .Ox 5.3 . | ||
377 | .Pp | ||
378 | .Fn SSL_CIPHER_get_cipher_nid , | ||
379 | .Fn SSL_CIPHER_get_digest_nid , | ||
380 | .Fn SSL_CIPHER_get_kx_nid , | ||
381 | .Fn SSL_CIPHER_get_auth_nid , | ||
382 | and | ||
383 | .Fn SSL_CIPHER_is_aead | ||
384 | first appeared in OpenSSL 1.1.0 and have been available since | ||
385 | .Ox 6.3 . | ||
386 | .Fn SSL_CIPHER_find | ||
387 | first appeared in OpenSSL 1.1.0 and has been available since | ||
388 | .Ox 7.0 . | ||
389 | .Fn SSL_CIPHER_get_handshake_digest | ||
390 | first appeared in OpenSSL 1.1.1 and has been available since | ||
391 | .Ox 7.6 . | ||
392 | .Sh BUGS | ||
393 | If | ||
394 | .Fn SSL_CIPHER_description | ||
395 | cannot handle a built-in cipher, | ||
396 | the according description of the cipher property is | ||
397 | .Qq unknown . | ||
398 | This case should not occur. | ||
diff --git a/src/lib/libssl/man/SSL_COMP_add_compression_method.3 b/src/lib/libssl/man/SSL_COMP_add_compression_method.3 deleted file mode 100644 index f9e25358d7..0000000000 --- a/src/lib/libssl/man/SSL_COMP_add_compression_method.3 +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_COMP_add_compression_method.3,v 1.7 2024/08/31 10:51:48 tb Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> | ||
4 | .\" | ||
5 | .\" Permission to use, copy, modify, and distribute this software for any | ||
6 | .\" purpose with or without fee is hereby granted, provided that the above | ||
7 | .\" copyright notice and this permission notice appear in all copies. | ||
8 | .\" | ||
9 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | .\" | ||
17 | .Dd $Mdocdate: August 31 2024 $ | ||
18 | .Dt SSL_COMP_ADD_COMPRESSION_METHOD 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm SSL_COMP_get_compression_methods | ||
22 | .Nd handle SSL/TLS integrated compression methods | ||
23 | .Sh SYNOPSIS | ||
24 | .In openssl/ssl.h | ||
25 | .Ft STACK_OF(SSL_COMP) * | ||
26 | .Fn SSL_COMP_get_compression_methods void | ||
27 | .Sh DESCRIPTION | ||
28 | This function is deprecated and has no effect. | ||
29 | It is provided purely for compatibility with legacy application code. | ||
30 | .Pp | ||
31 | .Fn SSL_COMP_get_compression_methods | ||
32 | used to return a stack of available compression methods. | ||
33 | .Sh RETURN VALUES | ||
34 | .Fn SSL_COMP_get_compression_methods | ||
35 | always returns | ||
36 | .Dv NULL . | ||
37 | .Sh SEE ALSO | ||
38 | .Xr ssl 3 | ||
39 | .Sh HISTORY | ||
40 | .Fn SSL_COMP_get_compression_methods | ||
41 | first appeared in OpenSSL 0.9.8 and has been available since | ||
42 | .Ox 4.5 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_add1_chain_cert.3 b/src/lib/libssl/man/SSL_CTX_add1_chain_cert.3 deleted file mode 100644 index 86eb27a523..0000000000 --- a/src/lib/libssl/man/SSL_CTX_add1_chain_cert.3 +++ /dev/null | |||
@@ -1,222 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_add1_chain_cert.3,v 1.2 2025/01/18 10:45:12 tb Exp $ | ||
2 | .\" selective merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org> | ||
5 | .\" and Rob Stradling <rob.stradling@comodo.com>. | ||
6 | .\" Copyright (c) 2013 The OpenSSL Project. All rights reserved. | ||
7 | .\" | ||
8 | .\" Redistribution and use in source and binary forms, with or without | ||
9 | .\" modification, are permitted provided that the following conditions | ||
10 | .\" are met: | ||
11 | .\" | ||
12 | .\" 1. Redistributions of source code must retain the above copyright | ||
13 | .\" notice, this list of conditions and the following disclaimer. | ||
14 | .\" | ||
15 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
16 | .\" notice, this list of conditions and the following disclaimer in | ||
17 | .\" the documentation and/or other materials provided with the | ||
18 | .\" distribution. | ||
19 | .\" | ||
20 | .\" 3. All advertising materials mentioning features or use of this | ||
21 | .\" software must display the following acknowledgment: | ||
22 | .\" "This product includes software developed by the OpenSSL Project | ||
23 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
24 | .\" | ||
25 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | .\" endorse or promote products derived from this software without | ||
27 | .\" prior written permission. For written permission, please contact | ||
28 | .\" openssl-core@openssl.org. | ||
29 | .\" | ||
30 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
31 | .\" nor may "OpenSSL" appear in their names without prior written | ||
32 | .\" permission of the OpenSSL Project. | ||
33 | .\" | ||
34 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
35 | .\" acknowledgment: | ||
36 | .\" "This product includes software developed by the OpenSSL Project | ||
37 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
38 | .\" | ||
39 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | .\" | ||
52 | .Dd $Mdocdate: January 18 2025 $ | ||
53 | .Dt SSL_CTX_ADD1_CHAIN_CERT 3 | ||
54 | .Os | ||
55 | .Sh NAME | ||
56 | .Nm SSL_CTX_set0_chain , | ||
57 | .Nm SSL_CTX_set1_chain , | ||
58 | .Nm SSL_CTX_add0_chain_cert , | ||
59 | .Nm SSL_CTX_add1_chain_cert , | ||
60 | .Nm SSL_CTX_get0_chain_certs , | ||
61 | .Nm SSL_CTX_clear_chain_certs , | ||
62 | .Nm SSL_set0_chain , | ||
63 | .Nm SSL_set1_chain , | ||
64 | .Nm SSL_add0_chain_cert , | ||
65 | .Nm SSL_add1_chain_cert , | ||
66 | .Nm SSL_get0_chain_certs , | ||
67 | .Nm SSL_clear_chain_certs | ||
68 | .Nd extra chain certificate processing | ||
69 | .Sh SYNOPSIS | ||
70 | .In openssl/ssl.h | ||
71 | .Ft int | ||
72 | .Fo SSL_CTX_set0_chain | ||
73 | .Fa "SSL_CTX *ctx" | ||
74 | .Fa "STACK_OF(X509) *chain" | ||
75 | .Fc | ||
76 | .Ft int | ||
77 | .Fo SSL_CTX_set1_chain | ||
78 | .Fa "SSL_CTX *ctx" | ||
79 | .Fa "STACK_OF(X509) *chain" | ||
80 | .Fc | ||
81 | .Ft int | ||
82 | .Fo SSL_CTX_add0_chain_cert | ||
83 | .Fa "SSL_CTX *ctx" | ||
84 | .Fa "X509 *cert" | ||
85 | .Fc | ||
86 | .Ft int | ||
87 | .Fo SSL_CTX_add1_chain_cert | ||
88 | .Fa "SSL_CTX *ctx" | ||
89 | .Fa "X509 *cert" | ||
90 | .Fc | ||
91 | .Ft int | ||
92 | .Fo SSL_CTX_get0_chain_certs | ||
93 | .Fa "SSL_CTX *ctx" | ||
94 | .Fa "STACK_OF(X509) **chain" | ||
95 | .Fc | ||
96 | .Ft int | ||
97 | .Fo SSL_CTX_clear_chain_certs | ||
98 | .Fa "SSL_CTX *ctx" | ||
99 | .Fc | ||
100 | .Ft int | ||
101 | .Fo SSL_set0_chain | ||
102 | .Fa "SSL *ssl" | ||
103 | .Fa "STACK_OF(X509) *chain" | ||
104 | .Fc | ||
105 | .Ft int | ||
106 | .Fo SSL_set1_chain | ||
107 | .Fa "SSL *ssl" | ||
108 | .Fa "STACK_OF(X509) *chain" | ||
109 | .Fc | ||
110 | .Ft int | ||
111 | .Fo SSL_add0_chain_cert | ||
112 | .Fa "SSL *ssl" | ||
113 | .Fa "X509 *cert" | ||
114 | .Fc | ||
115 | .Ft int | ||
116 | .Fo SSL_add1_chain_cert | ||
117 | .Fa "SSL *ssl" | ||
118 | .Fa "X509 *cert" | ||
119 | .Fc | ||
120 | .Ft int | ||
121 | .Fo SSL_get0_chain_certs | ||
122 | .Fa "SSL *ssl" | ||
123 | .Fa "STACK_OF(X509) **chain" | ||
124 | .Fc | ||
125 | .Ft int | ||
126 | .Fo SSL_clear_chain_certs | ||
127 | .Fa "SSL *ssl" | ||
128 | .Fc | ||
129 | .Sh DESCRIPTION | ||
130 | .Fn SSL_CTX_set0_chain | ||
131 | and | ||
132 | .Fn SSL_CTX_set1_chain | ||
133 | set the certificate chain associated with the current certificate of | ||
134 | .Fa ctx | ||
135 | to | ||
136 | .Fa chain . | ||
137 | The | ||
138 | .Fa chain | ||
139 | is not supposed to include the current certificate itself. | ||
140 | .Pp | ||
141 | .Fn SSL_CTX_add0_chain_cert | ||
142 | and | ||
143 | .Fn SSL_CTX_add1_chain_cert | ||
144 | append the single certificate | ||
145 | .Fa cert | ||
146 | to the chain associated with the current certificate of | ||
147 | .Fa ctx . | ||
148 | .Pp | ||
149 | .Fn SSL_CTX_get0_chain_certs | ||
150 | retrieves the chain associated with the current certificate of | ||
151 | .Fa ctx . | ||
152 | .Pp | ||
153 | .Fn SSL_CTX_clear_chain_certs | ||
154 | clears the existing chain associated with the current certificate of | ||
155 | .Fa ctx , | ||
156 | if any. | ||
157 | This is equivalent to calling | ||
158 | .Fn SSL_CTX_set0_chain | ||
159 | with | ||
160 | .Fa chain | ||
161 | set to | ||
162 | .Dv NULL . | ||
163 | .Pp | ||
164 | Each of these functions operates on the | ||
165 | .Em current | ||
166 | end entity (i.e. server or client) certificate. | ||
167 | This is the last certificate loaded or selected on the corresponding | ||
168 | .Fa ctx | ||
169 | structure, for example using | ||
170 | .Xr SSL_CTX_use_certificate 3 . | ||
171 | .Pp | ||
172 | .Fn SSL_set0_chain , | ||
173 | .Fn SSL_set1_chain , | ||
174 | .Fn SSL_add0_chain_cert , | ||
175 | .Fn SSL_add1_chain_cert , | ||
176 | .Fn SSL_get0_chain_certs , | ||
177 | and | ||
178 | .Fn SSL_clear_chain_certs | ||
179 | are similar except that they operate on the | ||
180 | .Fa ssl | ||
181 | connection. | ||
182 | .Pp | ||
183 | The functions containing a | ||
184 | .Sy 1 | ||
185 | in their name increment the reference count of the supplied certificate | ||
186 | or chain, so it must be freed at some point after the operation. | ||
187 | Those containing a | ||
188 | .Sy 0 | ||
189 | do not increment reference counts and the supplied certificate or chain | ||
190 | must not be freed after the operation. | ||
191 | .Pp | ||
192 | The chains associated with an | ||
193 | .Vt SSL_CTX | ||
194 | structure are copied to the new | ||
195 | .Vt SSL | ||
196 | structure when | ||
197 | .Xr SSL_new 3 | ||
198 | is called. | ||
199 | Existing | ||
200 | .Vt SSL | ||
201 | structures are not affected by any chains subsequently changed | ||
202 | in the parent | ||
203 | .Vt SSL_CTX . | ||
204 | .Pp | ||
205 | One chain can be set for each key type supported by a server. | ||
206 | So, for example, an RSA and an ECDSA certificate can have | ||
207 | different chains. | ||
208 | .Pp | ||
209 | If any certificates are added using these functions, no certificates | ||
210 | added using | ||
211 | .Xr SSL_CTX_add_extra_chain_cert 3 | ||
212 | will be used. | ||
213 | .Sh RETURN VALUES | ||
214 | These functions return 1 for success or 0 for failure. | ||
215 | .Sh SEE ALSO | ||
216 | .Xr ssl 3 , | ||
217 | .Xr SSL_CTX_add_extra_chain_cert 3 , | ||
218 | .Xr SSL_CTX_use_certificate 3 | ||
219 | .Sh HISTORY | ||
220 | These functions first appeared in OpenSSL 1.0.2 | ||
221 | and have been available since | ||
222 | .Ox 6.5 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 b/src/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 deleted file mode 100644 index b9694b0cbc..0000000000 --- a/src/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 +++ /dev/null | |||
@@ -1,160 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_add_extra_chain_cert.3,v 1.8 2025/01/18 10:45:12 tb Exp $ | ||
2 | .\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org> and | ||
5 | .\" Dr. Stephen Henson <steve@openssl.org>. | ||
6 | .\" Copyright (c) 2000, 2002, 2013, 2015 The OpenSSL Project. | ||
7 | .\" All rights reserved. | ||
8 | .\" | ||
9 | .\" Redistribution and use in source and binary forms, with or without | ||
10 | .\" modification, are permitted provided that the following conditions | ||
11 | .\" are met: | ||
12 | .\" | ||
13 | .\" 1. Redistributions of source code must retain the above copyright | ||
14 | .\" notice, this list of conditions and the following disclaimer. | ||
15 | .\" | ||
16 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
17 | .\" notice, this list of conditions and the following disclaimer in | ||
18 | .\" the documentation and/or other materials provided with the | ||
19 | .\" distribution. | ||
20 | .\" | ||
21 | .\" 3. All advertising materials mentioning features or use of this | ||
22 | .\" software must display the following acknowledgment: | ||
23 | .\" "This product includes software developed by the OpenSSL Project | ||
24 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
25 | .\" | ||
26 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
27 | .\" endorse or promote products derived from this software without | ||
28 | .\" prior written permission. For written permission, please contact | ||
29 | .\" openssl-core@openssl.org. | ||
30 | .\" | ||
31 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
32 | .\" nor may "OpenSSL" appear in their names without prior written | ||
33 | .\" permission of the OpenSSL Project. | ||
34 | .\" | ||
35 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
36 | .\" acknowledgment: | ||
37 | .\" "This product includes software developed by the OpenSSL Project | ||
38 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
39 | .\" | ||
40 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
41 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
42 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
43 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
44 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
45 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
46 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
47 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
48 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
49 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
50 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
51 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
52 | .\" | ||
53 | .Dd $Mdocdate: January 18 2025 $ | ||
54 | .Dt SSL_CTX_ADD_EXTRA_CHAIN_CERT 3 | ||
55 | .Os | ||
56 | .Sh NAME | ||
57 | .Nm SSL_CTX_add_extra_chain_cert , | ||
58 | .Nm SSL_CTX_get_extra_chain_certs_only , | ||
59 | .Nm SSL_CTX_get_extra_chain_certs , | ||
60 | .Nm SSL_CTX_clear_extra_chain_certs | ||
61 | .Nd add, retrieve, and clear extra chain certificates | ||
62 | .Sh SYNOPSIS | ||
63 | .In openssl/ssl.h | ||
64 | .Ft long | ||
65 | .Fn SSL_CTX_add_extra_chain_cert "SSL_CTX *ctx" "X509 *x509" | ||
66 | .Ft long | ||
67 | .Fn SSL_CTX_get_extra_chain_certs_only "SSL_CTX *ctx" "STACK_OF(X509) **certs" | ||
68 | .Ft long | ||
69 | .Fn SSL_CTX_get_extra_chain_certs "SSL_CTX *ctx" "STACK_OF(X509) **certs" | ||
70 | .Ft long | ||
71 | .Fn SSL_CTX_clear_extra_chain_certs "SSL_CTX *ctx" | ||
72 | .Sh DESCRIPTION | ||
73 | .Fn SSL_CTX_add_extra_chain_cert | ||
74 | adds the certificate | ||
75 | .Fa x509 | ||
76 | to the extra chain certificates associated with | ||
77 | .Fa ctx . | ||
78 | Several certificates can be added one after another. | ||
79 | .Pp | ||
80 | .Fn SSL_CTX_get_extra_chain_certs_only | ||
81 | retrieves an internal pointer to the stack of extra chain certificates | ||
82 | associated with | ||
83 | .Fa ctx , | ||
84 | or set | ||
85 | .Pf * Fa certs | ||
86 | to | ||
87 | .Dv NULL | ||
88 | if there are none. | ||
89 | .Pp | ||
90 | .Fn SSL_CTX_get_extra_chain_certs | ||
91 | does the same except that it retrieves an internal pointer | ||
92 | to the chain associated with the certificate | ||
93 | if there are no extra chain certificates. | ||
94 | .Pp | ||
95 | .Fn SSL_CTX_clear_extra_chain_certs | ||
96 | clears all extra chain certificates associated with | ||
97 | .Fa ctx . | ||
98 | .Pp | ||
99 | These functions are implemented as macros. | ||
100 | .Pp | ||
101 | When sending a certificate chain, extra chain certificates are sent | ||
102 | in order following the end entity certificate. | ||
103 | .Pp | ||
104 | If no chain is specified, the library will try to complete the chain from the | ||
105 | available CA certificates in the trusted CA storage, see | ||
106 | .Xr SSL_CTX_load_verify_locations 3 . | ||
107 | .Pp | ||
108 | The x509 certificate provided to | ||
109 | .Fn SSL_CTX_add_extra_chain_cert | ||
110 | will be freed by the library when the | ||
111 | .Vt SSL_CTX | ||
112 | is destroyed. | ||
113 | An application should not free the | ||
114 | .Fa x509 | ||
115 | object, nor the | ||
116 | .Pf * Fa certs | ||
117 | object retrieved by | ||
118 | .Fn SSL_CTX_get_extra_chain_certs . | ||
119 | .Sh RETURN VALUES | ||
120 | These functions return 1 on success or 0 for failure. | ||
121 | Check out the error stack to find out the reason for failure. | ||
122 | .Sh SEE ALSO | ||
123 | .Xr ssl 3 , | ||
124 | .Xr SSL_CTX_add1_chain_cert 3 , | ||
125 | .Xr SSL_CTX_ctrl 3 , | ||
126 | .Xr SSL_CTX_load_verify_locations 3 , | ||
127 | .Xr SSL_CTX_set_client_cert_cb 3 , | ||
128 | .Xr SSL_CTX_use_certificate 3 | ||
129 | .Sh HISTORY | ||
130 | .Fn SSL_CTX_add_extra_chain_cert | ||
131 | first appeared in SSLeay 0.9.1 and has been available since | ||
132 | .Ox 2.6 . | ||
133 | .Pp | ||
134 | .Fn SSL_CTX_get_extra_chain_certs | ||
135 | and | ||
136 | .Fn SSL_CTX_clear_extra_chain_certs | ||
137 | first appeared in OpenSSL 1.0.1 and have been available since | ||
138 | .Ox 5.3 . | ||
139 | .Pp | ||
140 | .Fn SSL_CTX_get_extra_chain_certs_only | ||
141 | first appeared in OpenSSL 1.0.2 and has been available since | ||
142 | .Ox 6.7 . | ||
143 | .Sh CAVEATS | ||
144 | Certificates added with | ||
145 | .Fn SSL_CTX_add_extra_chain_cert | ||
146 | are ignored when certificates are also available that have been | ||
147 | added using the functions documented in | ||
148 | .Xr SSL_CTX_set1_chain 3 . | ||
149 | .Pp | ||
150 | Only one set of extra chain certificates can be specified per | ||
151 | .Vt SSL_CTX | ||
152 | structure using | ||
153 | .Fn SSL_CTX_add_extra_chain_cert . | ||
154 | Different chains for different certificates (for example if both | ||
155 | RSA and ECDSA certificates are specified by the same server) or | ||
156 | different SSL structures with the same parent | ||
157 | .Vt SSL_CTX | ||
158 | require using the functions documented in | ||
159 | .Xr SSL_CTX_set1_chain 3 | ||
160 | instead. | ||
diff --git a/src/lib/libssl/man/SSL_CTX_add_session.3 b/src/lib/libssl/man/SSL_CTX_add_session.3 deleted file mode 100644 index 443bdb542a..0000000000 --- a/src/lib/libssl/man/SSL_CTX_add_session.3 +++ /dev/null | |||
@@ -1,132 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_add_session.3,v 1.5 2018/03/27 17:35:50 schwarze Exp $ | ||
2 | .\" OpenSSL SSL_CTX_add_session.pod 1722496f Jun 8 15:18:38 2017 -0400 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org> and | ||
5 | .\" Geoff Thorpe <geoff@openssl.org>. | ||
6 | .\" Copyright (c) 2001, 2002, 2014 The OpenSSL Project. All rights reserved. | ||
7 | .\" | ||
8 | .\" Redistribution and use in source and binary forms, with or without | ||
9 | .\" modification, are permitted provided that the following conditions | ||
10 | .\" are met: | ||
11 | .\" | ||
12 | .\" 1. Redistributions of source code must retain the above copyright | ||
13 | .\" notice, this list of conditions and the following disclaimer. | ||
14 | .\" | ||
15 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
16 | .\" notice, this list of conditions and the following disclaimer in | ||
17 | .\" the documentation and/or other materials provided with the | ||
18 | .\" distribution. | ||
19 | .\" | ||
20 | .\" 3. All advertising materials mentioning features or use of this | ||
21 | .\" software must display the following acknowledgment: | ||
22 | .\" "This product includes software developed by the OpenSSL Project | ||
23 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
24 | .\" | ||
25 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | .\" endorse or promote products derived from this software without | ||
27 | .\" prior written permission. For written permission, please contact | ||
28 | .\" openssl-core@openssl.org. | ||
29 | .\" | ||
30 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
31 | .\" nor may "OpenSSL" appear in their names without prior written | ||
32 | .\" permission of the OpenSSL Project. | ||
33 | .\" | ||
34 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
35 | .\" acknowledgment: | ||
36 | .\" "This product includes software developed by the OpenSSL Project | ||
37 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
38 | .\" | ||
39 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | .\" | ||
52 | .Dd $Mdocdate: March 27 2018 $ | ||
53 | .Dt SSL_CTX_ADD_SESSION 3 | ||
54 | .Os | ||
55 | .Sh NAME | ||
56 | .Nm SSL_CTX_add_session , | ||
57 | .Nm SSL_CTX_remove_session | ||
58 | .Nd manipulate session cache | ||
59 | .Sh SYNOPSIS | ||
60 | .In openssl/ssl.h | ||
61 | .Ft int | ||
62 | .Fn SSL_CTX_add_session "SSL_CTX *ctx" "SSL_SESSION *c" | ||
63 | .Ft int | ||
64 | .Fn SSL_CTX_remove_session "SSL_CTX *ctx" "SSL_SESSION *c" | ||
65 | .Sh DESCRIPTION | ||
66 | .Fn SSL_CTX_add_session | ||
67 | adds the session | ||
68 | .Fa c | ||
69 | to the context | ||
70 | .Fa ctx . | ||
71 | The reference count for session | ||
72 | .Fa c | ||
73 | is incremented by 1. | ||
74 | If a session with the same session id already exists, | ||
75 | the old session is removed by calling | ||
76 | .Xr SSL_SESSION_free 3 . | ||
77 | .Pp | ||
78 | .Fn SSL_CTX_remove_session | ||
79 | removes the session | ||
80 | .Fa c | ||
81 | from the context | ||
82 | .Fa ctx | ||
83 | and marks it as non-resumable. | ||
84 | .Xr SSL_SESSION_free 3 | ||
85 | is called once for | ||
86 | .Fa c . | ||
87 | .Pp | ||
88 | When adding a new session to the internal session cache, it is examined | ||
89 | whether a session with the same session id already exists. | ||
90 | In this case it is assumed that both sessions are identical. | ||
91 | If the same session is stored in a different | ||
92 | .Vt SSL_SESSION | ||
93 | object, the old session is removed and replaced by the new session. | ||
94 | If the session is actually identical (the | ||
95 | .Vt SSL_SESSION | ||
96 | object is identical), | ||
97 | .Fn SSL_CTX_add_session | ||
98 | is a no-op, and the return value is 0. | ||
99 | .Pp | ||
100 | If a server | ||
101 | .Vt SSL_CTX | ||
102 | is configured with the | ||
103 | .Dv SSL_SESS_CACHE_NO_INTERNAL_STORE | ||
104 | flag then the internal cache will not be populated automatically by new | ||
105 | sessions negotiated by the SSL/TLS implementation, even though the internal | ||
106 | cache will be searched automatically for session-resume requests (the | ||
107 | latter can be suppressed by | ||
108 | .Dv SSL_SESS_CACHE_NO_INTERNAL_LOOKUP ) . | ||
109 | So the application can use | ||
110 | .Fn SSL_CTX_add_session | ||
111 | directly to have full control over the sessions that can be resumed if desired. | ||
112 | .Sh RETURN VALUES | ||
113 | The following values are returned by all functions: | ||
114 | .Bl -tag -width Ds | ||
115 | .It 0 | ||
116 | The operation failed. | ||
117 | In case of the add operation, it was tried to add the same (identical) session | ||
118 | twice. | ||
119 | In case of the remove operation, the session was not found in the cache. | ||
120 | .It 1 | ||
121 | The operation succeeded. | ||
122 | .El | ||
123 | .Sh SEE ALSO | ||
124 | .Xr ssl 3 , | ||
125 | .Xr SSL_CTX_set_session_cache_mode 3 , | ||
126 | .Xr SSL_SESSION_free 3 | ||
127 | .Sh HISTORY | ||
128 | .Fn SSL_CTX_add_session | ||
129 | and | ||
130 | .Fn SSL_CTX_remove_session | ||
131 | first appeared in SSLeay 0.8.0 and have been available since | ||
132 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_ctrl.3 b/src/lib/libssl/man/SSL_CTX_ctrl.3 deleted file mode 100644 index c91ddff374..0000000000 --- a/src/lib/libssl/man/SSL_CTX_ctrl.3 +++ /dev/null | |||
@@ -1,122 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_ctrl.3,v 1.7 2018/03/27 17:35:50 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 27 2018 $ | ||
52 | .Dt SSL_CTX_CTRL 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_CTX_ctrl , | ||
56 | .Nm SSL_CTX_callback_ctrl , | ||
57 | .Nm SSL_ctrl , | ||
58 | .Nm SSL_callback_ctrl | ||
59 | .Nd internal handling functions for SSL_CTX and SSL objects | ||
60 | .Sh SYNOPSIS | ||
61 | .In openssl/ssl.h | ||
62 | .Ft long | ||
63 | .Fn SSL_CTX_ctrl "SSL_CTX *ctx" "int cmd" "long larg" "void *parg" | ||
64 | .Ft long | ||
65 | .Fn SSL_CTX_callback_ctrl "SSL_CTX *" "int cmd" "void (*fp)()" | ||
66 | .Ft long | ||
67 | .Fn SSL_ctrl "SSL *ssl" "int cmd" "long larg" "void *parg" | ||
68 | .Ft long | ||
69 | .Fn SSL_callback_ctrl "SSL *" "int cmd" "void (*fp)()" | ||
70 | .Sh DESCRIPTION | ||
71 | The | ||
72 | .Fn SSL_*_ctrl | ||
73 | family of functions is used to manipulate settings of | ||
74 | the | ||
75 | .Vt SSL_CTX | ||
76 | and | ||
77 | .Vt SSL | ||
78 | objects. | ||
79 | Depending on the command | ||
80 | .Fa cmd | ||
81 | the arguments | ||
82 | .Fa larg , | ||
83 | .Fa parg , | ||
84 | or | ||
85 | .Fa fp | ||
86 | are evaluated. | ||
87 | These functions should never be called directly. | ||
88 | All functionalities needed are made available via other functions or macros. | ||
89 | .Sh RETURN VALUES | ||
90 | The return values of the | ||
91 | .Fn SSL*_ctrl | ||
92 | functions depend on the command supplied via the | ||
93 | .Fn cmd | ||
94 | parameter. | ||
95 | .Sh SEE ALSO | ||
96 | .Xr ssl 3 , | ||
97 | .Xr SSL_CTX_add_extra_chain_cert 3 , | ||
98 | .Xr SSL_CTX_sess_number 3 , | ||
99 | .Xr SSL_CTX_sess_set_cache_size 3 , | ||
100 | .Xr SSL_CTX_set_max_cert_list 3 , | ||
101 | .Xr SSL_CTX_set_mode 3 , | ||
102 | .Xr SSL_CTX_set_options 3 , | ||
103 | .Xr SSL_CTX_set_session_cache_mode 3 , | ||
104 | .Xr SSL_CTX_set_tlsext_servername_callback 3 , | ||
105 | .Xr SSL_CTX_set_tlsext_status_cb 3 , | ||
106 | .Xr SSL_CTX_set_tlsext_ticket_key_cb 3 , | ||
107 | .Xr SSL_get_server_tmp_key 3 , | ||
108 | .Xr SSL_num_renegotiations 3 , | ||
109 | .Xr SSL_session_reused 3 , | ||
110 | .Xr SSL_set_max_send_fragment 3 | ||
111 | .Sh HISTORY | ||
112 | .Fn SSL_CTX_ctrl | ||
113 | and | ||
114 | .Fn SSL_ctrl | ||
115 | first appeared in SSLeay 0.8.0 and have been available since | ||
116 | .Ox 2.4 . | ||
117 | .Pp | ||
118 | .Fn SSL_CTX_callback_ctrl | ||
119 | and | ||
120 | .Fn SSL_callback_ctrl | ||
121 | first appeared in OpenSSL 0.9.5 and have been available since | ||
122 | .Ox 2.7 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_flush_sessions.3 b/src/lib/libssl/man/SSL_CTX_flush_sessions.3 deleted file mode 100644 index 2ef781cb4a..0000000000 --- a/src/lib/libssl/man/SSL_CTX_flush_sessions.3 +++ /dev/null | |||
@@ -1,100 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_flush_sessions.3,v 1.5 2018/03/27 17:35:50 schwarze Exp $ | ||
2 | .\" OpenSSL SSL_CTX_flush_sessions.pod 1722496f Jun 8 15:18:38 2017 -0400 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 27 2018 $ | ||
52 | .Dt SSL_CTX_FLUSH_SESSIONS 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_CTX_flush_sessions | ||
56 | .Nd remove expired sessions | ||
57 | .Sh SYNOPSIS | ||
58 | .In openssl/ssl.h | ||
59 | .Ft void | ||
60 | .Fn SSL_CTX_flush_sessions "SSL_CTX *ctx" "long tm" | ||
61 | .Sh DESCRIPTION | ||
62 | .Fn SSL_CTX_flush_sessions | ||
63 | causes a run through the session cache of | ||
64 | .Fa ctx | ||
65 | to remove sessions expired at time | ||
66 | .Fa tm . | ||
67 | .Pp | ||
68 | If enabled, the internal session cache will collect all sessions established | ||
69 | up to the specified maximum number (see | ||
70 | .Xr SSL_CTX_sess_set_cache_size 3 ) . | ||
71 | As sessions will not be reused once they are expired, they should be | ||
72 | removed from the cache to save resources. | ||
73 | This can either be done automatically whenever 255 new sessions were | ||
74 | established (see | ||
75 | .Xr SSL_CTX_set_session_cache_mode 3 ) | ||
76 | or manually by calling | ||
77 | .Fn SSL_CTX_flush_sessions . | ||
78 | .Pp | ||
79 | The parameter | ||
80 | .Fa tm | ||
81 | specifies the time which should be used for the | ||
82 | expiration test, in most cases the actual time given by | ||
83 | .Fn time 0 | ||
84 | will be used. | ||
85 | .Pp | ||
86 | .Fn SSL_CTX_flush_sessions | ||
87 | will only check sessions stored in the internal cache. | ||
88 | When a session is found and removed, the | ||
89 | .Va remove_session_cb | ||
90 | is however called to synchronize with the external cache (see | ||
91 | .Xr SSL_CTX_sess_set_get_cb 3 ) . | ||
92 | .Sh SEE ALSO | ||
93 | .Xr ssl 3 , | ||
94 | .Xr SSL_CTX_sess_set_get_cb 3 , | ||
95 | .Xr SSL_CTX_set_session_cache_mode 3 , | ||
96 | .Xr SSL_CTX_set_timeout 3 | ||
97 | .Sh HISTORY | ||
98 | .Fn SSL_CTX_flush_sessions | ||
99 | first appeared in SSLeay 0.8.0 and has been available since | ||
100 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_free.3 b/src/lib/libssl/man/SSL_CTX_free.3 deleted file mode 100644 index 47f247631b..0000000000 --- a/src/lib/libssl/man/SSL_CTX_free.3 +++ /dev/null | |||
@@ -1,101 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_free.3,v 1.4 2018/03/27 17:35:50 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2000, 2001, 2003 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 27 2018 $ | ||
52 | .Dt SSL_CTX_FREE 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_CTX_free | ||
56 | .Nd free an allocated SSL_CTX object | ||
57 | .Sh SYNOPSIS | ||
58 | .In openssl/ssl.h | ||
59 | .Ft void | ||
60 | .Fn SSL_CTX_free "SSL_CTX *ctx" | ||
61 | .Sh DESCRIPTION | ||
62 | .Fn SSL_CTX_free | ||
63 | decrements the reference count of | ||
64 | .Fa ctx , | ||
65 | and removes the | ||
66 | .Vt SSL_CTX | ||
67 | object pointed to by | ||
68 | .Fa ctx | ||
69 | and frees up the allocated memory if the reference count has reached 0. | ||
70 | If | ||
71 | .Fa ctx | ||
72 | is a | ||
73 | .Dv NULL | ||
74 | pointer, no action occurs. | ||
75 | .Pp | ||
76 | It also calls the | ||
77 | .Xr free 3 Ns ing | ||
78 | procedures for indirectly affected items, if applicable: | ||
79 | the session cache, the list of ciphers, the list of Client CAs, | ||
80 | the certificates and keys. | ||
81 | .Sh WARNINGS | ||
82 | If a session-remove callback is set | ||
83 | .Pq Xr SSL_CTX_sess_set_remove_cb 3 , | ||
84 | this callback will be called for each session being freed from | ||
85 | .Fa ctx Ns 's | ||
86 | session cache. | ||
87 | This implies that all corresponding sessions from an external session cache are | ||
88 | removed as well. | ||
89 | If this is not desired, the user should explicitly unset the callback by | ||
90 | calling | ||
91 | .Fn SSL_CTX_sess_set_remove_cb ctx NULL | ||
92 | prior to calling | ||
93 | .Fn SSL_CTX_free . | ||
94 | .Sh SEE ALSO | ||
95 | .Xr ssl 3 , | ||
96 | .Xr SSL_CTX_new 3 , | ||
97 | .Xr SSL_CTX_sess_set_get_cb 3 | ||
98 | .Sh HISTORY | ||
99 | .Fn SSL_CTX_free | ||
100 | first appeared in SSLeay 0.5.1 and has been available since | ||
101 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_get0_certificate.3 b/src/lib/libssl/man/SSL_CTX_get0_certificate.3 deleted file mode 100644 index 63c86bd5e0..0000000000 --- a/src/lib/libssl/man/SSL_CTX_get0_certificate.3 +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_get0_certificate.3,v 1.3 2019/06/12 09:36:30 schwarze Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 2018 Ingo Schwarze <schwarze@openbsd.org> | ||
4 | .\" | ||
5 | .\" Permission to use, copy, modify, and distribute this software for any | ||
6 | .\" purpose with or without fee is hereby granted, provided that the above | ||
7 | .\" copyright notice and this permission notice appear in all copies. | ||
8 | .\" | ||
9 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | .\" | ||
17 | .Dd $Mdocdate: June 12 2019 $ | ||
18 | .Dt SSL_CTX_GET0_CERTIFICATE 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm SSL_CTX_get0_certificate | ||
22 | .Nd get the active certificate from an SSL context | ||
23 | .Sh SYNOPSIS | ||
24 | .Ft X509 * | ||
25 | .Fo SSL_CTX_get0_certificate | ||
26 | .Fa "const SSL_CTX *ctx" | ||
27 | .Fc | ||
28 | .Sh DESCRIPTION | ||
29 | The | ||
30 | .Fn SSL_CTX_get0_certificate | ||
31 | function returns an internal pointer | ||
32 | to the ASN.1 certificate currently active in | ||
33 | .Fa ctx | ||
34 | or | ||
35 | .Dv NULL | ||
36 | if none was installed with | ||
37 | .Xr SSL_CTX_use_certificate 3 | ||
38 | or similar functions. | ||
39 | .Pp | ||
40 | The returned pointer must not be freed by the caller. | ||
41 | .Sh SEE ALSO | ||
42 | .Xr ssl 3 , | ||
43 | .Xr SSL_CTX_new 3 , | ||
44 | .Xr SSL_CTX_use_certificate 3 , | ||
45 | .Xr X509_get_pubkey 3 , | ||
46 | .Xr X509_get_subject_name 3 , | ||
47 | .Xr X509_new 3 | ||
48 | .Sh HISTORY | ||
49 | .Fn SSL_CTX_get0_certificate | ||
50 | first appeared in OpenSSL 1.0.2 and have been available since | ||
51 | .Ox 6.3 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_get_ex_new_index.3 b/src/lib/libssl/man/SSL_CTX_get_ex_new_index.3 deleted file mode 100644 index 3dbaf2e981..0000000000 --- a/src/lib/libssl/man/SSL_CTX_get_ex_new_index.3 +++ /dev/null | |||
@@ -1,124 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_get_ex_new_index.3,v 1.3 2018/03/21 08:06:34 schwarze Exp $ | ||
2 | .\" OpenSSL 9b86974e Aug 17 15:21:33 2015 -0400 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001, 2005 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 21 2018 $ | ||
52 | .Dt SSL_CTX_GET_EX_NEW_INDEX 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_CTX_get_ex_new_index , | ||
56 | .Nm SSL_CTX_set_ex_data , | ||
57 | .Nm SSL_CTX_get_ex_data | ||
58 | .Nd internal application specific data functions | ||
59 | .Sh SYNOPSIS | ||
60 | .In openssl/ssl.h | ||
61 | .Ft int | ||
62 | .Fo SSL_CTX_get_ex_new_index | ||
63 | .Fa "long argl" | ||
64 | .Fa "void *argp" | ||
65 | .Fa "CRYPTO_EX_new *new_func" | ||
66 | .Fa "CRYPTO_EX_dup *dup_func" | ||
67 | .Fa "CRYPTO_EX_free *free_func" | ||
68 | .Fc | ||
69 | .Ft int | ||
70 | .Fn SSL_CTX_set_ex_data "SSL_CTX *ctx" "int idx" "void *arg" | ||
71 | .Ft void * | ||
72 | .Fn SSL_CTX_get_ex_data "const SSL_CTX *ctx" "int idx" | ||
73 | .Bd -literal | ||
74 | typedef int new_func(void *parent, void *ptr, CRYPTO_EX_DATA *ad, | ||
75 | int idx, long argl, void *argp); | ||
76 | typedef void free_func(void *parent, void *ptr, CRYPTO_EX_DATA *ad, | ||
77 | int idx, long argl, void *argp); | ||
78 | typedef int dup_func(CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from, void *from_d, | ||
79 | int idx, long argl, void *argp); | ||
80 | .Ed | ||
81 | .Sh DESCRIPTION | ||
82 | Several OpenSSL structures can have application specific data attached to them. | ||
83 | These functions are used internally by OpenSSL to manipulate application | ||
84 | specific data attached to a specific structure. | ||
85 | .Pp | ||
86 | .Fn SSL_CTX_get_ex_new_index | ||
87 | is used to register a new index for application specific data. | ||
88 | .Pp | ||
89 | .Fn SSL_CTX_set_ex_data | ||
90 | is used to store application data at | ||
91 | .Fa arg | ||
92 | for | ||
93 | .Fa idx | ||
94 | into the | ||
95 | .Fa ctx | ||
96 | object. | ||
97 | .Pp | ||
98 | .Fn SSL_CTX_get_ex_data | ||
99 | is used to retrieve the information for | ||
100 | .Fa idx | ||
101 | from | ||
102 | .Fa ctx . | ||
103 | .Pp | ||
104 | A detailed description for the | ||
105 | .Fn *_get_ex_new_index | ||
106 | functionality can be found in | ||
107 | .Xr RSA_get_ex_new_index 3 . | ||
108 | The | ||
109 | .Fn *_get_ex_data | ||
110 | and | ||
111 | .Fn *_set_ex_data | ||
112 | functionality is described in | ||
113 | .Xr CRYPTO_set_ex_data 3 . | ||
114 | .Sh SEE ALSO | ||
115 | .Xr CRYPTO_set_ex_data 3 , | ||
116 | .Xr RSA_get_ex_new_index 3 , | ||
117 | .Xr ssl 3 | ||
118 | .Sh HISTORY | ||
119 | .Fn SSL_CTX_get_ex_new_index , | ||
120 | .Fn SSL_CTX_set_ex_data , | ||
121 | and | ||
122 | .Fn SSL_CTX_get_ex_data | ||
123 | first appeared in SSLeay 0.9.0 and have been available since | ||
124 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_get_verify_mode.3 b/src/lib/libssl/man/SSL_CTX_get_verify_mode.3 deleted file mode 100644 index 7c87775069..0000000000 --- a/src/lib/libssl/man/SSL_CTX_get_verify_mode.3 +++ /dev/null | |||
@@ -1,131 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_get_verify_mode.3,v 1.5 2018/03/27 17:35:50 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2000, 2005 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 27 2018 $ | ||
52 | .Dt SSL_CTX_GET_VERIFY_MODE 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_CTX_get_verify_mode , | ||
56 | .Nm SSL_get_verify_mode , | ||
57 | .Nm SSL_CTX_get_verify_depth , | ||
58 | .Nm SSL_get_verify_depth , | ||
59 | .Nm SSL_get_verify_callback , | ||
60 | .Nm SSL_CTX_get_verify_callback | ||
61 | .Nd get currently set verification parameters | ||
62 | .Sh SYNOPSIS | ||
63 | .In openssl/ssl.h | ||
64 | .Ft int | ||
65 | .Fn SSL_CTX_get_verify_mode "const SSL_CTX *ctx" | ||
66 | .Ft int | ||
67 | .Fn SSL_get_verify_mode "const SSL *ssl" | ||
68 | .Ft int | ||
69 | .Fn SSL_CTX_get_verify_depth "const SSL_CTX *ctx" | ||
70 | .Ft int | ||
71 | .Fn SSL_get_verify_depth "const SSL *ssl" | ||
72 | .Ft int | ||
73 | .Fo "(*SSL_CTX_get_verify_callback(const SSL_CTX *ctx))" | ||
74 | .Fa int "X509_STORE_CTX *" | ||
75 | .Fc | ||
76 | .Ft int | ||
77 | .Fo "(*SSL_get_verify_callback(const SSL *ssl))" | ||
78 | .Fa int "X509_STORE_CTX *" | ||
79 | .Fc | ||
80 | .Sh DESCRIPTION | ||
81 | .Fn SSL_CTX_get_verify_mode | ||
82 | returns the verification mode currently set in | ||
83 | .Fa ctx . | ||
84 | .Pp | ||
85 | .Fn SSL_get_verify_mode | ||
86 | returns the verification mode currently set in | ||
87 | .Fa ssl . | ||
88 | .Pp | ||
89 | .Fn SSL_CTX_get_verify_depth | ||
90 | returns the verification depth limit currently set | ||
91 | in | ||
92 | .Fa ctx . | ||
93 | If no limit has been explicitly set, | ||
94 | \(mi1 is returned and the default value will be used. | ||
95 | .Pp | ||
96 | .Fn SSL_get_verify_depth | ||
97 | returns the verification depth limit currently set in | ||
98 | .Fa ssl . | ||
99 | If no limit has been explicitly set, | ||
100 | \(mi1 is returned and the default value will be used. | ||
101 | .Pp | ||
102 | .Fn SSL_CTX_get_verify_callback | ||
103 | returns a function pointer to the verification callback currently set in | ||
104 | .Fa ctx . | ||
105 | If no callback was explicitly set, the | ||
106 | .Dv NULL | ||
107 | pointer is returned and the default callback will be used. | ||
108 | .Pp | ||
109 | .Fn SSL_get_verify_callback | ||
110 | returns a function pointer to the verification callback currently set in | ||
111 | .Fa ssl . | ||
112 | If no callback was explicitly set, the | ||
113 | .Dv NULL | ||
114 | pointer is returned and the default callback will be used. | ||
115 | .Sh SEE ALSO | ||
116 | .Xr ssl 3 , | ||
117 | .Xr SSL_CTX_set_verify 3 | ||
118 | .Sh HISTORY | ||
119 | .Fn SSL_CTX_get_verify_mode , | ||
120 | .Fn SSL_get_verify_mode , | ||
121 | .Fn SSL_get_verify_callback , | ||
122 | and | ||
123 | .Fn SSL_CTX_get_verify_callback | ||
124 | first appeared in SSLeay 0.8.0 and have been available since | ||
125 | .Ox 2.4 . | ||
126 | .Pp | ||
127 | .Fn SSL_CTX_get_verify_depth | ||
128 | and | ||
129 | .Fn SSL_get_verify_depth | ||
130 | first appeared in OpenSSL 0.9.3 and have been available since | ||
131 | .Ox 2.6 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_load_verify_locations.3 b/src/lib/libssl/man/SSL_CTX_load_verify_locations.3 deleted file mode 100644 index 373df2402e..0000000000 --- a/src/lib/libssl/man/SSL_CTX_load_verify_locations.3 +++ /dev/null | |||
@@ -1,238 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_load_verify_locations.3,v 1.4 2018/03/27 17:35:50 schwarze Exp $ | ||
2 | .\" OpenSSL 9b86974e Aug 17 15:21:33 2015 -0400 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2000, 2001, 2015, 2016 The OpenSSL Project. | ||
6 | .\" All rights reserved. | ||
7 | .\" | ||
8 | .\" Redistribution and use in source and binary forms, with or without | ||
9 | .\" modification, are permitted provided that the following conditions | ||
10 | .\" are met: | ||
11 | .\" | ||
12 | .\" 1. Redistributions of source code must retain the above copyright | ||
13 | .\" notice, this list of conditions and the following disclaimer. | ||
14 | .\" | ||
15 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
16 | .\" notice, this list of conditions and the following disclaimer in | ||
17 | .\" the documentation and/or other materials provided with the | ||
18 | .\" distribution. | ||
19 | .\" | ||
20 | .\" 3. All advertising materials mentioning features or use of this | ||
21 | .\" software must display the following acknowledgment: | ||
22 | .\" "This product includes software developed by the OpenSSL Project | ||
23 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
24 | .\" | ||
25 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | .\" endorse or promote products derived from this software without | ||
27 | .\" prior written permission. For written permission, please contact | ||
28 | .\" openssl-core@openssl.org. | ||
29 | .\" | ||
30 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
31 | .\" nor may "OpenSSL" appear in their names without prior written | ||
32 | .\" permission of the OpenSSL Project. | ||
33 | .\" | ||
34 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
35 | .\" acknowledgment: | ||
36 | .\" "This product includes software developed by the OpenSSL Project | ||
37 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
38 | .\" | ||
39 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | .\" | ||
52 | .Dd $Mdocdate: March 27 2018 $ | ||
53 | .Dt SSL_CTX_LOAD_VERIFY_LOCATIONS 3 | ||
54 | .Os | ||
55 | .Sh NAME | ||
56 | .Nm SSL_CTX_load_verify_locations , | ||
57 | .Nm SSL_CTX_set_default_verify_paths | ||
58 | .Nd set default locations for trusted CA certificates | ||
59 | .Sh SYNOPSIS | ||
60 | .In openssl/ssl.h | ||
61 | .Ft int | ||
62 | .Fo SSL_CTX_load_verify_locations | ||
63 | .Fa "SSL_CTX *ctx" "const char *CAfile" "const char *CApath" | ||
64 | .Fc | ||
65 | .Ft int | ||
66 | .Fo SSL_CTX_set_default_verify_paths | ||
67 | .Fa "SSL_CTX *ctx" | ||
68 | .Fc | ||
69 | .Sh DESCRIPTION | ||
70 | .Fn SSL_CTX_load_verify_locations | ||
71 | specifies the locations for | ||
72 | .Fa ctx , | ||
73 | at which CA certificates for verification purposes are located. | ||
74 | The certificates available via | ||
75 | .Fa CAfile | ||
76 | and | ||
77 | .Fa CApath | ||
78 | are trusted. | ||
79 | .Pp | ||
80 | .Fn SSL_CTX_set_default_verify_paths | ||
81 | specifies that the default locations from which CA certificates are | ||
82 | loaded should be used. | ||
83 | There is one default directory and one default file. | ||
84 | The default CA certificates directory is called | ||
85 | .Pa certs | ||
86 | in the default OpenSSL directory. | ||
87 | The default CA certificates file is called | ||
88 | .Pa cert.pem | ||
89 | in the default OpenSSL directory. | ||
90 | .Pp | ||
91 | If | ||
92 | .Fa CAfile | ||
93 | is not | ||
94 | .Dv NULL , | ||
95 | it points to a file of CA certificates in PEM format. | ||
96 | The file can contain several CA certificates identified by sequences of: | ||
97 | .Bd -literal | ||
98 | -----BEGIN CERTIFICATE----- | ||
99 | ... (CA certificate in base64 encoding) ... | ||
100 | -----END CERTIFICATE----- | ||
101 | .Ed | ||
102 | .Pp | ||
103 | Before, between, and after the certificates arbitrary text is allowed which can | ||
104 | be used, e.g., for descriptions of the certificates. | ||
105 | .Pp | ||
106 | The | ||
107 | .Fa CAfile | ||
108 | is processed on execution of the | ||
109 | .Fn SSL_CTX_load_verify_locations | ||
110 | function. | ||
111 | .Pp | ||
112 | If | ||
113 | .Fa CApath | ||
114 | is not NULL, it points to a directory containing CA certificates in PEM format. | ||
115 | The files each contain one CA certificate. | ||
116 | The files are looked up by the CA subject name hash value, | ||
117 | which must hence be available. | ||
118 | If more than one CA certificate with the same name hash value exist, | ||
119 | the extension must be different (e.g., | ||
120 | .Pa 9d66eef0.0 , | ||
121 | .Pa 9d66eef0.1 , | ||
122 | etc.). | ||
123 | The search is performed in the ordering of the extension number, | ||
124 | regardless of other properties of the certificates. | ||
125 | .Pp | ||
126 | The certificates in | ||
127 | .Fa CApath | ||
128 | are only looked up when required, e.g., when building the certificate chain or | ||
129 | when actually performing the verification of a peer certificate. | ||
130 | .Pp | ||
131 | When looking up CA certificates, the OpenSSL library will first search the | ||
132 | certificates in | ||
133 | .Fa CAfile , | ||
134 | then those in | ||
135 | .Fa CApath . | ||
136 | Certificate matching is done based on the subject name, the key identifier (if | ||
137 | present), and the serial number as taken from the certificate to be verified. | ||
138 | If these data do not match, the next certificate will be tried. | ||
139 | If a first certificate matching the parameters is found, | ||
140 | the verification process will be performed; | ||
141 | no other certificates for the same parameters will be searched in case of | ||
142 | failure. | ||
143 | .Pp | ||
144 | In server mode, when requesting a client certificate, the server must send | ||
145 | the list of CAs of which it will accept client certificates. | ||
146 | This list is not influenced by the contents of | ||
147 | .Fa CAfile | ||
148 | or | ||
149 | .Fa CApath | ||
150 | and must explicitly be set using the | ||
151 | .Xr SSL_CTX_set_client_CA_list 3 | ||
152 | family of functions. | ||
153 | .Pp | ||
154 | When building its own certificate chain, an OpenSSL client/server will try to | ||
155 | fill in missing certificates from | ||
156 | .Fa CAfile Ns / Fa CApath , | ||
157 | if the | ||
158 | certificate chain was not explicitly specified (see | ||
159 | .Xr SSL_CTX_add_extra_chain_cert 3 | ||
160 | and | ||
161 | .Xr SSL_CTX_use_certificate 3 ) . | ||
162 | .Sh RETURN VALUES | ||
163 | For | ||
164 | .Fn SSL_CTX_load_verify_locations , | ||
165 | the following return values can occur: | ||
166 | .Bl -tag -width Ds | ||
167 | .It 0 | ||
168 | The operation failed because | ||
169 | .Fa CAfile | ||
170 | and | ||
171 | .Fa CApath | ||
172 | are | ||
173 | .Dv NULL | ||
174 | or the processing at one of the locations specified failed. | ||
175 | Check the error stack to find out the reason. | ||
176 | .It 1 | ||
177 | The operation succeeded. | ||
178 | .El | ||
179 | .Pp | ||
180 | .Fn SSL_CTX_set_default_verify_paths | ||
181 | returns 1 on success or 0 on failure. | ||
182 | A missing default location is still treated as a success. | ||
183 | .Sh EXAMPLES | ||
184 | Generate a CA certificate file with descriptive text from the CA certificates | ||
185 | .Pa ca1.pem | ||
186 | .Pa ca2.pem | ||
187 | .Pa ca3.pem : | ||
188 | .Bd -literal | ||
189 | #!/bin/sh | ||
190 | rm CAfile.pem | ||
191 | for i in ca1.pem ca2.pem ca3.pem; do | ||
192 | openssl x509 -in $i -text >> CAfile.pem | ||
193 | done | ||
194 | .Ed | ||
195 | .Pp | ||
196 | Prepare the directory /some/where/certs containing several CA certificates | ||
197 | for use as | ||
198 | .Fa CApath : | ||
199 | .Bd -literal | ||
200 | $ cd /some/where/certs | ||
201 | $ rm -f *.[0-9]* *.r[0-9]* | ||
202 | $ for c in *.pem; do | ||
203 | > [ "$c" = "*.pem" ] && continue | ||
204 | > hash=$(openssl x509 -noout -hash -in "$c") | ||
205 | > if egrep -q -- '-BEGIN( X509 | TRUSTED | )CERTIFICATE-' "$c"; then | ||
206 | > suf=0 | ||
207 | > while [ -e $hash.$suf ]; do suf=$(( $suf + 1 )); done | ||
208 | > ln -s "$c" $hash.$suf | ||
209 | > fi | ||
210 | > if egrep -q -- '-BEGIN X509 CRL-' "$c"; then | ||
211 | > suf=0 | ||
212 | > while [ -e $hash.r$suf ]; do suf=$(( $suf + 1 )); done | ||
213 | > ln -s "$c" $hash.r$suf | ||
214 | > fi | ||
215 | > done | ||
216 | .Ed | ||
217 | .Sh SEE ALSO | ||
218 | .Xr ssl 3 , | ||
219 | .Xr SSL_CTX_add_extra_chain_cert 3 , | ||
220 | .Xr SSL_CTX_set_cert_store 3 , | ||
221 | .Xr SSL_CTX_set_client_CA_list 3 , | ||
222 | .Xr SSL_CTX_use_certificate 3 , | ||
223 | .Xr SSL_get_client_CA_list 3 | ||
224 | .Sh HISTORY | ||
225 | .Fn SSL_CTX_load_verify_locations | ||
226 | and | ||
227 | .Fn SSL_CTX_set_default_verify_paths | ||
228 | first appeared in SSLeay 0.8.0 and have been available since | ||
229 | .Ox 2.4 . | ||
230 | .Sh CAVEATS | ||
231 | If several CA certificates matching the name, key identifier, and serial | ||
232 | number condition are available, only the first one will be examined. | ||
233 | This may lead to unexpected results if the same CA certificate is available | ||
234 | with different expiration dates. | ||
235 | If a | ||
236 | .Dq certificate expired | ||
237 | verification error occurs, no other certificate will be searched. | ||
238 | Make sure to not have expired certificates mixed with valid ones. | ||
diff --git a/src/lib/libssl/man/SSL_CTX_new.3 b/src/lib/libssl/man/SSL_CTX_new.3 deleted file mode 100644 index 4b50a03de4..0000000000 --- a/src/lib/libssl/man/SSL_CTX_new.3 +++ /dev/null | |||
@@ -1,345 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_new.3,v 1.17 2022/07/13 22:05:53 schwarze Exp $ | ||
2 | .\" full merge up to: OpenSSL 21cd6e00 Oct 21 14:40:15 2015 +0100 | ||
3 | .\" selective merge up to: OpenSSL 8f75443f May 24 14:04:26 2019 +0200 | ||
4 | .\" | ||
5 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
6 | .\" Copyright (c) 2000, 2005, 2012, 2013, 2015, 2016 The OpenSSL Project. | ||
7 | .\" All rights reserved. | ||
8 | .\" | ||
9 | .\" Redistribution and use in source and binary forms, with or without | ||
10 | .\" modification, are permitted provided that the following conditions | ||
11 | .\" are met: | ||
12 | .\" | ||
13 | .\" 1. Redistributions of source code must retain the above copyright | ||
14 | .\" notice, this list of conditions and the following disclaimer. | ||
15 | .\" | ||
16 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
17 | .\" notice, this list of conditions and the following disclaimer in | ||
18 | .\" the documentation and/or other materials provided with the | ||
19 | .\" distribution. | ||
20 | .\" | ||
21 | .\" 3. All advertising materials mentioning features or use of this | ||
22 | .\" software must display the following acknowledgment: | ||
23 | .\" "This product includes software developed by the OpenSSL Project | ||
24 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
25 | .\" | ||
26 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
27 | .\" endorse or promote products derived from this software without | ||
28 | .\" prior written permission. For written permission, please contact | ||
29 | .\" openssl-core@openssl.org. | ||
30 | .\" | ||
31 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
32 | .\" nor may "OpenSSL" appear in their names without prior written | ||
33 | .\" permission of the OpenSSL Project. | ||
34 | .\" | ||
35 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
36 | .\" acknowledgment: | ||
37 | .\" "This product includes software developed by the OpenSSL Project | ||
38 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
39 | .\" | ||
40 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
41 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
42 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
43 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
44 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
45 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
46 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
47 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
48 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
49 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
50 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
51 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
52 | .\" | ||
53 | .Dd $Mdocdate: July 13 2022 $ | ||
54 | .Dt SSL_CTX_NEW 3 | ||
55 | .Os | ||
56 | .Sh NAME | ||
57 | .Nm SSL_CTX_new , | ||
58 | .Nm SSL_CTX_up_ref , | ||
59 | .Nm TLS_method , | ||
60 | .Nm TLS_server_method , | ||
61 | .Nm TLS_client_method , | ||
62 | .Nm SSLv23_method , | ||
63 | .Nm SSLv23_server_method , | ||
64 | .Nm SSLv23_client_method , | ||
65 | .Nm TLSv1_method , | ||
66 | .Nm TLSv1_server_method , | ||
67 | .Nm TLSv1_client_method , | ||
68 | .Nm TLSv1_1_method , | ||
69 | .Nm TLSv1_1_server_method , | ||
70 | .Nm TLSv1_1_client_method , | ||
71 | .Nm TLSv1_2_method , | ||
72 | .Nm TLSv1_2_server_method , | ||
73 | .Nm TLSv1_2_client_method , | ||
74 | .Nm DTLS_method , | ||
75 | .Nm DTLS_server_method , | ||
76 | .Nm DTLS_client_method , | ||
77 | .Nm DTLSv1_method , | ||
78 | .Nm DTLSv1_server_method , | ||
79 | .Nm DTLSv1_client_method , | ||
80 | .Nm DTLSv1_2_method , | ||
81 | .Nm DTLSv1_2_server_method , | ||
82 | .Nm DTLSv1_2_client_method | ||
83 | .Nd create a new SSL_CTX object as a framework for TLS enabled functions | ||
84 | .Sh SYNOPSIS | ||
85 | .In openssl/ssl.h | ||
86 | .Ft SSL_CTX * | ||
87 | .Fn SSL_CTX_new "const SSL_METHOD *method" | ||
88 | .Ft int | ||
89 | .Fn SSL_CTX_up_ref "SSL_CTX *ctx" | ||
90 | .Ft const SSL_METHOD * | ||
91 | .Fn TLS_method void | ||
92 | .Ft const SSL_METHOD * | ||
93 | .Fn TLS_server_method void | ||
94 | .Ft const SSL_METHOD * | ||
95 | .Fn TLS_client_method void | ||
96 | .Ft const SSL_METHOD * | ||
97 | .Fn SSLv23_method void | ||
98 | .Ft const SSL_METHOD * | ||
99 | .Fn SSLv23_server_method void | ||
100 | .Ft const SSL_METHOD * | ||
101 | .Fn SSLv23_client_method void | ||
102 | .Ft const SSL_METHOD * | ||
103 | .Fn TLSv1_method void | ||
104 | .Ft const SSL_METHOD * | ||
105 | .Fn TLSv1_server_method void | ||
106 | .Ft const SSL_METHOD * | ||
107 | .Fn TLSv1_client_method void | ||
108 | .Ft const SSL_METHOD * | ||
109 | .Fn TLSv1_1_method void | ||
110 | .Ft const SSL_METHOD * | ||
111 | .Fn TLSv1_1_server_method void | ||
112 | .Ft const SSL_METHOD * | ||
113 | .Fn TLSv1_1_client_method void | ||
114 | .Ft const SSL_METHOD * | ||
115 | .Fn TLSv1_2_method void | ||
116 | .Ft const SSL_METHOD * | ||
117 | .Fn TLSv1_2_server_method void | ||
118 | .Ft const SSL_METHOD * | ||
119 | .Fn TLSv1_2_client_method void | ||
120 | .Ft const SSL_METHOD * | ||
121 | .Fn DTLS_method void | ||
122 | .Ft const SSL_METHOD * | ||
123 | .Fn DTLS_server_method void | ||
124 | .Ft const SSL_METHOD * | ||
125 | .Fn DTLS_client_method void | ||
126 | .Ft const SSL_METHOD * | ||
127 | .Fn DTLSv1_method void | ||
128 | .Ft const SSL_METHOD * | ||
129 | .Fn DTLSv1_server_method void | ||
130 | .Ft const SSL_METHOD * | ||
131 | .Fn DTLSv1_client_method void | ||
132 | .Ft const SSL_METHOD * | ||
133 | .Fn DTLSv1_2_method void | ||
134 | .Ft const SSL_METHOD * | ||
135 | .Fn DTLSv1_2_server_method void | ||
136 | .Ft const SSL_METHOD * | ||
137 | .Fn DTLSv1_2_client_method void | ||
138 | .Sh DESCRIPTION | ||
139 | .Fn SSL_CTX_new | ||
140 | creates a new | ||
141 | .Vt SSL_CTX | ||
142 | object as a framework to establish TLS or DTLS enabled connections. | ||
143 | It initializes the list of ciphers, the session cache setting, the | ||
144 | callbacks, the keys and certificates, the options, and the security | ||
145 | level to its default values. | ||
146 | .Pp | ||
147 | An | ||
148 | .Vt SSL_CTX | ||
149 | object is reference counted. | ||
150 | Creating a new | ||
151 | .Vt SSL_CTX | ||
152 | object sets its reference count to 1. | ||
153 | Calling | ||
154 | .Fn SSL_CTX_up_ref | ||
155 | on it increments the reference count by 1. | ||
156 | Calling | ||
157 | .Xr SSL_CTX_free 3 | ||
158 | on it decrements the reference count by 1. | ||
159 | When the reference count drops to zero, | ||
160 | any memory or resources allocated to the | ||
161 | .Vt SSL_CTX | ||
162 | object are freed. | ||
163 | .Pp | ||
164 | The | ||
165 | .Vt SSL_CTX | ||
166 | object uses | ||
167 | .Fa method | ||
168 | as its connection method, which can be: | ||
169 | .Bl -tag -width Ds | ||
170 | .It Fn TLS_method | ||
171 | The general-purpose version-flexible TLS method. | ||
172 | The protocol version used will be negotiated to the highest | ||
173 | version mutually supported by the client and the server. | ||
174 | The supported protocols are TLSv1, TLSv1.1, TLSv1.2, and TLSv1.3. | ||
175 | .It Fn DTLS_method | ||
176 | The version-flexible DTLS method. | ||
177 | The currently supported protocols are DTLSv1 and DTLSv1.2. | ||
178 | .El | ||
179 | .Pp | ||
180 | The following | ||
181 | .Fa method | ||
182 | arguments are deprecated: | ||
183 | .Bl -tag -width Ds | ||
184 | .It Xo | ||
185 | .Fn TLS_server_method , | ||
186 | .Fn TLS_client_method , | ||
187 | .Fn SSLv23_method , | ||
188 | .Fn SSLv23_server_method , | ||
189 | .Fn SSLv23_client_method | ||
190 | .Xc | ||
191 | Deprecated aliases for | ||
192 | .Fn TLS_method . | ||
193 | .It Xo | ||
194 | .Fn DTLS_server_method , | ||
195 | .Fn DTLS_client_method | ||
196 | .Xc | ||
197 | Deprecated aliases for | ||
198 | .Fn DTLS_method . | ||
199 | .It Xo | ||
200 | .Fn TLSv1_method , | ||
201 | .Fn TLSv1_server_method , | ||
202 | .Fn TLSv1_client_method | ||
203 | .Xc | ||
204 | A connection established with these methods will only | ||
205 | understand the TLSv1 protocol. | ||
206 | .It Xo | ||
207 | .Fn TLSv1_1_method , | ||
208 | .Fn TLSv1_1_server_method , | ||
209 | .Fn TLSv1_1_client_method | ||
210 | .Xc | ||
211 | A connection established with these methods will only | ||
212 | understand the TLSv1.1 protocol. | ||
213 | .It Xo | ||
214 | .Fn TLSv1_2_method , | ||
215 | .Fn TLSv1_2_server_method , | ||
216 | .Fn TLSv1_2_client_method | ||
217 | .Xc | ||
218 | A connection established with these methods will only | ||
219 | understand the TLSv1.2 protocol. | ||
220 | .It Xo | ||
221 | .Fn DTLSv1_method , | ||
222 | .Fn DTLSv1_server_method , | ||
223 | .Fn DTLSv1_client_method | ||
224 | .Xc | ||
225 | These are the version-specific methods for DTLSv1. | ||
226 | .It Xo | ||
227 | .Fn DTLSv1_2_method , | ||
228 | .Fn DTLSv1_2_server_method , | ||
229 | .Fn DTLSv1_2_client_method | ||
230 | These are the version-specific methods for DTLSv1.2. | ||
231 | .Xc | ||
232 | .El | ||
233 | .Pp | ||
234 | In LibreSSL, the methods containing the substrings | ||
235 | .Dq _server | ||
236 | or | ||
237 | .Dq _client | ||
238 | in their names return the same objects | ||
239 | as the methods without these substrings. | ||
240 | .Pp | ||
241 | The list of protocols available can also be limited using the | ||
242 | .Dv SSL_OP_NO_TLSv1 , | ||
243 | .Dv SSL_OP_NO_TLSv1_1 , | ||
244 | and | ||
245 | .Dv SSL_OP_NO_TLSv1_2 | ||
246 | options of the | ||
247 | .Xr SSL_CTX_set_options 3 | ||
248 | or | ||
249 | .Xr SSL_set_options 3 | ||
250 | functions, but this approach is not recommended. | ||
251 | Clients should avoid creating "holes" in the set of protocols they support. | ||
252 | When disabling a protocol, make sure that you also disable either | ||
253 | all previous or all subsequent protocol versions. | ||
254 | In clients, when a protocol version is disabled without disabling | ||
255 | all previous protocol versions, the effect is to also disable all | ||
256 | subsequent protocol versions. | ||
257 | .Pp | ||
258 | DTLSv1 and DTLSv1.2 can be disabled with | ||
259 | .Xr SSL_CTX_set_options 3 | ||
260 | or | ||
261 | .Xr SSL_set_options 3 | ||
262 | using the | ||
263 | .Dv SSL_OP_NO_DTLSv1 | ||
264 | and | ||
265 | .Dv SSL_OP_NO_DTLSv1_2 | ||
266 | options, respectively. | ||
267 | .Sh RETURN VALUES | ||
268 | .Fn SSL_CTX_new | ||
269 | returns a pointer to the newly allocated object or | ||
270 | .Dv NULL | ||
271 | on failure. | ||
272 | Check the error stack to find out the reason for failure. | ||
273 | .Pp | ||
274 | .Fn SSL_CTX_up_ref | ||
275 | returns 1 for success or 0 for failure. | ||
276 | .Pp | ||
277 | .Fn TLS_method | ||
278 | and the other | ||
279 | .Fn *_method | ||
280 | functions return pointers to constant static objects. | ||
281 | .Sh SEE ALSO | ||
282 | .Xr ssl 3 , | ||
283 | .Xr SSL_accept 3 , | ||
284 | .Xr SSL_CTX_free 3 , | ||
285 | .Xr SSL_CTX_set_min_proto_version 3 , | ||
286 | .Xr SSL_CTX_set_options 3 , | ||
287 | .Xr SSL_CTX_set_security_level 3 , | ||
288 | .Xr SSL_set_connect_state 3 | ||
289 | .Sh HISTORY | ||
290 | .Fn SSL_CTX_new | ||
291 | first appeared in SSLeay 0.5.1. | ||
292 | .Fn SSLv23_method , | ||
293 | .Fn SSLv23_server_method , | ||
294 | and | ||
295 | .Fn SSLv23_client_method | ||
296 | first appeared in SSLeay 0.8.0. | ||
297 | .Fn TLSv1_method , | ||
298 | .Fn TLSv1_server_method , | ||
299 | and | ||
300 | .Fn TLSv1_client_method | ||
301 | first appeared in SSLeay 0.9.0. | ||
302 | All these functions have been available since | ||
303 | .Ox 2.4 . | ||
304 | .Pp | ||
305 | .Fn DTLSv1_method , | ||
306 | .Fn DTLSv1_server_method , | ||
307 | and | ||
308 | .Fn DTLSv1_client_method | ||
309 | first appeared in OpenSSL 0.9.8 and have been available since | ||
310 | .Ox 4.5 . | ||
311 | .Pp | ||
312 | .Fn TLSv1_1_method , | ||
313 | .Fn TLSv1_1_server_method , | ||
314 | .Fn TLSv1_1_client_method , | ||
315 | .Fn TLSv1_2_method , | ||
316 | .Fn TLSv1_2_server_method , | ||
317 | and | ||
318 | .Fn TLSv1_2_client_method | ||
319 | first appeared in OpenSSL 1.0.1 and have been available since | ||
320 | .Ox 5.3 . | ||
321 | .Pp | ||
322 | .Fn DTLS_method , | ||
323 | .Fn DTLS_server_method , | ||
324 | and | ||
325 | .Fn DTLS_client_method | ||
326 | first appeared in OpenSSL 1.0.2 and have been available since | ||
327 | .Ox 6.5 . | ||
328 | .Pp | ||
329 | .Fn TLS_method , | ||
330 | .Fn TLS_server_method , | ||
331 | and | ||
332 | .Fn TLS_client_method | ||
333 | first appeared in OpenSSL 1.1.0 and have been available since | ||
334 | .Ox 5.8 . | ||
335 | .Pp | ||
336 | .Fn SSL_CTX_up_ref | ||
337 | first appeared in OpenSSL 1.1.0 and has been available since | ||
338 | .Ox 6.3 . | ||
339 | .Pp | ||
340 | .Fn DTLSv1_2_method , | ||
341 | .Fn DTLSv1_2_server_method , | ||
342 | and | ||
343 | .Fn DTLSv1_2_client_method | ||
344 | first appeared in OpenSSL 1.1.0 and have been available since | ||
345 | .Ox 6.9 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_sess_number.3 b/src/lib/libssl/man/SSL_CTX_sess_number.3 deleted file mode 100644 index 76d436cd17..0000000000 --- a/src/lib/libssl/man/SSL_CTX_sess_number.3 +++ /dev/null | |||
@@ -1,168 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_sess_number.3,v 1.9 2019/06/12 09:36:30 schwarze Exp $ | ||
2 | .\" OpenSSL SSL_CTX_sess_number.pod 7bd27895 Mar 29 11:45:29 2017 +1000 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: June 12 2019 $ | ||
52 | .Dt SSL_CTX_SESS_NUMBER 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_CTX_sess_number , | ||
56 | .Nm SSL_CTX_sess_connect , | ||
57 | .Nm SSL_CTX_sess_connect_good , | ||
58 | .Nm SSL_CTX_sess_connect_renegotiate , | ||
59 | .Nm SSL_CTX_sess_accept , | ||
60 | .Nm SSL_CTX_sess_accept_good , | ||
61 | .Nm SSL_CTX_sess_accept_renegotiate , | ||
62 | .Nm SSL_CTX_sess_hits , | ||
63 | .Nm SSL_CTX_sess_cb_hits , | ||
64 | .Nm SSL_CTX_sess_misses , | ||
65 | .Nm SSL_CTX_sess_timeouts , | ||
66 | .Nm SSL_CTX_sess_cache_full | ||
67 | .Nd obtain session cache statistics | ||
68 | .Sh SYNOPSIS | ||
69 | .In openssl/ssl.h | ||
70 | .Ft long | ||
71 | .Fn SSL_CTX_sess_number "SSL_CTX *ctx" | ||
72 | .Ft long | ||
73 | .Fn SSL_CTX_sess_connect "SSL_CTX *ctx" | ||
74 | .Ft long | ||
75 | .Fn SSL_CTX_sess_connect_good "SSL_CTX *ctx" | ||
76 | .Ft long | ||
77 | .Fn SSL_CTX_sess_connect_renegotiate "SSL_CTX *ctx" | ||
78 | .Ft long | ||
79 | .Fn SSL_CTX_sess_accept "SSL_CTX *ctx" | ||
80 | .Ft long | ||
81 | .Fn SSL_CTX_sess_accept_good "SSL_CTX *ctx" | ||
82 | .Ft long | ||
83 | .Fn SSL_CTX_sess_accept_renegotiate "SSL_CTX *ctx" | ||
84 | .Ft long | ||
85 | .Fn SSL_CTX_sess_hits "SSL_CTX *ctx" | ||
86 | .Ft long | ||
87 | .Fn SSL_CTX_sess_cb_hits "SSL_CTX *ctx" | ||
88 | .Ft long | ||
89 | .Fn SSL_CTX_sess_misses "SSL_CTX *ctx" | ||
90 | .Ft long | ||
91 | .Fn SSL_CTX_sess_timeouts "SSL_CTX *ctx" | ||
92 | .Ft long | ||
93 | .Fn SSL_CTX_sess_cache_full "SSL_CTX *ctx" | ||
94 | .Sh DESCRIPTION | ||
95 | .Fn SSL_CTX_sess_number | ||
96 | returns the current number of sessions in the internal session cache. | ||
97 | .Pp | ||
98 | .Fn SSL_CTX_sess_connect | ||
99 | returns the number of started SSL/TLS handshakes in client mode. | ||
100 | .Pp | ||
101 | .Fn SSL_CTX_sess_connect_good | ||
102 | returns the number of successfully established SSL/TLS sessions in client mode. | ||
103 | .Pp | ||
104 | .Fn SSL_CTX_sess_connect_renegotiate | ||
105 | returns the number of started renegotiations in client mode. | ||
106 | .Pp | ||
107 | .Fn SSL_CTX_sess_accept | ||
108 | returns the number of started SSL/TLS handshakes in server mode. | ||
109 | .Pp | ||
110 | .Fn SSL_CTX_sess_accept_good | ||
111 | returns the number of successfully established SSL/TLS sessions in server mode. | ||
112 | .Pp | ||
113 | .Fn SSL_CTX_sess_accept_renegotiate | ||
114 | returns the number of started renegotiations in server mode. | ||
115 | .Pp | ||
116 | .Fn SSL_CTX_sess_hits | ||
117 | returns the number of successfully reused sessions. | ||
118 | In client mode a session set with | ||
119 | .Xr SSL_set_session 3 | ||
120 | successfully reused is counted as a hit. | ||
121 | In server mode a session successfully retrieved from internal or external cache | ||
122 | is counted as a hit. | ||
123 | .Pp | ||
124 | .Fn SSL_CTX_sess_cb_hits | ||
125 | returns the number of successfully retrieved sessions from the external session | ||
126 | cache in server mode. | ||
127 | .Pp | ||
128 | .Fn SSL_CTX_sess_misses | ||
129 | returns the number of sessions proposed by clients that were not found in the | ||
130 | internal session cache in server mode. | ||
131 | .Pp | ||
132 | .Fn SSL_CTX_sess_timeouts | ||
133 | returns the number of sessions proposed by clients and either found in the | ||
134 | internal or external session cache in server mode, | ||
135 | but that were invalid due to timeout. | ||
136 | These sessions are not included in the | ||
137 | .Fn SSL_CTX_sess_hits | ||
138 | count. | ||
139 | .Pp | ||
140 | .Fn SSL_CTX_sess_cache_full | ||
141 | returns the number of sessions that were removed because the maximum session | ||
142 | cache size was exceeded. | ||
143 | .Sh SEE ALSO | ||
144 | .Xr ssl 3 , | ||
145 | .Xr SSL_CTX_ctrl 3 , | ||
146 | .Xr SSL_CTX_sess_set_cache_size 3 , | ||
147 | .Xr SSL_CTX_set_session_cache_mode 3 , | ||
148 | .Xr SSL_set_session 3 | ||
149 | .Sh HISTORY | ||
150 | .Fn SSL_CTX_sess_number , | ||
151 | .Fn SSL_CTX_sess_connect , | ||
152 | .Fn SSL_CTX_sess_connect_good , | ||
153 | .Fn SSL_CTX_sess_accept , | ||
154 | .Fn SSL_CTX_sess_accept_good , | ||
155 | .Fn SSL_CTX_sess_hits , | ||
156 | .Fn SSL_CTX_sess_misses , | ||
157 | and | ||
158 | .Fn SSL_CTX_sess_timeouts | ||
159 | first appeared in SSLeay 0.5.2. | ||
160 | .Fn SSL_CTX_sess_cb_hits | ||
161 | first appeared in SSLeay 0.6.0. | ||
162 | .Fn SSL_CTX_sess_connect_renegotiate , | ||
163 | .Fn SSL_CTX_sess_accept_renegotiate , | ||
164 | and | ||
165 | .Fn SSL_CTX_sess_cache_full | ||
166 | first appeared in SSLeay 0.9.0. | ||
167 | All these functions have been available since | ||
168 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 b/src/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 deleted file mode 100644 index 6d5fede0b6..0000000000 --- a/src/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 +++ /dev/null | |||
@@ -1,109 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_sess_set_cache_size.3,v 1.5 2019/06/12 09:36:30 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001, 2002, 2014 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: June 12 2019 $ | ||
52 | .Dt SSL_CTX_SESS_SET_CACHE_SIZE 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_CTX_sess_set_cache_size , | ||
56 | .Nm SSL_CTX_sess_get_cache_size | ||
57 | .Nd manipulate session cache size | ||
58 | .Sh SYNOPSIS | ||
59 | .In openssl/ssl.h | ||
60 | .Ft long | ||
61 | .Fn SSL_CTX_sess_set_cache_size "SSL_CTX *ctx" "long t" | ||
62 | .Ft long | ||
63 | .Fn SSL_CTX_sess_get_cache_size "SSL_CTX *ctx" | ||
64 | .Sh DESCRIPTION | ||
65 | .Fn SSL_CTX_sess_set_cache_size | ||
66 | sets the size of the internal session cache of context | ||
67 | .Fa ctx | ||
68 | to | ||
69 | .Fa t . | ||
70 | .Pp | ||
71 | .Fn SSL_CTX_sess_get_cache_size | ||
72 | returns the currently valid session cache size. | ||
73 | .Pp | ||
74 | The internal session cache size is | ||
75 | .Dv SSL_SESSION_CACHE_MAX_SIZE_DEFAULT , | ||
76 | currently 1024\(mu20, so that up to 20000 sessions can be held. | ||
77 | This size can be modified using the | ||
78 | .Fn SSL_CTX_sess_set_cache_size | ||
79 | call. | ||
80 | A special case is the size 0, which is used for unlimited size. | ||
81 | .Pp | ||
82 | If adding the session makes the cache exceed its size, then unused | ||
83 | sessions are dropped from the end of the cache. | ||
84 | Cache space may also be reclaimed by calling | ||
85 | .Xr SSL_CTX_flush_sessions 3 | ||
86 | to remove expired sessions. | ||
87 | .Pp | ||
88 | If the size of the session cache is reduced and more sessions are already in | ||
89 | the session cache, | ||
90 | old session will be removed the next time a session shall be added. | ||
91 | This removal is not synchronized with the expiration of sessions. | ||
92 | .Sh RETURN VALUES | ||
93 | .Fn SSL_CTX_sess_set_cache_size | ||
94 | returns the previously valid size. | ||
95 | .Pp | ||
96 | .Fn SSL_CTX_sess_get_cache_size | ||
97 | returns the currently valid size. | ||
98 | .Sh SEE ALSO | ||
99 | .Xr ssl 3 , | ||
100 | .Xr SSL_CTX_ctrl 3 , | ||
101 | .Xr SSL_CTX_flush_sessions 3 , | ||
102 | .Xr SSL_CTX_sess_number 3 , | ||
103 | .Xr SSL_CTX_set_session_cache_mode 3 | ||
104 | .Sh HISTORY | ||
105 | .Fn SSL_CTX_sess_set_cache_size | ||
106 | and | ||
107 | .Fn SSL_CTX_sess_get_cache_size | ||
108 | first appeared in SSLeay 0.9.0 and have been available since | ||
109 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 b/src/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 deleted file mode 100644 index e99f2be671..0000000000 --- a/src/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 +++ /dev/null | |||
@@ -1,221 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_sess_set_get_cb.3,v 1.7 2022/03/29 18:15:52 naddy Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001, 2002, 2003, 2016 The OpenSSL Project. | ||
6 | .\" All rights reserved. | ||
7 | .\" | ||
8 | .\" Redistribution and use in source and binary forms, with or without | ||
9 | .\" modification, are permitted provided that the following conditions | ||
10 | .\" are met: | ||
11 | .\" | ||
12 | .\" 1. Redistributions of source code must retain the above copyright | ||
13 | .\" notice, this list of conditions and the following disclaimer. | ||
14 | .\" | ||
15 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
16 | .\" notice, this list of conditions and the following disclaimer in | ||
17 | .\" the documentation and/or other materials provided with the | ||
18 | .\" distribution. | ||
19 | .\" | ||
20 | .\" 3. All advertising materials mentioning features or use of this | ||
21 | .\" software must display the following acknowledgment: | ||
22 | .\" "This product includes software developed by the OpenSSL Project | ||
23 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
24 | .\" | ||
25 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | .\" endorse or promote products derived from this software without | ||
27 | .\" prior written permission. For written permission, please contact | ||
28 | .\" openssl-core@openssl.org. | ||
29 | .\" | ||
30 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
31 | .\" nor may "OpenSSL" appear in their names without prior written | ||
32 | .\" permission of the OpenSSL Project. | ||
33 | .\" | ||
34 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
35 | .\" acknowledgment: | ||
36 | .\" "This product includes software developed by the OpenSSL Project | ||
37 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
38 | .\" | ||
39 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | .\" | ||
52 | .Dd $Mdocdate: March 29 2022 $ | ||
53 | .Dt SSL_CTX_SESS_SET_GET_CB 3 | ||
54 | .Os | ||
55 | .Sh NAME | ||
56 | .Nm SSL_CTX_sess_set_new_cb , | ||
57 | .Nm SSL_CTX_sess_set_remove_cb , | ||
58 | .Nm SSL_CTX_sess_set_get_cb , | ||
59 | .Nm SSL_CTX_sess_get_new_cb , | ||
60 | .Nm SSL_CTX_sess_get_remove_cb , | ||
61 | .Nm SSL_CTX_sess_get_get_cb | ||
62 | .Nd provide callback functions for server side external session caching | ||
63 | .Sh SYNOPSIS | ||
64 | .In openssl/ssl.h | ||
65 | .Ft void | ||
66 | .Fo SSL_CTX_sess_set_new_cb | ||
67 | .Fa "SSL_CTX *ctx" | ||
68 | .Fa "int (*new_session_cb)(SSL *, SSL_SESSION *)" | ||
69 | .Fc | ||
70 | .Ft void | ||
71 | .Fo SSL_CTX_sess_set_remove_cb | ||
72 | .Fa "SSL_CTX *ctx" | ||
73 | .Fa "void (*remove_session_cb)(SSL_CTX *ctx, SSL_SESSION *)" | ||
74 | .Fc | ||
75 | .Ft void | ||
76 | .Fo SSL_CTX_sess_set_get_cb | ||
77 | .Fa "SSL_CTX *ctx" | ||
78 | .Fa "SSL_SESSION (*get_session_cb)(SSL *, const unsigned char *, int, int *)" | ||
79 | .Fc | ||
80 | .Ft int | ||
81 | .Fo "(*SSL_CTX_sess_get_new_cb(SSL_CTX *ctx))" | ||
82 | .Fa "SSL *ssl" | ||
83 | .Fa "SSL_SESSION *sess" | ||
84 | .Fc | ||
85 | .Ft void | ||
86 | .Fo "(*SSL_CTX_sess_get_remove_cb(SSL_CTX *ctx))" | ||
87 | .Fa "SSL_CTX *ctx" | ||
88 | .Fa "SSL_SESSION *sess" | ||
89 | .Fc | ||
90 | .Ft SSL_SESSION * | ||
91 | .Fo "(*SSL_CTX_sess_get_get_cb(SSL_CTX *ctx))" | ||
92 | .Fa "SSL *ssl" | ||
93 | .Fa "const unsigned char *data" | ||
94 | .Fa "int len" | ||
95 | .Fa "int *copy" | ||
96 | .Fc | ||
97 | .Ft int | ||
98 | .Fo "(*new_session_cb)" | ||
99 | .Fa "SSL *ssl" | ||
100 | .Fa "SSL_SESSION *sess" | ||
101 | .Fc | ||
102 | .Ft void | ||
103 | .Fo "(*remove_session_cb)" | ||
104 | .Fa "SSL_CTX *ctx" | ||
105 | .Fa "SSL_SESSION *sess" | ||
106 | .Fc | ||
107 | .Ft SSL_SESSION * | ||
108 | .Fo "(*get_session_cb)" | ||
109 | .Fa "SSL *ssl" | ||
110 | .Fa "unsigned char *data" | ||
111 | .Fa "int len" | ||
112 | .Fa "int *copy" | ||
113 | .Fc | ||
114 | .Sh DESCRIPTION | ||
115 | .Fn SSL_CTX_sess_set_new_cb | ||
116 | sets the callback function which is automatically called whenever a new session | ||
117 | was negotiated. | ||
118 | .Pp | ||
119 | .Fn SSL_CTX_sess_set_remove_cb | ||
120 | sets the callback function which is automatically called whenever a session is | ||
121 | removed by the SSL engine (because it is considered faulty or the session has | ||
122 | become obsolete because of exceeding the timeout value). | ||
123 | .Pp | ||
124 | .Fn SSL_CTX_sess_set_get_cb | ||
125 | sets the callback function which is called whenever a SSL/TLS client proposes | ||
126 | to resume a session but the session cannot be found in the internal session | ||
127 | cache (see | ||
128 | .Xr SSL_CTX_set_session_cache_mode 3 ) . | ||
129 | (SSL/TLS server only.) | ||
130 | .Pp | ||
131 | .Fn SSL_CTX_sess_get_new_cb , | ||
132 | .Fn SSL_CTX_sess_get_remove_cb , | ||
133 | and | ||
134 | .Fn SSL_CTX_sess_get_get_cb | ||
135 | retrieve the function pointers of the provided callback functions. | ||
136 | If a callback function has not been set, the | ||
137 | .Dv NULL | ||
138 | pointer is returned. | ||
139 | .Pp | ||
140 | In order to allow external session caching, synchronization with the internal | ||
141 | session cache is realized via callback functions. | ||
142 | Inside these callback functions, session can be saved to disk or put into a | ||
143 | database using the | ||
144 | .Xr d2i_SSL_SESSION 3 | ||
145 | interface. | ||
146 | .Pp | ||
147 | The | ||
148 | .Fn new_session_cb | ||
149 | function is called whenever a new session has been negotiated and session | ||
150 | caching is enabled (see | ||
151 | .Xr SSL_CTX_set_session_cache_mode 3 ) . | ||
152 | The | ||
153 | .Fn new_session_cb | ||
154 | function is passed the | ||
155 | .Fa ssl | ||
156 | connection and the ssl session | ||
157 | .Fa sess . | ||
158 | If the callback returns 0, the session will be immediately removed again. | ||
159 | .Pp | ||
160 | The | ||
161 | .Fn remove_session_cb | ||
162 | function is called whenever the SSL engine removes a session from the | ||
163 | internal cache. | ||
164 | This happens when the session is removed because it is expired or when a | ||
165 | connection was not shut down cleanly. | ||
166 | It also happens for all sessions in the internal session cache when | ||
167 | .Xr SSL_CTX_free 3 | ||
168 | is called. | ||
169 | The | ||
170 | .Fn remove_session_cb | ||
171 | function is passed the | ||
172 | .Fa ctx | ||
173 | and the | ||
174 | .Vt ssl | ||
175 | session | ||
176 | .Fa sess . | ||
177 | It does not provide any feedback. | ||
178 | .Pp | ||
179 | The | ||
180 | .Fn get_session_cb | ||
181 | function is only called on SSL/TLS servers with the session id proposed by the | ||
182 | client. | ||
183 | The | ||
184 | .Fn get_session_cb | ||
185 | function is always called, also when session caching was disabled. | ||
186 | The | ||
187 | .Fn get_session_cb | ||
188 | function is passed the | ||
189 | .Fa ssl | ||
190 | connection, the session id of length | ||
191 | .Fa length | ||
192 | at the memory location | ||
193 | .Fa data . | ||
194 | With the parameter | ||
195 | .Fa copy | ||
196 | the callback can require the SSL engine to increment the reference count of the | ||
197 | .Vt SSL_SESSION | ||
198 | object, | ||
199 | Normally the reference count is not incremented and therefore the session must | ||
200 | not be explicitly freed with | ||
201 | .Xr SSL_SESSION_free 3 . | ||
202 | .Sh SEE ALSO | ||
203 | .Xr d2i_SSL_SESSION 3 , | ||
204 | .Xr ssl 3 , | ||
205 | .Xr SSL_CTX_flush_sessions 3 , | ||
206 | .Xr SSL_CTX_free 3 , | ||
207 | .Xr SSL_CTX_set_session_cache_mode 3 , | ||
208 | .Xr SSL_SESSION_free 3 | ||
209 | .Sh HISTORY | ||
210 | .Fn SSL_CTX_sess_set_new_cb , | ||
211 | .Fn SSL_CTX_sess_set_get_cb , | ||
212 | .Fn SSL_CTX_sess_get_new_cb , | ||
213 | and | ||
214 | .Fn SSL_CTX_sess_get_get_cb | ||
215 | first appeared in SSLeay 0.6.0. | ||
216 | .Fn SSL_CTX_sess_set_remove_cb | ||
217 | and | ||
218 | .Fn SSL_CTX_sess_get_remove_cb | ||
219 | first appeared in SSLeay 0.8.0. | ||
220 | These functions have been available since | ||
221 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_sessions.3 b/src/lib/libssl/man/SSL_CTX_sessions.3 deleted file mode 100644 index 964d1a7346..0000000000 --- a/src/lib/libssl/man/SSL_CTX_sessions.3 +++ /dev/null | |||
@@ -1,86 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_sessions.3,v 1.5 2018/04/25 14:19:39 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: April 25 2018 $ | ||
52 | .Dt SSL_CTX_SESSIONS 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_CTX_sessions | ||
56 | .Nd access internal session cache | ||
57 | .Sh SYNOPSIS | ||
58 | .In openssl/ssl.h | ||
59 | .Ft LHASH_OF(SSL_SESSION) * | ||
60 | .Fn SSL_CTX_sessions "SSL_CTX *ctx" | ||
61 | .Sh DESCRIPTION | ||
62 | .Fn SSL_CTX_sessions | ||
63 | returns a pointer to the lhash databases containing the internal session cache | ||
64 | for | ||
65 | .Fa ctx . | ||
66 | .Pp | ||
67 | The sessions in the internal session cache are kept in an | ||
68 | lhash-type database | ||
69 | (see | ||
70 | .Xr lh_new 3 ) . | ||
71 | It is possible to directly access this database, e.g., for searching. | ||
72 | In parallel, | ||
73 | the sessions form a linked list which is maintained separately from the | ||
74 | lhash operations, | ||
75 | so that the database must not be modified directly but by using the | ||
76 | .Xr SSL_CTX_add_session 3 | ||
77 | family of functions. | ||
78 | .Sh SEE ALSO | ||
79 | .Xr lh_new 3 , | ||
80 | .Xr ssl 3 , | ||
81 | .Xr SSL_CTX_add_session 3 , | ||
82 | .Xr SSL_CTX_set_session_cache_mode 3 | ||
83 | .Sh HISTORY | ||
84 | .Fn SSL_CTX_sessions | ||
85 | first appeared in SSLeay 0.5.2 and has been available since | ||
86 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set1_groups.3 b/src/lib/libssl/man/SSL_CTX_set1_groups.3 deleted file mode 100644 index 0d1eb36ea7..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set1_groups.3 +++ /dev/null | |||
@@ -1,163 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set1_groups.3,v 1.2 2017/08/19 19:36:39 schwarze Exp $ | ||
2 | .\" OpenSSL SSL_CTX_set1_curves.pod de4d764e Nov 9 14:51:06 2016 +0000 | ||
3 | .\" | ||
4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | ||
5 | .\" Copyright (c) 2013, 2014, 2016 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: August 19 2017 $ | ||
52 | .Dt SSL_CTX_SET1_GROUPS 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_CTX_set1_groups , | ||
56 | .Nm SSL_CTX_set1_groups_list , | ||
57 | .Nm SSL_set1_groups , | ||
58 | .Nm SSL_set1_groups_list , | ||
59 | .Nm SSL_CTX_set1_curves , | ||
60 | .Nm SSL_CTX_set1_curves_list , | ||
61 | .Nm SSL_set1_curves , | ||
62 | .Nm SSL_set1_curves_list | ||
63 | .Nd choose supported EC groups | ||
64 | .Sh SYNOPSIS | ||
65 | .In openssl/ssl.h | ||
66 | .Ft int | ||
67 | .Fo SSL_CTX_set1_groups | ||
68 | .Fa "SSL_CTX *ctx" | ||
69 | .Fa "const int *glist" | ||
70 | .Fa "size_t glistlen" | ||
71 | .Fc | ||
72 | .Ft int | ||
73 | .Fo SSL_CTX_set1_groups_list | ||
74 | .Fa "SSL_CTX *ctx" | ||
75 | .Fa "const char *list" | ||
76 | .Fc | ||
77 | .Ft int | ||
78 | .Fo SSL_set1_groups | ||
79 | .Fa "SSL *ssl" | ||
80 | .Fa "const int *glist" | ||
81 | .Fa "size_t glistlen" | ||
82 | .Fc | ||
83 | .Ft int | ||
84 | .Fo SSL_set1_groups_list | ||
85 | .Fa "SSL *ssl" | ||
86 | .Fa "const char *list" | ||
87 | .Fc | ||
88 | .Ft int | ||
89 | .Fo SSL_CTX_set1_curves | ||
90 | .Fa "SSL_CTX *ctx" | ||
91 | .Fa "const int *clist" | ||
92 | .Fa "size_t clistlen" | ||
93 | .Fc | ||
94 | .Ft int | ||
95 | .Fo SSL_CTX_set1_curves_list | ||
96 | .Fa "SSL_CTX *ctx" | ||
97 | .Fa "const char *list" | ||
98 | .Fc | ||
99 | .Ft int | ||
100 | .Fo SSL_set1_curves | ||
101 | .Fa "SSL *ssl" | ||
102 | .Fa "const int *clist" | ||
103 | .Fa "size_t clistlen" | ||
104 | .Fc | ||
105 | .Ft int | ||
106 | .Fo SSL_set1_curves_list | ||
107 | .Fa "SSL *ssl" | ||
108 | .Fa "const char *list" | ||
109 | .Fc | ||
110 | .Sh DESCRIPTION | ||
111 | .Fn SSL_CTX_set1_groups | ||
112 | sets the supported groups for | ||
113 | .Fa ctx | ||
114 | to the | ||
115 | .Fa glistlen | ||
116 | groups in the array | ||
117 | .Fa glist . | ||
118 | The array consists of group NIDs in preference order. | ||
119 | For a TLS client, the groups are used directly in the supported groups | ||
120 | extension. | ||
121 | For a TLS server, the groups are used to determine the set of shared | ||
122 | groups. | ||
123 | .Pp | ||
124 | .Fn SSL_CTX_set1_groups_list | ||
125 | sets the supported groups for | ||
126 | .Fa ctx | ||
127 | to the | ||
128 | .Fa list | ||
129 | represented as a colon separated list of group NIDs or names, for example | ||
130 | "P-521:P-384:P-256". | ||
131 | .Pp | ||
132 | .Fn SSL_set1_groups | ||
133 | and | ||
134 | .Fn SSL_set1_groups_list | ||
135 | are similar except that they set supported groups for the SSL structure | ||
136 | .Fa ssl | ||
137 | only. | ||
138 | .Pp | ||
139 | The curve functions are deprecated synonyms for the equivalently | ||
140 | named group functions and are identical in every respect except | ||
141 | that they are implemented as macros. | ||
142 | They exist because prior to TLS1.3, there was only the concept of | ||
143 | supported curves. | ||
144 | In TLS1.3, this was renamed to supported groups and extended to include | ||
145 | Diffie Hellman groups. | ||
146 | .Pp | ||
147 | If an application wishes to make use of several of these functions for | ||
148 | configuration purposes either on a command line or in a file, it should | ||
149 | consider using the SSL_CONF interface instead of manually parsing | ||
150 | options. | ||
151 | .Sh RETURN VALUES | ||
152 | All these functions return 1 for success or 0 for failure. | ||
153 | .Sh SEE ALSO | ||
154 | .Xr ssl 3 , | ||
155 | .Xr SSL_CTX_add_extra_chain_cert 3 , | ||
156 | .Xr SSL_CTX_set_cipher_list 3 , | ||
157 | .Xr SSL_CTX_set_options 3 , | ||
158 | .Xr SSL_new 3 | ||
159 | .Sh HISTORY | ||
160 | The curve functions first appeared in OpenSSL 1.0.2 | ||
161 | and the group functions in OpenSSL 1.1.1. | ||
162 | Both have been available since | ||
163 | .Ox 6.1 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_alpn_select_cb.3 b/src/lib/libssl/man/SSL_CTX_set_alpn_select_cb.3 deleted file mode 100644 index 2317c57af4..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_alpn_select_cb.3 +++ /dev/null | |||
@@ -1,305 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_alpn_select_cb.3,v 1.11 2025/02/04 14:00:05 tb Exp $ | ||
2 | .\" OpenSSL 87b81496 Apr 19 12:38:27 2017 -0400 | ||
3 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
4 | .\" | ||
5 | .\" This file was written by Todd Short <tshort@akamai.com>. | ||
6 | .\" Copyright (c) 2016 The OpenSSL Project. All rights reserved. | ||
7 | .\" | ||
8 | .\" Redistribution and use in source and binary forms, with or without | ||
9 | .\" modification, are permitted provided that the following conditions | ||
10 | .\" are met: | ||
11 | .\" | ||
12 | .\" 1. Redistributions of source code must retain the above copyright | ||
13 | .\" notice, this list of conditions and the following disclaimer. | ||
14 | .\" | ||
15 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
16 | .\" notice, this list of conditions and the following disclaimer in | ||
17 | .\" the documentation and/or other materials provided with the | ||
18 | .\" distribution. | ||
19 | .\" | ||
20 | .\" 3. All advertising materials mentioning features or use of this | ||
21 | .\" software must display the following acknowledgment: | ||
22 | .\" "This product includes software developed by the OpenSSL Project | ||
23 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
24 | .\" | ||
25 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | .\" endorse or promote products derived from this software without | ||
27 | .\" prior written permission. For written permission, please contact | ||
28 | .\" openssl-core@openssl.org. | ||
29 | .\" | ||
30 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
31 | .\" nor may "OpenSSL" appear in their names without prior written | ||
32 | .\" permission of the OpenSSL Project. | ||
33 | .\" | ||
34 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
35 | .\" acknowledgment: | ||
36 | .\" "This product includes software developed by the OpenSSL Project | ||
37 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
38 | .\" | ||
39 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | .\" | ||
52 | .Dd $Mdocdate: February 4 2025 $ | ||
53 | .Dt SSL_CTX_SET_ALPN_SELECT_CB 3 | ||
54 | .Os | ||
55 | .Sh NAME | ||
56 | .Nm SSL_CTX_set_alpn_protos , | ||
57 | .Nm SSL_set_alpn_protos , | ||
58 | .Nm SSL_CTX_set_alpn_select_cb , | ||
59 | .Nm SSL_select_next_proto , | ||
60 | .Nm SSL_get0_alpn_selected | ||
61 | .Nd handle application layer protocol negotiation (ALPN) | ||
62 | .Sh SYNOPSIS | ||
63 | .In openssl/ssl.h | ||
64 | .Ft int | ||
65 | .Fo SSL_CTX_set_alpn_protos | ||
66 | .Fa "SSL_CTX *ctx" | ||
67 | .Fa "const unsigned char *protos" | ||
68 | .Fa "unsigned int protos_len" | ||
69 | .Fc | ||
70 | .Ft int | ||
71 | .Fo SSL_set_alpn_protos | ||
72 | .Fa "SSL *ssl" | ||
73 | .Fa "const unsigned char *protos" | ||
74 | .Fa "unsigned int protos_len" | ||
75 | .Fc | ||
76 | .Ft void | ||
77 | .Fo SSL_CTX_set_alpn_select_cb | ||
78 | .Fa "SSL_CTX *ctx" | ||
79 | .Fa "int (*cb)(SSL *ssl, const unsigned char **out,\ | ||
80 | unsigned char *outlen, const unsigned char *in,\ | ||
81 | unsigned int inlen, void *arg)" | ||
82 | .Fa "void *arg" | ||
83 | .Fc | ||
84 | .Ft int | ||
85 | .Fo SSL_select_next_proto | ||
86 | .Fa "unsigned char **out" | ||
87 | .Fa "unsigned char *outlen" | ||
88 | .Fa "const unsigned char *peer_list" | ||
89 | .Fa "unsigned int peer_list_len" | ||
90 | .Fa "const unsigned char *supported_list" | ||
91 | .Fa "unsigned int supported_list_len" | ||
92 | .Fc | ||
93 | .Ft void | ||
94 | .Fo SSL_get0_alpn_selected | ||
95 | .Fa "const SSL *ssl" | ||
96 | .Fa "const unsigned char **data" | ||
97 | .Fa "unsigned int *len" | ||
98 | .Fc | ||
99 | .Sh DESCRIPTION | ||
100 | .Fn SSL_CTX_set_alpn_protos | ||
101 | and | ||
102 | .Fn SSL_set_alpn_protos | ||
103 | are used by the client to set the list of protocols available to be | ||
104 | negotiated. | ||
105 | The | ||
106 | .Fa protos | ||
107 | must be in protocol-list format, described below. | ||
108 | The length of | ||
109 | .Fa protos | ||
110 | is specified in | ||
111 | .Fa protos_len . | ||
112 | .Pp | ||
113 | .Fn SSL_CTX_set_alpn_select_cb | ||
114 | sets the application callback | ||
115 | .Fa cb | ||
116 | used by a server to select which protocol to use for the incoming | ||
117 | connection. | ||
118 | When | ||
119 | .Fa cb | ||
120 | is | ||
121 | .Dv NULL , | ||
122 | ALPN is not used. | ||
123 | The | ||
124 | .Fa arg | ||
125 | value is a pointer which is passed to the application callback. | ||
126 | .Pp | ||
127 | .Fa cb | ||
128 | is the application defined callback. | ||
129 | The | ||
130 | .Fa in , | ||
131 | .Fa inlen | ||
132 | parameters are a vector in protocol-list format. | ||
133 | The value of the | ||
134 | .Fa out , | ||
135 | .Fa outlen | ||
136 | vector should be set to the value of a single protocol selected from the | ||
137 | .Fa in , | ||
138 | .Fa inlen | ||
139 | vector. | ||
140 | The | ||
141 | .Fa out | ||
142 | buffer may point directly into | ||
143 | .Fa in , | ||
144 | or to a buffer that outlives the handshake. | ||
145 | The | ||
146 | .Fa arg | ||
147 | parameter is the pointer set via | ||
148 | .Fn SSL_CTX_set_alpn_select_cb . | ||
149 | .Pp | ||
150 | .Fn SSL_select_next_proto | ||
151 | is a helper function used to select protocols. | ||
152 | It is expected that this function is called from the application | ||
153 | callback | ||
154 | .Fa cb . | ||
155 | If | ||
156 | .Fn SSL_select_next_proto | ||
157 | returns | ||
158 | .Dv OPENSSL_NPN_NO_OVERLAP , | ||
159 | .Fa cb | ||
160 | should ignore | ||
161 | .Fa out | ||
162 | and fail by returning | ||
163 | .Dv SSL_TLSEXT_ERR_ALERT_FATAL . | ||
164 | The protocol data in | ||
165 | .Fa peer_list , | ||
166 | .Fa peer_list_len | ||
167 | and | ||
168 | .Fa supported_list , | ||
169 | .Fa supported_list_len | ||
170 | must be two non-empty lists, validly encoded | ||
171 | in the protocol-list format described below. | ||
172 | The first item in the | ||
173 | .Fa peer_list | ||
174 | that matches an item in the | ||
175 | .Fa supported_list | ||
176 | is selected, and returned in | ||
177 | .Fa out , | ||
178 | .Fa outlen . | ||
179 | The | ||
180 | .Fa out | ||
181 | value will point into either | ||
182 | .Fa peer_list | ||
183 | or | ||
184 | .Fa supported_list , | ||
185 | so it must not be modified and | ||
186 | should be copied immediately. | ||
187 | If no match is found, the first item in | ||
188 | .Fa supported_list | ||
189 | is returned in | ||
190 | .Fa out , | ||
191 | .Fa outlen . | ||
192 | .Pp | ||
193 | .Fn SSL_get0_alpn_selected | ||
194 | returns a pointer to the selected protocol in | ||
195 | .Fa data | ||
196 | with length | ||
197 | .Fa len . | ||
198 | It is not NUL-terminated. | ||
199 | .Fa data | ||
200 | is set to | ||
201 | .Dv NULL | ||
202 | and | ||
203 | .Fa len | ||
204 | is set to 0 if no protocol has been selected. | ||
205 | .Fa data | ||
206 | must not be freed. | ||
207 | .Pp | ||
208 | The protocol-lists must be in wire-format, which is defined as a vector | ||
209 | of non-empty, 8-bit length-prefixed byte strings. | ||
210 | The length-prefix byte is not included in the length. | ||
211 | Each string is limited to 255 bytes. | ||
212 | A byte-string length of 0 is invalid. | ||
213 | The length of the vector is not in the vector itself, but in a separate | ||
214 | variable. | ||
215 | .Pp | ||
216 | For example: | ||
217 | .Bd -literal | ||
218 | const unsigned char *vector = "\ex06" "spdy/1" "\ex08" "http/1.1"; | ||
219 | unsigned int length = strlen(vector); | ||
220 | .Ed | ||
221 | .Pp | ||
222 | The ALPN callback is executed after the servername callback; as that | ||
223 | servername callback may update the SSL_CTX, and subsequently, the ALPN | ||
224 | callback. | ||
225 | .Pp | ||
226 | If there is no ALPN proposed in the ClientHello, the ALPN callback is | ||
227 | not invoked. | ||
228 | .Sh RETURN VALUES | ||
229 | .Fn SSL_CTX_set_alpn_protos | ||
230 | and | ||
231 | .Fn SSL_set_alpn_protos | ||
232 | return 0 on success or non-zero on failure. | ||
233 | WARNING: these functions reverse the return value convention. | ||
234 | .Pp | ||
235 | .Fn SSL_select_next_proto | ||
236 | returns one of the following: | ||
237 | .Bl -tag -width Ds | ||
238 | .It OPENSSL_NPN_NEGOTIATED | ||
239 | A match was found and is returned in | ||
240 | .Fa out , | ||
241 | .Fa outlen . | ||
242 | .It OPENSSL_NPN_NO_OVERLAP | ||
243 | No match was found. | ||
244 | The first item in | ||
245 | .Fa supported_list , | ||
246 | .Fa supported_list_len | ||
247 | is returned in | ||
248 | .Fa out , | ||
249 | .Fa outlen . | ||
250 | .El | ||
251 | .Pp | ||
252 | The ALPN select callback | ||
253 | .Fa cb | ||
254 | must return one of the following: | ||
255 | .Bl -tag -width Ds | ||
256 | .It SSL_TLSEXT_ERR_OK | ||
257 | ALPN protocol selected. | ||
258 | .It SSL_TLSEXT_ERR_ALERT_FATAL | ||
259 | There was no overlap between the client's supplied list and the | ||
260 | server configuration. | ||
261 | .It SSL_TLSEXT_ERR_NOACK | ||
262 | ALPN protocol not selected, e.g., because no ALPN protocols are | ||
263 | configured for this connection. | ||
264 | .El | ||
265 | .Sh SEE ALSO | ||
266 | .Xr ssl 3 , | ||
267 | .Xr SSL_CTX_set_tlsext_servername_arg 3 , | ||
268 | .Xr SSL_CTX_set_tlsext_servername_callback 3 | ||
269 | .Sh STANDARDS | ||
270 | .Rs | ||
271 | .%T TLS Application-Layer Protocol Negotiation Extension | ||
272 | .%R RFC 7301 | ||
273 | .Re | ||
274 | .Pp | ||
275 | .Rs | ||
276 | .%T TLS Next Protocol Negotiation Extension | ||
277 | .%U https://datatracker.ietf.org/doc/html/draft-agl-tls-nextprotoneg | ||
278 | .Re | ||
279 | .Sh HISTORY | ||
280 | .Fn SSL_select_next_proto | ||
281 | first appeared in OpenSSL 1.0.1 and has been available since | ||
282 | .Ox 5.3 . | ||
283 | .Pp | ||
284 | .Fn SSL_CTX_set_alpn_protos , | ||
285 | .Fn SSL_set_alpn_protos , | ||
286 | .Fn SSL_CTX_set_alpn_select_cb , | ||
287 | and | ||
288 | .Fn SSL_get0_alpn_selected | ||
289 | first appeared in OpenSSL 1.0.2 and have been available since | ||
290 | .Ox 5.7 . | ||
291 | .Sh CAVEATS | ||
292 | The fallback to the first supported protocol in | ||
293 | .Fn SSL_select_next_proto | ||
294 | comes from the opportunistic fallback mechanism in the NPN extension. | ||
295 | This behavior does not make sense for ALPN, | ||
296 | where missing protocol overlap should result in a handshake failure. | ||
297 | To avoid accidental selection of a protocol that the server does not | ||
298 | support, it is recommended to pass the locally configured protocols | ||
299 | as second pair of protocols in the ALPN callback. | ||
300 | .Sh BUGS | ||
301 | The | ||
302 | .Fa out | ||
303 | argument of | ||
304 | .Fn SSL_select_next_proto | ||
305 | should have been const. | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_cert_store.3 b/src/lib/libssl/man/SSL_CTX_set_cert_store.3 deleted file mode 100644 index 1be1ba2f68..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_cert_store.3 +++ /dev/null | |||
@@ -1,146 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_cert_store.3,v 1.8 2024/08/03 04:53:01 tb Exp $ | ||
2 | .\" OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001, 2002, 2005 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: August 3 2024 $ | ||
52 | .Dt SSL_CTX_SET_CERT_STORE 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_CTX_set_cert_store , | ||
56 | .Nm SSL_CTX_set1_cert_store , | ||
57 | .Nm SSL_CTX_get_cert_store | ||
58 | .Nd manipulate X509 certificate verification storage | ||
59 | .Sh SYNOPSIS | ||
60 | .In openssl/ssl.h | ||
61 | .Ft void | ||
62 | .Fn SSL_CTX_set_cert_store "SSL_CTX *ctx" "X509_STORE *store" | ||
63 | .Ft void | ||
64 | .Fn SSL_CTX_set1_cert_store "SSL_CTX *ctx" "X509_STORE *store" | ||
65 | .Ft X509_STORE * | ||
66 | .Fn SSL_CTX_get_cert_store "const SSL_CTX *ctx" | ||
67 | .Sh DESCRIPTION | ||
68 | .Fn SSL_CTX_set_cert_store | ||
69 | sets the verification storage of | ||
70 | .Fa ctx | ||
71 | to or replaces it with | ||
72 | .Fa store . | ||
73 | If another | ||
74 | .Vt X509_STORE | ||
75 | object is currently set in | ||
76 | .Fa ctx , | ||
77 | it will be freed. | ||
78 | .Pp | ||
79 | .Fn SSL_CTX_set1_cert_store | ||
80 | sets the verification storage of | ||
81 | .Fa ctx | ||
82 | to or replaces it with | ||
83 | .Fa store . | ||
84 | The | ||
85 | .Fa store Ns 's | ||
86 | reference count is incremented. | ||
87 | .Pp | ||
88 | .Fn SSL_CTX_get_cert_store | ||
89 | returns a pointer to the current certificate verification storage. | ||
90 | .Pp | ||
91 | In order to verify the certificates presented by the peer, trusted CA | ||
92 | certificates must be accessed. | ||
93 | These CA certificates are made available via lookup methods, handled inside the | ||
94 | .Vt X509_STORE . | ||
95 | From the | ||
96 | .Vt X509_STORE | ||
97 | the | ||
98 | .Vt X509_STORE_CTX | ||
99 | used when verifying certificates is created. | ||
100 | .Pp | ||
101 | Typically the trusted certificate store is handled indirectly via using | ||
102 | .Xr SSL_CTX_load_verify_locations 3 . | ||
103 | Using the | ||
104 | .Fn SSL_CTX_set_cert_store | ||
105 | and | ||
106 | .Fn SSL_CTX_get_cert_store | ||
107 | functions it is possible to manipulate the | ||
108 | .Vt X509_STORE | ||
109 | object beyond the | ||
110 | .Xr SSL_CTX_load_verify_locations 3 | ||
111 | call. | ||
112 | .Pp | ||
113 | Currently no detailed documentation on how to use the | ||
114 | .Vt X509_STORE | ||
115 | object is available. | ||
116 | Not all members of the | ||
117 | .Vt X509_STORE | ||
118 | are used when the verification takes place. | ||
119 | So will, for example, the | ||
120 | .Fn verify_callback | ||
121 | be overridden with the | ||
122 | .Fn verify_callback | ||
123 | set via the | ||
124 | .Xr SSL_CTX_set_verify 3 | ||
125 | family of functions. | ||
126 | This document must therefore be updated when documentation about the | ||
127 | .Vt X509_STORE | ||
128 | object and its handling becomes available. | ||
129 | .Sh RETURN VALUES | ||
130 | .Fn SSL_CTX_get_cert_store | ||
131 | returns the current setting. | ||
132 | .Sh SEE ALSO | ||
133 | .Xr ssl 3 , | ||
134 | .Xr SSL_CTX_load_verify_locations 3 , | ||
135 | .Xr SSL_CTX_set_verify 3 , | ||
136 | .Xr X509_STORE_new 3 | ||
137 | .Sh HISTORY | ||
138 | .Fn SSL_CTX_set_cert_store | ||
139 | and | ||
140 | .Fn SSL_CTX_get_cert_store | ||
141 | first appeared in SSLeay 0.8.1 and have been available since | ||
142 | .Ox 2.4 . | ||
143 | .Pp | ||
144 | .Fn SSL_CTX_set1_cert_store | ||
145 | first appeared in OpenSSL 1.1.1 and has been available since | ||
146 | .Ox 7.6 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 b/src/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 deleted file mode 100644 index 0e12b48c78..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 +++ /dev/null | |||
@@ -1,163 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_cert_verify_callback.3,v 1.5 2019/06/08 15:25:43 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001, 2002 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: June 8 2019 $ | ||
52 | .Dt SSL_CTX_SET_CERT_VERIFY_CALLBACK 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_CTX_set_cert_verify_callback | ||
56 | .Nd set peer certificate verification procedure | ||
57 | .Sh SYNOPSIS | ||
58 | .In openssl/ssl.h | ||
59 | .Ft void | ||
60 | .Fo SSL_CTX_set_cert_verify_callback | ||
61 | .Fa "SSL_CTX *ctx" | ||
62 | .Fa "int (*callback)(X509_STORE_CTX *, void *)" | ||
63 | .Fa "void *arg" | ||
64 | .Fc | ||
65 | .Sh DESCRIPTION | ||
66 | .Fn SSL_CTX_set_cert_verify_callback | ||
67 | sets the verification callback function for | ||
68 | .Fa ctx . | ||
69 | .Vt SSL | ||
70 | objects that are created from | ||
71 | .Fa ctx | ||
72 | inherit the setting valid at the time when | ||
73 | .Xr SSL_new 3 | ||
74 | is called. | ||
75 | .Pp | ||
76 | Whenever a certificate is verified during a SSL/TLS handshake, | ||
77 | a verification function is called. | ||
78 | If the application does not explicitly specify a verification callback | ||
79 | function, the built-in verification function is used. | ||
80 | If a verification callback | ||
81 | .Fa callback | ||
82 | is specified via | ||
83 | .Fn SSL_CTX_set_cert_verify_callback , | ||
84 | the supplied callback function is called instead. | ||
85 | By setting | ||
86 | .Fa callback | ||
87 | to | ||
88 | .Dv NULL , | ||
89 | the default behaviour is restored. | ||
90 | .Pp | ||
91 | When the verification must be performed, | ||
92 | .Fa callback | ||
93 | will be called with the arguments | ||
94 | .Fn callback "X509_STORE_CTX *x509_store_ctx" "void *arg" . | ||
95 | The argument | ||
96 | .Fa arg | ||
97 | is specified by the application when setting | ||
98 | .Fa callback . | ||
99 | .Pp | ||
100 | .Fa callback | ||
101 | should return 1 to indicate verification success and 0 to indicate verification | ||
102 | failure. | ||
103 | If | ||
104 | .Dv SSL_VERIFY_PEER | ||
105 | is set and | ||
106 | .Fa callback | ||
107 | returns 0, the handshake will fail. | ||
108 | As the verification procedure may allow the connection to continue in case of | ||
109 | failure (by always returning 1) the verification result must be set in any case | ||
110 | using the | ||
111 | .Fa error | ||
112 | member of | ||
113 | .Fa x509_store_ctx | ||
114 | so that the calling application will be informed about the detailed result of | ||
115 | the verification procedure! | ||
116 | .Pp | ||
117 | Within | ||
118 | .Fa x509_store_ctx , | ||
119 | .Fa callback | ||
120 | has access to the | ||
121 | .Fa verify_callback | ||
122 | function set using | ||
123 | .Xr SSL_CTX_set_verify 3 . | ||
124 | .Sh SEE ALSO | ||
125 | .Xr ssl 3 , | ||
126 | .Xr SSL_CTX_load_verify_locations 3 , | ||
127 | .Xr SSL_CTX_set_verify 3 , | ||
128 | .Xr SSL_get_verify_result 3 | ||
129 | .Sh HISTORY | ||
130 | .Fn SSL_CTX_set_cert_verify_callback | ||
131 | first appeared in SSLeay 0.6.1 and has been available since | ||
132 | .Ox 2.4 . | ||
133 | .Pp | ||
134 | Previous to OpenSSL 0.9.7, the | ||
135 | .Fa arg | ||
136 | argument to | ||
137 | .Fn SSL_CTX_set_cert_verify_callback | ||
138 | was ignored, and | ||
139 | .Fa callback | ||
140 | was called | ||
141 | simply as | ||
142 | .Ft int | ||
143 | .Fn (*callback) "X509_STORE_CTX *" . | ||
144 | To compile software written for previous versions of OpenSSL, | ||
145 | a dummy argument will have to be added to | ||
146 | .Fa callback . | ||
147 | .Sh CAVEATS | ||
148 | Do not mix the verification callback described in this function with the | ||
149 | .Fa verify_callback | ||
150 | function called during the verification process. | ||
151 | The latter is set using the | ||
152 | .Xr SSL_CTX_set_verify 3 | ||
153 | family of functions. | ||
154 | .Pp | ||
155 | Providing a complete verification procedure including certificate purpose | ||
156 | settings, etc., is a complex task. | ||
157 | The built-in procedure is quite powerful and in most cases it should be | ||
158 | sufficient to modify its behaviour using the | ||
159 | .Fa verify_callback | ||
160 | function. | ||
161 | .Sh BUGS | ||
162 | .Fn SSL_CTX_set_cert_verify_callback | ||
163 | does not provide diagnostic information. | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_cipher_list.3 b/src/lib/libssl/man/SSL_CTX_set_cipher_list.3 deleted file mode 100644 index b3f0dc3541..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_cipher_list.3 +++ /dev/null | |||
@@ -1,375 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_cipher_list.3,v 1.18 2025/01/18 12:20:02 tb Exp $ | ||
2 | .\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file is a derived work. | ||
5 | .\" The changes are covered by the following Copyright and license: | ||
6 | .\" | ||
7 | .\" Copyright (c) 2018, 2020 Ingo Schwarze <schwarze@openbsd.org> | ||
8 | .\" | ||
9 | .\" Permission to use, copy, modify, and distribute this software for any | ||
10 | .\" purpose with or without fee is hereby granted, provided that the above | ||
11 | .\" copyright notice and this permission notice appear in all copies. | ||
12 | .\" | ||
13 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
14 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
15 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
16 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
17 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
18 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
19 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
20 | .\" | ||
21 | .\" The original file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
22 | .\" Copyright (c) 2000, 2001, 2013 The OpenSSL Project. All rights reserved. | ||
23 | .\" | ||
24 | .\" Redistribution and use in source and binary forms, with or without | ||
25 | .\" modification, are permitted provided that the following conditions | ||
26 | .\" are met: | ||
27 | .\" | ||
28 | .\" 1. Redistributions of source code must retain the above copyright | ||
29 | .\" notice, this list of conditions and the following disclaimer. | ||
30 | .\" | ||
31 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
32 | .\" notice, this list of conditions and the following disclaimer in | ||
33 | .\" the documentation and/or other materials provided with the | ||
34 | .\" distribution. | ||
35 | .\" | ||
36 | .\" 3. All advertising materials mentioning features or use of this | ||
37 | .\" software must display the following acknowledgment: | ||
38 | .\" "This product includes software developed by the OpenSSL Project | ||
39 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
40 | .\" | ||
41 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
42 | .\" endorse or promote products derived from this software without | ||
43 | .\" prior written permission. For written permission, please contact | ||
44 | .\" openssl-core@openssl.org. | ||
45 | .\" | ||
46 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
47 | .\" nor may "OpenSSL" appear in their names without prior written | ||
48 | .\" permission of the OpenSSL Project. | ||
49 | .\" | ||
50 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
51 | .\" acknowledgment: | ||
52 | .\" "This product includes software developed by the OpenSSL Project | ||
53 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
54 | .\" | ||
55 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
56 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
57 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
58 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
59 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
60 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
61 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
62 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
63 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
64 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
65 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
66 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
67 | .\" | ||
68 | .Dd $Mdocdate: January 18 2025 $ | ||
69 | .Dt SSL_CTX_SET_CIPHER_LIST 3 | ||
70 | .Os | ||
71 | .Sh NAME | ||
72 | .Nm SSL_CTX_set_cipher_list , | ||
73 | .Nm SSL_set_cipher_list | ||
74 | .Nd choose list of available SSL_CIPHERs | ||
75 | .Sh SYNOPSIS | ||
76 | .In openssl/ssl.h | ||
77 | .Ft int | ||
78 | .Fn SSL_CTX_set_cipher_list "SSL_CTX *ctx" "const char *control" | ||
79 | .Ft int | ||
80 | .Fn SSL_set_cipher_list "SSL *ssl" "const char *control" | ||
81 | .Sh DESCRIPTION | ||
82 | .Fn SSL_CTX_set_cipher_list | ||
83 | sets the list of available cipher suites for | ||
84 | .Fa ctx | ||
85 | using the | ||
86 | .Fa control | ||
87 | string. | ||
88 | The list of cipher suites is inherited by all | ||
89 | .Fa ssl | ||
90 | objects created from | ||
91 | .Fa ctx . | ||
92 | .Pp | ||
93 | .Fn SSL_set_cipher_list | ||
94 | sets the list of cipher suites only for | ||
95 | .Fa ssl . | ||
96 | .Pp | ||
97 | The control string consists of one or more control words | ||
98 | separated by colon characters | ||
99 | .Pq Ql \&: . | ||
100 | Space | ||
101 | .Pq Ql \ \& , | ||
102 | semicolon | ||
103 | .Pq Ql \&; , | ||
104 | and comma | ||
105 | .Pq Ql \&, | ||
106 | characters can also be used as separators. | ||
107 | Each control words selects a set of cipher suites | ||
108 | and can take one of the following optional prefix characters: | ||
109 | .Bl -tag -width Ds | ||
110 | .It \&No prefix: | ||
111 | Those of the selected cipher suites that have not been made available | ||
112 | yet are added to the end of the list of available cipher suites, | ||
113 | preserving their order. | ||
114 | .It Prefixed minus sign Pq Ql \- : | ||
115 | Those of the selected cipher suites that have been made available | ||
116 | earlier are moved back from the list of available cipher suites to | ||
117 | the beginning of the list of unavailable cipher suites, | ||
118 | also preserving their order. | ||
119 | .It Prefixed plus sign Pq Ql + : | ||
120 | Those of the selected cipher suites have been made available earlier | ||
121 | are moved to end of the list of available cipher suites, reducing | ||
122 | their priority, but preserving the order among themselves. | ||
123 | .It Prefixed exclamation mark Pq Ql \&! : | ||
124 | The selected cipher suites are permanently deleted, no matter whether | ||
125 | they had earlier been made available or not, and can no longer | ||
126 | be added or re-added by later words. | ||
127 | .El | ||
128 | .Pp | ||
129 | The following special words can only be used without a prefix: | ||
130 | .Bl -tag -width Ds | ||
131 | .It Cm DEFAULT | ||
132 | An alias for | ||
133 | .Sm off | ||
134 | .Cm ALL No :! Cm aNULL No :! Cm eNULL . | ||
135 | .Sm on | ||
136 | It can only be used as the first word. | ||
137 | The | ||
138 | .Cm DEFAULT | ||
139 | cipher list can be displayed with the | ||
140 | .Xr openssl 1 | ||
141 | .Cm ciphers | ||
142 | command. | ||
143 | .It Cm @SECLEVEL=n | ||
144 | Set the security level to n, which should be a number between | ||
145 | zero and five. | ||
146 | See | ||
147 | .Xr SSL_CTX_set_security_level 3 | ||
148 | for details. | ||
149 | .It Cm @STRENGTH | ||
150 | Sort the list by decreasing encryption strength, | ||
151 | preserving the order of cipher suites that have the same strength. | ||
152 | It is usually given as the last word. | ||
153 | .El | ||
154 | .Pp | ||
155 | The following words can be used to select groups of cipher suites, | ||
156 | with or without a prefix character. | ||
157 | If two or more of these words are joined with plus signs | ||
158 | .Pq Ql + | ||
159 | to form a longer word, only the intersection of the specified sets | ||
160 | is selected. | ||
161 | .Bl -tag -width Ds | ||
162 | .It Cm ADH | ||
163 | Cipher suites using ephemeral DH for key exchange | ||
164 | without doing any server authentication. | ||
165 | Equivalent to | ||
166 | .Cm DH Ns + Ns Cm aNULL . | ||
167 | .It Cm AEAD | ||
168 | Cipher suites using Authenticated Encryption with Additional Data. | ||
169 | .It Cm AECDH | ||
170 | Cipher suites using ephemeral ECDH for key exchange | ||
171 | without doing any server authentication. | ||
172 | Equivalent to | ||
173 | .Cm ECDH Ns + Ns Cm aNULL . | ||
174 | .It Cm aECDSA | ||
175 | Cipher suites using ECDSA server authentication. | ||
176 | .It Cm AES | ||
177 | Cipher suites using AES or AESGCM for symmetric encryption. | ||
178 | .It Cm AES128 | ||
179 | Cipher suites using AES(128) or AESGCM(128) for symmetric encryption. | ||
180 | .It Cm AES256 | ||
181 | Cipher suites using AES(256) or AESGCM(256) for symmetric encryption. | ||
182 | .It Cm AESGCM | ||
183 | Cipher suites using AESGCM for symmetric encryption. | ||
184 | .It Cm aGOST | ||
185 | An alias for | ||
186 | .Cm aGOST01 . | ||
187 | .It Cm aGOST01 | ||
188 | Cipher suites using GOST R 34.10-2001 server authentication. | ||
189 | .It Cm ALL | ||
190 | All cipher suites except those selected by | ||
191 | .Cm eNULL . | ||
192 | .It Cm aNULL | ||
193 | Cipher suites that don't do any server authentication. | ||
194 | Not enabled by | ||
195 | .Cm DEFAULT . | ||
196 | Beware of man-in-the-middle attacks. | ||
197 | .It Cm aRSA | ||
198 | Cipher suites using RSA server authentication. | ||
199 | .It Cm CAMELLIA | ||
200 | Cipher suites using Camellia for symmetric encryption. | ||
201 | .It Cm CAMELLIA128 | ||
202 | Cipher suites using Camellia(128) for symmetric encryption. | ||
203 | .It Cm CAMELLIA256 | ||
204 | Cipher suites using Camellia(256) for symmetric encryption. | ||
205 | .It Cm CHACHA20 | ||
206 | Cipher suites using ChaCha20-Poly1305 for symmetric encryption. | ||
207 | .It Cm COMPLEMENTOFALL | ||
208 | Cipher suites that are not included in | ||
209 | .Cm ALL . | ||
210 | Currently an alias for | ||
211 | .Cm eNULL . | ||
212 | .It Cm COMPLEMENTOFDEFAULT | ||
213 | Cipher suites that are included in | ||
214 | .Cm ALL , | ||
215 | but not included in | ||
216 | .Cm DEFAULT . | ||
217 | Currently similar to | ||
218 | .Cm aNULL Ns :! Ns Cm eNULL | ||
219 | except for the order of the cipher suites which are | ||
220 | .Em not | ||
221 | selected. | ||
222 | .It Cm 3DES | ||
223 | Cipher suites using triple DES for symmetric encryption. | ||
224 | .It Cm DH | ||
225 | Cipher suites using ephemeral DH for key exchange. | ||
226 | .It Cm DHE | ||
227 | Cipher suites using ephemeral DH for key exchange, | ||
228 | but excluding those that don't do any server authentication. | ||
229 | Similar to | ||
230 | .Cm DH Ns :! Ns Cm aNULL | ||
231 | except for the order of the cipher suites which are | ||
232 | .Em not | ||
233 | selected. | ||
234 | .It Cm ECDH | ||
235 | Cipher suites using ephemeral ECDH for key exchange. | ||
236 | .It Cm ECDHE | ||
237 | Cipher suites using ephemeral ECDH for key exchange, | ||
238 | but excluding those that don't do any server authentication. | ||
239 | Similar to | ||
240 | .Cm ECDH Ns :! Ns Cm aNULL | ||
241 | except for the order of the cipher suites which are | ||
242 | .Em not | ||
243 | selected. | ||
244 | .It Cm ECDSA | ||
245 | An alias for | ||
246 | .Cm aECDSA . | ||
247 | .It Cm eNULL | ||
248 | Cipher suites that do not use any encryption. | ||
249 | Not enabled by | ||
250 | .Cm DEFAULT , | ||
251 | and not even included in | ||
252 | .Cm ALL . | ||
253 | .It Cm GOST89MAC | ||
254 | Cipher suites using GOST 28147-89 for message authentication | ||
255 | instead of HMAC. | ||
256 | .It Cm GOST94 | ||
257 | Cipher suites using HMAC based on GOST R 34.11-94 | ||
258 | for message authentication. | ||
259 | .It Cm HIGH | ||
260 | Cipher suites of high strength. | ||
261 | .It Cm kGOST | ||
262 | Cipher suites using VKO 34.10 key exchange, specified in RFC 4357. | ||
263 | .It Cm kRSA | ||
264 | Cipher suites using RSA key exchange. | ||
265 | .It Cm LOW | ||
266 | Cipher suites of low strength. | ||
267 | .It Cm MD5 | ||
268 | Cipher suites using MD5 for message authentication. | ||
269 | .It Cm MEDIUM | ||
270 | Cipher suites of medium strength. | ||
271 | .It Cm NULL | ||
272 | An alias for | ||
273 | .Cm eNULL . | ||
274 | .It Cm RC4 | ||
275 | Cipher suites using RC4 for symmetric encryption. | ||
276 | .It Cm RSA | ||
277 | Cipher suites using RSA for both key exchange and server authentication. | ||
278 | Equivalent to | ||
279 | .Cm kRSA Ns + Ns Cm aRSA . | ||
280 | .It Cm SHA | ||
281 | An alias for | ||
282 | .Cm SHA1 . | ||
283 | .It Cm SHA1 | ||
284 | Cipher suites using SHA1 for message authentication. | ||
285 | .It Cm SHA256 | ||
286 | Cipher suites using SHA256 for message authentication. | ||
287 | .It Cm SHA384 | ||
288 | Cipher suites using SHA384 for message authentication. | ||
289 | .It Cm SSLv3 | ||
290 | An alias for | ||
291 | .Cm TLSv1 . | ||
292 | .It Cm STREEBOG256 | ||
293 | Cipher suites using STREEBOG256 for message authentication. | ||
294 | .It Cm TLSv1 | ||
295 | Cipher suites usable with the TLSv1.0, TLSv1.1, and TLSv1.2 protocols. | ||
296 | .It Cm TLSv1.2 | ||
297 | Cipher suites for the TLSv1.2 protocol. | ||
298 | .It Cm TLSv1.3 | ||
299 | Cipher suites for the TLSv1.3 protocol. | ||
300 | If the | ||
301 | .Fa control | ||
302 | string selects at least one cipher suite but neither contains the word | ||
303 | .Cm TLSv1.3 | ||
304 | nor specifically includes nor excludes any TLSv1.3 cipher suites, all the | ||
305 | .Cm TLSv1.3 | ||
306 | cipher suites are made available, too. | ||
307 | .El | ||
308 | .Pp | ||
309 | The full words returned by the | ||
310 | .Xr openssl 1 | ||
311 | .Cm ciphers | ||
312 | command can be used to select individual cipher suites. | ||
313 | .Pp | ||
314 | The following are deprecated aliases: | ||
315 | .Pp | ||
316 | .Bl -column kEECDH ECDHE -compact -offset indent | ||
317 | .It avoid: Ta use: | ||
318 | .It Cm EDH Ta Cm DHE | ||
319 | .It Cm EECDH Ta Cm ECDHE | ||
320 | .It Cm kEDH Ta Cm DH | ||
321 | .It Cm kEECDH Ta Cm ECDH | ||
322 | .El | ||
323 | .Pp | ||
324 | Unknown words are silently ignored, selecting no cipher suites. | ||
325 | Failure is only flagged if the | ||
326 | .Fa control | ||
327 | string contains invalid bytes | ||
328 | or if no matching cipher suites are available at all. | ||
329 | .Pp | ||
330 | On the client side, including a cipher suite into the list of | ||
331 | available cipher suites is sufficient for using it. | ||
332 | On the server side, all cipher suites have additional requirements. | ||
333 | ADH ciphers don't need a certificate, but DH-parameters must have been set. | ||
334 | All other cipher suites need a corresponding certificate and key. | ||
335 | .Pp | ||
336 | A RSA cipher can only be chosen when an RSA certificate is available. | ||
337 | RSA ciphers using DHE need a certificate and key and additional DH-parameters | ||
338 | (see | ||
339 | .Xr SSL_CTX_set_tmp_dh_callback 3 ) . | ||
340 | .Pp | ||
341 | When these conditions are not met | ||
342 | for any cipher suite in the list (for example, a | ||
343 | client only supports export RSA ciphers with an asymmetric key length of 512 | ||
344 | bits and the server is not configured to use temporary RSA keys), the | ||
345 | .Dq no shared cipher | ||
346 | .Pq Dv SSL_R_NO_SHARED_CIPHER | ||
347 | error is generated and the handshake will fail. | ||
348 | .Sh RETURN VALUES | ||
349 | .Fn SSL_CTX_set_cipher_list | ||
350 | and | ||
351 | .Fn SSL_set_cipher_list | ||
352 | return 1 if any cipher suite could be selected and 0 on complete failure. | ||
353 | .Sh SEE ALSO | ||
354 | .Xr ssl 3 , | ||
355 | .Xr SSL_CTX_set1_groups 3 , | ||
356 | .Xr SSL_CTX_set_tmp_dh_callback 3 , | ||
357 | .Xr SSL_CTX_use_certificate 3 , | ||
358 | .Xr SSL_get_ciphers 3 | ||
359 | .Sh HISTORY | ||
360 | .Fn SSL_CTX_set_cipher_list | ||
361 | and | ||
362 | .Fn SSL_set_cipher_list | ||
363 | first appeared in SSLeay 0.5.2 and have been available since | ||
364 | .Ox 2.4 . | ||
365 | .Sh CAVEATS | ||
366 | In LibreSSL, | ||
367 | .Fn SSL_CTX_set_cipher_list | ||
368 | and | ||
369 | .Fn SSL_set_cipher_list | ||
370 | can be used to configure the list of available cipher suites for | ||
371 | all versions of the TLS protocol, whereas in OpenSSL, they only | ||
372 | control cipher suites for protocols up to TLSv1.2. | ||
373 | If compatibility with OpenSSL is required, the list of | ||
374 | available TLSv1.3 cipher suites can only be changed with | ||
375 | .Fn SSL_set_ciphersuites . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_client_CA_list.3 b/src/lib/libssl/man/SSL_CTX_set_client_CA_list.3 deleted file mode 100644 index d19fb93ed0..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_client_CA_list.3 +++ /dev/null | |||
@@ -1,183 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_client_CA_list.3,v 1.6 2020/03/30 10:28:59 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2000, 2001, 2013 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 30 2020 $ | ||
52 | .Dt SSL_CTX_SET_CLIENT_CA_LIST 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_CTX_set_client_CA_list , | ||
56 | .Nm SSL_set_client_CA_list , | ||
57 | .Nm SSL_CTX_add_client_CA , | ||
58 | .Nm SSL_add_client_CA | ||
59 | .Nd set list of CAs sent to the client when requesting a client certificate | ||
60 | .Sh SYNOPSIS | ||
61 | .In openssl/ssl.h | ||
62 | .Ft void | ||
63 | .Fn SSL_CTX_set_client_CA_list "SSL_CTX *ctx" "STACK_OF(X509_NAME) *list" | ||
64 | .Ft void | ||
65 | .Fn SSL_set_client_CA_list "SSL *s" "STACK_OF(X509_NAME) *list" | ||
66 | .Ft int | ||
67 | .Fn SSL_CTX_add_client_CA "SSL_CTX *ctx" "X509 *cacert" | ||
68 | .Ft int | ||
69 | .Fn SSL_add_client_CA "SSL *ssl" "X509 *cacert" | ||
70 | .Sh DESCRIPTION | ||
71 | .Fn SSL_CTX_set_client_CA_list | ||
72 | sets the | ||
73 | .Fa list | ||
74 | of CAs sent to the client when requesting a client certificate for | ||
75 | .Fa ctx . | ||
76 | .Pp | ||
77 | .Fn SSL_set_client_CA_list | ||
78 | sets the | ||
79 | .Fa list | ||
80 | of CAs sent to the client when requesting a client certificate for the chosen | ||
81 | .Fa ssl , | ||
82 | overriding the setting valid for | ||
83 | .Fa ssl Ns 's | ||
84 | .Vt SSL_CTX | ||
85 | object. | ||
86 | .Pp | ||
87 | .Fn SSL_CTX_add_client_CA | ||
88 | adds the CA name extracted from | ||
89 | .Fa cacert | ||
90 | to the list of CAs sent to the client when requesting a client certificate for | ||
91 | .Fa ctx . | ||
92 | .Pp | ||
93 | .Fn SSL_add_client_CA | ||
94 | adds the CA name extracted from | ||
95 | .Fa cacert | ||
96 | to the list of CAs sent to the client when requesting a client certificate for | ||
97 | the chosen | ||
98 | .Fa ssl , | ||
99 | overriding the setting valid for | ||
100 | .Fa ssl Ns 's | ||
101 | .Va SSL_CTX | ||
102 | object. | ||
103 | .Pp | ||
104 | When a TLS/SSL server requests a client certificate (see | ||
105 | .Fn SSL_CTX_set_verify ) , | ||
106 | it sends a list of CAs for which it will accept certificates to the client. | ||
107 | .Pp | ||
108 | This list must explicitly be set using | ||
109 | .Fn SSL_CTX_set_client_CA_list | ||
110 | for | ||
111 | .Fa ctx | ||
112 | and | ||
113 | .Fn SSL_set_client_CA_list | ||
114 | for the specific | ||
115 | .Fa ssl . | ||
116 | The list specified overrides the previous setting. | ||
117 | The CAs listed do not become trusted | ||
118 | .Po | ||
119 | .Fa list | ||
120 | only contains the names, not the complete certificates | ||
121 | .Pc ; | ||
122 | use | ||
123 | .Xr SSL_CTX_load_verify_locations 3 | ||
124 | to additionally load them for verification. | ||
125 | .Pp | ||
126 | If the list of acceptable CAs is compiled in a file, the | ||
127 | .Xr SSL_load_client_CA_file 3 | ||
128 | function can be used to help importing the necessary data. | ||
129 | .Pp | ||
130 | .Fn SSL_CTX_add_client_CA | ||
131 | and | ||
132 | .Fn SSL_add_client_CA | ||
133 | can be used to add additional items the list of client CAs. | ||
134 | If no list was specified before using | ||
135 | .Fn SSL_CTX_set_client_CA_list | ||
136 | or | ||
137 | .Fn SSL_set_client_CA_list , | ||
138 | a new client CA list for | ||
139 | .Fa ctx | ||
140 | or | ||
141 | .Fa ssl | ||
142 | (as appropriate) is opened. | ||
143 | .Pp | ||
144 | These functions are only useful for TLS/SSL servers. | ||
145 | .Sh RETURN VALUES | ||
146 | .Fn SSL_CTX_add_client_CA | ||
147 | and | ||
148 | .Fn SSL_add_client_CA | ||
149 | have the following return values: | ||
150 | .Bl -tag -width Ds | ||
151 | .It 0 | ||
152 | A failure while manipulating the | ||
153 | .Dv STACK_OF Ns | ||
154 | .Pq Vt X509_NAME | ||
155 | object occurred or the | ||
156 | .Vt X509_NAME | ||
157 | could not be extracted from | ||
158 | .Fa cacert . | ||
159 | Check the error stack to find out the reason. | ||
160 | .It 1 | ||
161 | The operation succeeded. | ||
162 | .El | ||
163 | .Sh EXAMPLES | ||
164 | Scan all certificates in | ||
165 | .Fa CAfile | ||
166 | and list them as acceptable CAs: | ||
167 | .Bd -literal | ||
168 | SSL_CTX_set_client_CA_list(ctx, SSL_load_client_CA_file(CAfile)); | ||
169 | .Ed | ||
170 | .Sh SEE ALSO | ||
171 | .Xr ssl 3 , | ||
172 | .Xr SSL_CTX_load_verify_locations 3 , | ||
173 | .Xr SSL_get_client_CA_list 3 , | ||
174 | .Xr SSL_load_client_CA_file 3 , | ||
175 | .Xr X509_NAME_new 3 | ||
176 | .Sh HISTORY | ||
177 | .Fn SSL_CTX_set_client_CA_list , | ||
178 | .Fn SSL_set_client_CA_list , | ||
179 | .Fn SSL_CTX_add_client_CA , | ||
180 | and | ||
181 | .Fn SSL_add_client_CA | ||
182 | first appeared in SSLeay 0.8.0 and have been available since | ||
183 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 b/src/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 deleted file mode 100644 index a2433b5e92..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 +++ /dev/null | |||
@@ -1,191 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_client_cert_cb.3,v 1.4 2018/03/27 17:35:50 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2002 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 27 2018 $ | ||
52 | .Dt SSL_CTX_SET_CLIENT_CERT_CB 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_CTX_set_client_cert_cb , | ||
56 | .Nm SSL_CTX_get_client_cert_cb | ||
57 | .Nd handle client certificate callback function | ||
58 | .Sh SYNOPSIS | ||
59 | .In openssl/ssl.h | ||
60 | .Ft void | ||
61 | .Fo SSL_CTX_set_client_cert_cb | ||
62 | .Fa "SSL_CTX *ctx" | ||
63 | .Fa "int (*client_cert_cb)(SSL *ssl, X509 **x509, EVP_PKEY **pkey)" | ||
64 | .Fc | ||
65 | .Ft int | ||
66 | .Fo "(*SSL_CTX_get_client_cert_cb(SSL_CTX *ctx))" | ||
67 | .Fa "SSL *ssl" "X509 **x509" "EVP_PKEY **pkey" | ||
68 | .Fc | ||
69 | .Ft int | ||
70 | .Fn "(*client_cert_cb)" "SSL *ssl" "X509 **x509" "EVP_PKEY **pkey" | ||
71 | .Sh DESCRIPTION | ||
72 | .Fn SSL_CTX_set_client_cert_cb | ||
73 | sets the | ||
74 | .Fa client_cert_cb() | ||
75 | callback that is called when a client certificate is requested by a server and | ||
76 | no certificate was yet set for the SSL object. | ||
77 | .Pp | ||
78 | When | ||
79 | .Fa client_cert_cb | ||
80 | is | ||
81 | .Dv NULL , | ||
82 | no callback function is used. | ||
83 | .Pp | ||
84 | .Fn SSL_CTX_get_client_cert_cb | ||
85 | returns a pointer to the currently set callback function. | ||
86 | .Pp | ||
87 | .Fn client_cert_cb | ||
88 | is the application-defined callback. | ||
89 | If it wants to set a certificate, | ||
90 | a certificate/private key combination must be set using the | ||
91 | .Fa x509 | ||
92 | and | ||
93 | .Fa pkey | ||
94 | arguments and 1 must be returned. | ||
95 | The certificate will be installed into | ||
96 | .Fa ssl . | ||
97 | If no certificate should be set, | ||
98 | 0 has to be returned and no certificate will be sent. | ||
99 | A negative return value will suspend the handshake and the handshake function | ||
100 | will return immediately. | ||
101 | .Xr SSL_get_error 3 | ||
102 | will return | ||
103 | .Dv SSL_ERROR_WANT_X509_LOOKUP | ||
104 | to indicate that the handshake was suspended. | ||
105 | The next call to the handshake function will again lead to the call of | ||
106 | .Fa client_cert_cb() . | ||
107 | It is the job of the | ||
108 | .Fa client_cert_cb() | ||
109 | to store information | ||
110 | about the state of the last call, if required to continue. | ||
111 | .Pp | ||
112 | During a handshake (or renegotiation) | ||
113 | a server may request a certificate from the client. | ||
114 | A client certificate must only be sent when the server did send the request. | ||
115 | .Pp | ||
116 | When a certificate has been set using the | ||
117 | .Xr SSL_CTX_use_certificate 3 | ||
118 | family of functions, | ||
119 | it will be sent to the server. | ||
120 | The TLS standard requires that only a certificate is sent if it matches the | ||
121 | list of acceptable CAs sent by the server. | ||
122 | This constraint is violated by the default behavior of the OpenSSL library. | ||
123 | Using the callback function it is possible to implement a proper selection | ||
124 | routine or to allow a user interaction to choose the certificate to be sent. | ||
125 | .Pp | ||
126 | If a callback function is defined and no certificate was yet defined for the | ||
127 | .Vt SSL | ||
128 | object, the callback function will be called. | ||
129 | If the callback function returns a certificate, the OpenSSL library | ||
130 | will try to load the private key and certificate data into the | ||
131 | .Vt SSL | ||
132 | object using the | ||
133 | .Fn SSL_use_certificate | ||
134 | and | ||
135 | .Fn SSL_use_private_key | ||
136 | functions. | ||
137 | Thus it will permanently install the certificate and key for this SSL object. | ||
138 | It will not be reset by calling | ||
139 | .Xr SSL_clear 3 . | ||
140 | If the callback returns no certificate, the OpenSSL library will not send a | ||
141 | certificate. | ||
142 | .Sh SEE ALSO | ||
143 | .Xr ssl 3 , | ||
144 | .Xr SSL_clear 3 , | ||
145 | .Xr SSL_CTX_add_extra_chain_cert 3 , | ||
146 | .Xr SSL_CTX_use_certificate 3 , | ||
147 | .Xr SSL_free 3 , | ||
148 | .Xr SSL_get_client_CA_list 3 | ||
149 | .Sh HISTORY | ||
150 | .Fn SSL_CTX_set_client_cert_cb | ||
151 | and | ||
152 | .Fn SSL_CTX_get_client_cert_cb | ||
153 | first appeared in SSLeay 0.6.6 and have been available since | ||
154 | .Ox 2.4 . | ||
155 | .Sh BUGS | ||
156 | The | ||
157 | .Fa client_cert_cb() | ||
158 | cannot return a complete certificate chain; | ||
159 | it can only return one client certificate. | ||
160 | If the chain only has a length of 2, | ||
161 | the root CA certificate may be omitted according to the TLS standard and | ||
162 | thus a standard conforming answer can be sent to the server. | ||
163 | For a longer chain, the client must send the complete chain | ||
164 | (with the option to leave out the root CA certificate). | ||
165 | This can be accomplished only by either adding the intermediate CA certificates | ||
166 | into the trusted certificate store for the | ||
167 | .Vt SSL_CTX | ||
168 | object (resulting in having to add CA certificates that otherwise maybe would | ||
169 | not be trusted), or by adding the chain certificates using the | ||
170 | .Xr SSL_CTX_add_extra_chain_cert 3 | ||
171 | function, which is only available for the | ||
172 | .Vt SSL_CTX | ||
173 | object as a whole and that therefore probably can only apply for one client | ||
174 | certificate, making the concept of the callback function | ||
175 | (to allow the choice from several certificates) questionable. | ||
176 | .Pp | ||
177 | Once the | ||
178 | .Vt SSL | ||
179 | object has been used in conjunction with the callback function, | ||
180 | the certificate will be set for the | ||
181 | .Vt SSL | ||
182 | object and will not be cleared even when | ||
183 | .Xr SSL_clear 3 | ||
184 | is called. | ||
185 | It is therefore | ||
186 | .Em mandatory | ||
187 | to destroy the | ||
188 | .Vt SSL | ||
189 | object using | ||
190 | .Xr SSL_free 3 | ||
191 | and create a new one to return to the previous state. | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 b/src/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 deleted file mode 100644 index 94b4ea543d..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 +++ /dev/null | |||
@@ -1,216 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_default_passwd_cb.3,v 1.9 2023/09/19 09:40:35 schwarze Exp $ | ||
2 | .\" full merge up to: OpenSSL 9b86974e Aug 17 15:21:33 2015 -0400 | ||
3 | .\" selective merge up to: OpenSSL 18bad535 Apr 9 15:13:55 2019 +0100 | ||
4 | .\" | ||
5 | .\" This file is a derived work. | ||
6 | .\" The changes are covered by the following Copyright and license: | ||
7 | .\" | ||
8 | .\" Copyright (c) 2023 Ingo Schwarze <schwarze@openbsd.org> | ||
9 | .\" | ||
10 | .\" Permission to use, copy, modify, and distribute this software for any | ||
11 | .\" purpose with or without fee is hereby granted, provided that the above | ||
12 | .\" copyright notice and this permission notice appear in all copies. | ||
13 | .\" | ||
14 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
15 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
16 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
17 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
18 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
19 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
20 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
21 | .\" | ||
22 | .\" The original file was written by Lutz Jaenicke <jaenicke@openssl.org> | ||
23 | .\" and Christian Heimes <cheimes@redhat.com>. | ||
24 | .\" Copyright (c) 2000, 2001, 2016 The OpenSSL Project. All rights reserved. | ||
25 | .\" | ||
26 | .\" Redistribution and use in source and binary forms, with or without | ||
27 | .\" modification, are permitted provided that the following conditions | ||
28 | .\" are met: | ||
29 | .\" | ||
30 | .\" 1. Redistributions of source code must retain the above copyright | ||
31 | .\" notice, this list of conditions and the following disclaimer. | ||
32 | .\" | ||
33 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
34 | .\" notice, this list of conditions and the following disclaimer in | ||
35 | .\" the documentation and/or other materials provided with the | ||
36 | .\" distribution. | ||
37 | .\" | ||
38 | .\" 3. All advertising materials mentioning features or use of this | ||
39 | .\" software must display the following acknowledgment: | ||
40 | .\" "This product includes software developed by the OpenSSL Project | ||
41 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
42 | .\" | ||
43 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
44 | .\" endorse or promote products derived from this software without | ||
45 | .\" prior written permission. For written permission, please contact | ||
46 | .\" openssl-core@openssl.org. | ||
47 | .\" | ||
48 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
49 | .\" nor may "OpenSSL" appear in their names without prior written | ||
50 | .\" permission of the OpenSSL Project. | ||
51 | .\" | ||
52 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
53 | .\" acknowledgment: | ||
54 | .\" "This product includes software developed by the OpenSSL Project | ||
55 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
56 | .\" | ||
57 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
58 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
59 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
60 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
61 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
62 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
63 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
64 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
65 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
66 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
67 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
68 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
69 | .\" | ||
70 | .Dd $Mdocdate: September 19 2023 $ | ||
71 | .Dt SSL_CTX_SET_DEFAULT_PASSWD_CB 3 | ||
72 | .Os | ||
73 | .Sh NAME | ||
74 | .Nm SSL_CTX_set_default_passwd_cb , | ||
75 | .Nm SSL_CTX_set_default_passwd_cb_userdata , | ||
76 | .Nm SSL_CTX_get_default_passwd_cb , | ||
77 | .Nm SSL_CTX_get_default_passwd_cb_userdata | ||
78 | .Nd set or get passwd callback for encrypted PEM file handling | ||
79 | .Sh SYNOPSIS | ||
80 | .In openssl/ssl.h | ||
81 | .Ft void | ||
82 | .Fn SSL_CTX_set_default_passwd_cb "SSL_CTX *ctx" "pem_password_cb *cb" | ||
83 | .Ft void | ||
84 | .Fn SSL_CTX_set_default_passwd_cb_userdata "SSL_CTX *ctx" "void *userdata" | ||
85 | .Ft pem_password_cb * | ||
86 | .Fn SSL_CTX_get_default_passwd_cb "SSL_CTX *ctx" | ||
87 | .Ft void * | ||
88 | .Fn SSL_CTX_get_default_passwd_cb_userdata "SSL_CTX *ctx" | ||
89 | .Sh DESCRIPTION | ||
90 | .Fn SSL_CTX_set_default_passwd_cb | ||
91 | sets the password callback for loading a certificate or private key | ||
92 | from encrypted PEM format. | ||
93 | In particular, the callback is used by | ||
94 | .Xr SSL_CTX_use_certificate_file 3 , | ||
95 | .Xr SSL_use_certificate_file 3 , | ||
96 | .Xr SSL_CTX_use_certificate_chain_file 3 , | ||
97 | .Xr SSL_use_certificate_chain_file 3 , | ||
98 | .Xr SSL_CTX_use_certificate_chain_mem 3 , | ||
99 | .Xr SSL_CTX_use_PrivateKey_file 3 , | ||
100 | .Xr SSL_use_PrivateKey_file 3 , | ||
101 | .Xr SSL_CTX_use_RSAPrivateKey_file 3 , | ||
102 | and | ||
103 | .Xr SSL_use_RSAPrivateKey_file 3 . | ||
104 | .Pp | ||
105 | The function pointer type of the | ||
106 | .Fa cb | ||
107 | argument is documented in the | ||
108 | .Xr pem_password_cb 3 | ||
109 | manual page. | ||
110 | If | ||
111 | .Fn SSL_CTX_set_default_passwd_cb | ||
112 | is not called on | ||
113 | .Fa ctx | ||
114 | or if it is called with a | ||
115 | .Fa cb | ||
116 | argument of | ||
117 | .Dv NULL , | ||
118 | .Xr PEM_def_callback 3 | ||
119 | is used instead. | ||
120 | .Pp | ||
121 | .Fn SSL_CTX_set_default_passwd_cb_userdata | ||
122 | sets a pointer to the | ||
123 | .Fa userdata | ||
124 | which will be provided to the password callback on invocation. | ||
125 | .Pp | ||
126 | Since the | ||
127 | .Fa cb | ||
128 | passed to | ||
129 | .Fn SSL_CTX_set_default_passwd_cb | ||
130 | will only be used for reading and decryption and not for writing and | ||
131 | encryption, the library will only call it with a | ||
132 | .Fa verify | ||
133 | argument of 0. | ||
134 | .Pp | ||
135 | If an application program only needs to read and decrypt | ||
136 | one single private key, it can be practical to have the | ||
137 | callback handle the password dialog interactively. | ||
138 | This happens by default if neither | ||
139 | .Fn SSL_CTX_set_default_passwd_cb | ||
140 | nor | ||
141 | .Fn SSL_CTX_set_default_passwd_cb_userdata | ||
142 | is called. | ||
143 | In that case, the library uses | ||
144 | .Xr PEM_def_callback 3 | ||
145 | with a | ||
146 | .Fa userdata | ||
147 | argument of | ||
148 | .Dv NULL . | ||
149 | .Pp | ||
150 | If several keys have to be handled, it can be practical | ||
151 | to ask for the password once, for example using | ||
152 | .Xr UI_UTIL_read_pw_string 3 , | ||
153 | then keep it in memory and use it several times by passing a pointer to it to | ||
154 | .Fn SSL_CTX_set_default_passwd_cb_userdata . | ||
155 | .Xr PEM_def_callback 3 | ||
156 | is able to handle this case, too, so calling | ||
157 | .Fn SSL_CTX_set_default_passwd_cb | ||
158 | is not needed in this case either. | ||
159 | .Pp | ||
160 | Other items in PEM formatting (certificates) can also be encrypted; it is | ||
161 | however atypical, as certificate information is considered public. | ||
162 | .Sh RETURN VALUES | ||
163 | .Fn SSL_CTX_get_default_passwd_cb | ||
164 | returns a function pointer to the password callback currently set in | ||
165 | .Fa ctx , | ||
166 | or | ||
167 | .Dv NULL | ||
168 | if none is set. | ||
169 | .Pp | ||
170 | .Fn SSL_CTX_get_default_passwd_cb_userdata | ||
171 | returns a pointer to the userdata currently set in | ||
172 | .Fa ctx , | ||
173 | or | ||
174 | .Dv NULL | ||
175 | if none is set. | ||
176 | .Sh EXAMPLES | ||
177 | The following example provides a subset of the functionality of | ||
178 | .Xr PEM_def_callback 3 , | ||
179 | except that | ||
180 | .Xr PEM_def_callback 3 | ||
181 | does not NUL-terminate and copies up to | ||
182 | .Fa size | ||
183 | rather than | ||
184 | .Fa size No \- 1 | ||
185 | bytes. | ||
186 | It interprets | ||
187 | .Fa userdata | ||
188 | as a NUL-terminated string and copies it to the | ||
189 | .Fa password | ||
190 | buffer, truncating the copy if it does not fit. | ||
191 | .Bd -literal | ||
192 | int | ||
193 | trivial_passwd_cb(char *password, int size, int verify, void *userdata) | ||
194 | { | ||
195 | strlcpy(password, userdata, size); | ||
196 | return strlen(password); | ||
197 | } | ||
198 | .Ed | ||
199 | .Sh SEE ALSO | ||
200 | .Xr pem_password_cb 3 , | ||
201 | .Xr ssl 3 , | ||
202 | .Xr SSL_CTX_use_certificate 3 | ||
203 | .Sh HISTORY | ||
204 | .Fn SSL_CTX_set_default_passwd_cb | ||
205 | first appeared in SSLeay 0.6.2 and has been available since | ||
206 | .Ox 2.4 . | ||
207 | .Pp | ||
208 | .Fn SSL_CTX_set_default_passwd_cb_userdata | ||
209 | first appeared in OpenSSL 0.9.4 and has been available since | ||
210 | .Ox 2.6 . | ||
211 | .Pp | ||
212 | .Fn SSL_CTX_get_default_passwd_cb | ||
213 | and | ||
214 | .Fn SSL_CTX_get_default_passwd_cb_userdata | ||
215 | first appeared in OpenSSL 1.1.0 and have been available since | ||
216 | .Ox 6.3 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_generate_session_id.3 b/src/lib/libssl/man/SSL_CTX_set_generate_session_id.3 deleted file mode 100644 index d85383d776..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_generate_session_id.3 +++ /dev/null | |||
@@ -1,221 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_generate_session_id.3,v 1.5 2018/03/22 21:09:18 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001, 2014 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 22 2018 $ | ||
52 | .Dt SSL_CTX_SET_GENERATE_SESSION_ID 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_CTX_set_generate_session_id , | ||
56 | .Nm SSL_set_generate_session_id , | ||
57 | .Nm SSL_has_matching_session_id , | ||
58 | .Nm GEN_SESSION_CB | ||
59 | .Nd manipulate generation of SSL session IDs (server only) | ||
60 | .Sh SYNOPSIS | ||
61 | .In openssl/ssl.h | ||
62 | .Ft typedef int | ||
63 | .Fo (*GEN_SESSION_CB) | ||
64 | .Fa "const SSL *ssl" | ||
65 | .Fa "unsigned char *id" | ||
66 | .Fa "unsigned int *id_len" | ||
67 | .Fc | ||
68 | .Ft int | ||
69 | .Fn SSL_CTX_set_generate_session_id "SSL_CTX *ctx" "GEN_SESSION_CB cb" | ||
70 | .Ft int | ||
71 | .Fn SSL_set_generate_session_id "SSL *ssl" "GEN_SESSION_CB cb" | ||
72 | .Ft int | ||
73 | .Fo SSL_has_matching_session_id | ||
74 | .Fa "const SSL *ssl" "const unsigned char *id" "unsigned int id_len" | ||
75 | .Fc | ||
76 | .Sh DESCRIPTION | ||
77 | .Fn SSL_CTX_set_generate_session_id | ||
78 | sets the callback function for generating new session ids for SSL/TLS sessions | ||
79 | for | ||
80 | .Fa ctx | ||
81 | to be | ||
82 | .Fa cb . | ||
83 | .Pp | ||
84 | .Fn SSL_set_generate_session_id | ||
85 | sets the callback function for generating new session ids for SSL/TLS sessions | ||
86 | for | ||
87 | .Fa ssl | ||
88 | to be | ||
89 | .Fa cb . | ||
90 | .Pp | ||
91 | .Fn SSL_has_matching_session_id | ||
92 | checks, whether a session with id | ||
93 | .Fa id | ||
94 | (of length | ||
95 | .Fa id_len ) | ||
96 | is already contained in the internal session cache | ||
97 | of the parent context of | ||
98 | .Fa ssl . | ||
99 | .Pp | ||
100 | When a new session is established between client and server, | ||
101 | the server generates a session id. | ||
102 | The session id is an arbitrary sequence of bytes. | ||
103 | The length of the session id is between 1 and 32 bytes. | ||
104 | The session id is not security critical but must be unique for the server. | ||
105 | Additionally, the session id is transmitted in the clear when reusing the | ||
106 | session so it must not contain sensitive information. | ||
107 | .Pp | ||
108 | Without a callback being set, an OpenSSL server will generate a unique session | ||
109 | id from pseudo random numbers of the maximum possible length. | ||
110 | Using the callback function, the session id can be changed to contain | ||
111 | additional information like, e.g., a host id in order to improve load balancing | ||
112 | or external caching techniques. | ||
113 | .Pp | ||
114 | The callback function receives a pointer to the memory location to put | ||
115 | .Fa id | ||
116 | into and a pointer to the maximum allowed length | ||
117 | .Fa id_len . | ||
118 | The buffer at location | ||
119 | .Fa id | ||
120 | is only guaranteed to have the size | ||
121 | .Fa id_len . | ||
122 | The callback is only allowed to generate a shorter id and reduce | ||
123 | .Fa id_len ; | ||
124 | the callback | ||
125 | .Em must never | ||
126 | increase | ||
127 | .Fa id_len | ||
128 | or write to the location | ||
129 | .Fa id | ||
130 | exceeding the given limit. | ||
131 | .Pp | ||
132 | The location | ||
133 | .Fa id | ||
134 | is filled with 0x00 before the callback is called, | ||
135 | so the callback may only fill part of the possible length and leave | ||
136 | .Fa id_len | ||
137 | untouched while maintaining reproducibility. | ||
138 | .Pp | ||
139 | Since the sessions must be distinguished, session ids must be unique. | ||
140 | Without the callback a random number is used, | ||
141 | so that the probability of generating the same session id is extremely small | ||
142 | (2^256 for TLSv1). | ||
143 | In order to ensure the uniqueness of the generated session id, | ||
144 | the callback must call | ||
145 | .Fn SSL_has_matching_session_id | ||
146 | and generate another id if a conflict occurs. | ||
147 | If an id conflict is not resolved, the handshake will fail. | ||
148 | If the application codes, e.g., a unique host id, a unique process number, and | ||
149 | a unique sequence number into the session id, uniqueness could easily be | ||
150 | achieved without randomness added (it should however be taken care that | ||
151 | no confidential information is leaked this way). | ||
152 | If the application cannot guarantee uniqueness, | ||
153 | it is recommended to use the maximum | ||
154 | .Fa id_len | ||
155 | and fill in the bytes not used to code special information with random data to | ||
156 | avoid collisions. | ||
157 | .Pp | ||
158 | .Fn SSL_has_matching_session_id | ||
159 | will only query the internal session cache, not the external one. | ||
160 | Since the session id is generated before the handshake is completed, | ||
161 | it is not immediately added to the cache. | ||
162 | If another thread is using the same internal session cache, | ||
163 | a race condition can occur in that another thread generates the same session id. | ||
164 | Collisions can also occur when using an external session cache, | ||
165 | since the external cache is not tested with | ||
166 | .Fn SSL_has_matching_session_id | ||
167 | and the same race condition applies. | ||
168 | .Pp | ||
169 | The callback must return 0 if it cannot generate a session id for whatever | ||
170 | reason and return 1 on success. | ||
171 | .Sh RETURN VALUES | ||
172 | .Fn SSL_CTX_set_generate_session_id | ||
173 | and | ||
174 | .Fn SSL_set_generate_session_id | ||
175 | always return 1. | ||
176 | .Pp | ||
177 | .Fn SSL_has_matching_session_id | ||
178 | returns 1 if another session with the same id is already in the cache. | ||
179 | .Sh EXAMPLES | ||
180 | The callback function listed will generate a session id with the server id | ||
181 | given, and will fill the rest with pseudo random bytes: | ||
182 | .Bd -literal | ||
183 | const char session_id_prefix = "www-18"; | ||
184 | |||
185 | #define MAX_SESSION_ID_ATTEMPTS 10 | ||
186 | static int | ||
187 | generate_session_id(const SSL *ssl, unsigned char *id, | ||
188 | unsigned int *id_len) | ||
189 | { | ||
190 | unsigned int count = 0; | ||
191 | |||
192 | do { | ||
193 | RAND_pseudo_bytes(id, *id_len); | ||
194 | /* | ||
195 | * Prefix the session_id with the required prefix. NB: If | ||
196 | * our prefix is too long, clip it \(en but there will be | ||
197 | * worse effects anyway, e.g., the server could only | ||
198 | * possibly create one session ID (the prefix!) so all | ||
199 | * future session negotiations will fail due to conflicts. | ||
200 | */ | ||
201 | memcpy(id, session_id_prefix, | ||
202 | (strlen(session_id_prefix) < *id_len) ? | ||
203 | strlen(session_id_prefix) : *id_len); | ||
204 | } while (SSL_has_matching_session_id(ssl, id, *id_len) && | ||
205 | (++count < MAX_SESSION_ID_ATTEMPTS)); | ||
206 | |||
207 | if (count >= MAX_SESSION_ID_ATTEMPTS) | ||
208 | return 0; | ||
209 | return 1; | ||
210 | } | ||
211 | .Ed | ||
212 | .Sh SEE ALSO | ||
213 | .Xr ssl 3 , | ||
214 | .Xr SSL_get_version 3 | ||
215 | .Sh HISTORY | ||
216 | .Fn SSL_CTX_set_generate_session_id , | ||
217 | .Fn SSL_set_generate_session_id | ||
218 | and | ||
219 | .Fn SSL_has_matching_session_id | ||
220 | first appeared in OpenSSL 0.9.7 and have been available since | ||
221 | .Ox 3.2 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_info_callback.3 b/src/lib/libssl/man/SSL_CTX_set_info_callback.3 deleted file mode 100644 index 76eb8bee61..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_info_callback.3 +++ /dev/null | |||
@@ -1,233 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_info_callback.3,v 1.4 2018/03/27 17:35:50 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001, 2005, 2014 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 27 2018 $ | ||
52 | .Dt SSL_CTX_SET_INFO_CALLBACK 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_CTX_set_info_callback , | ||
56 | .Nm SSL_CTX_get_info_callback , | ||
57 | .Nm SSL_set_info_callback , | ||
58 | .Nm SSL_get_info_callback | ||
59 | .Nd handle information callback for SSL connections | ||
60 | .Sh SYNOPSIS | ||
61 | .In openssl/ssl.h | ||
62 | .Ft void | ||
63 | .Fo SSL_CTX_set_info_callback | ||
64 | .Fa "SSL_CTX *ctx" | ||
65 | .Fa "void (*callback)(const SSL *ssl, int where, int ret)" | ||
66 | .Fc | ||
67 | .Ft void | ||
68 | .Fo "(*SSL_CTX_get_info_callback(const SSL_CTX *ctx))" | ||
69 | .Fa "const SSL *ssl" | ||
70 | .Fa "int where" | ||
71 | .Fa "int ret" | ||
72 | .Fc | ||
73 | .Ft void | ||
74 | .Fo SSL_set_info_callback | ||
75 | .Fa "SSL *ssl" | ||
76 | .Fa "void (*callback)(const SSL *ssl, int where, int ret)" | ||
77 | .Fc | ||
78 | .Ft void | ||
79 | .Fo "(*SSL_get_info_callback(const SSL *ssl))" | ||
80 | .Fa "const SSL *ssl" | ||
81 | .Fa "int where" | ||
82 | .Fa "int ret" | ||
83 | .Fc | ||
84 | .Sh DESCRIPTION | ||
85 | .Fn SSL_CTX_set_info_callback | ||
86 | sets the | ||
87 | .Fa callback | ||
88 | function that can be used to obtain state information for SSL objects created | ||
89 | from | ||
90 | .Fa ctx | ||
91 | during connection setup and use. | ||
92 | The setting for | ||
93 | .Fa ctx | ||
94 | is overridden from the setting for a specific SSL object, if specified. | ||
95 | When | ||
96 | .Fa callback | ||
97 | is | ||
98 | .Dv NULL , | ||
99 | no callback function is used. | ||
100 | .Pp | ||
101 | .Fn SSL_set_info_callback | ||
102 | sets the | ||
103 | .Fa callback | ||
104 | function that can be used to | ||
105 | obtain state information for | ||
106 | .Fa ssl | ||
107 | during connection setup and use. | ||
108 | When | ||
109 | .Fa callback | ||
110 | is | ||
111 | .Dv NULL , | ||
112 | the callback setting currently valid for | ||
113 | .Fa ctx | ||
114 | is used. | ||
115 | .Pp | ||
116 | .Fn SSL_CTX_get_info_callback | ||
117 | returns a pointer to the currently set information callback function for | ||
118 | .Fa ctx . | ||
119 | .Pp | ||
120 | .Fn SSL_get_info_callback | ||
121 | returns a pointer to the currently set information callback function for | ||
122 | .Fa ssl . | ||
123 | .Pp | ||
124 | When setting up a connection and during use, | ||
125 | it is possible to obtain state information from the SSL/TLS engine. | ||
126 | When set, an information callback function is called whenever the state changes, | ||
127 | an alert appears, or an error occurs. | ||
128 | .Pp | ||
129 | The callback function is called as | ||
130 | .Fn callback "SSL *ssl" "int where" "int ret" . | ||
131 | The | ||
132 | .Fa where | ||
133 | argument specifies information about where (in which context) | ||
134 | the callback function was called. | ||
135 | If | ||
136 | .Fa ret | ||
137 | is 0, an error condition occurred. | ||
138 | If an alert is handled, | ||
139 | .Dv SSL_CB_ALERT | ||
140 | is set and | ||
141 | .Fa ret | ||
142 | specifies the alert information. | ||
143 | .Pp | ||
144 | .Fa where | ||
145 | is a bitmask made up of the following bits: | ||
146 | .Bl -tag -width Ds | ||
147 | .It Dv SSL_CB_LOOP | ||
148 | Callback has been called to indicate state change inside a loop. | ||
149 | .It Dv SSL_CB_EXIT | ||
150 | Callback has been called to indicate error exit of a handshake function. | ||
151 | (May be soft error with retry option for non-blocking setups.) | ||
152 | .It Dv SSL_CB_READ | ||
153 | Callback has been called during read operation. | ||
154 | .It Dv SSL_CB_WRITE | ||
155 | Callback has been called during write operation. | ||
156 | .It Dv SSL_CB_ALERT | ||
157 | Callback has been called due to an alert being sent or received. | ||
158 | .It Dv SSL_CB_READ_ALERT | ||
159 | .It Dv SSL_CB_WRITE_ALERT | ||
160 | .It Dv SSL_CB_ACCEPT_LOOP | ||
161 | .It Dv SSL_CB_ACCEPT_EXIT | ||
162 | .It Dv SSL_CB_CONNECT_LOOP | ||
163 | .It Dv SSL_CB_CONNECT_EXIT | ||
164 | .It Dv SSL_CB_HANDSHAKE_START | ||
165 | Callback has been called because a new handshake is started. | ||
166 | .It Dv SSL_CB_HANDSHAKE_DONE | ||
167 | Callback has been called because a handshake is finished. | ||
168 | .El | ||
169 | .Pp | ||
170 | The current state information can be obtained using the | ||
171 | .Xr SSL_state_string 3 | ||
172 | family of functions. | ||
173 | .Pp | ||
174 | The | ||
175 | .Fa ret | ||
176 | information can be evaluated using the | ||
177 | .Xr SSL_alert_type_string 3 | ||
178 | family of functions. | ||
179 | .Sh RETURN VALUES | ||
180 | .Fn SSL_CTX_get_info_callback | ||
181 | and | ||
182 | .Fn SSL_get_info_callback | ||
183 | return a pointer to the current callback or | ||
184 | .Dv NULL | ||
185 | if none is set. | ||
186 | .Sh EXAMPLES | ||
187 | The following example callback function prints state strings, | ||
188 | information about alerts being handled and error messages to the | ||
189 | .Va bio_err | ||
190 | .Vt BIO . | ||
191 | .Bd -literal | ||
192 | void | ||
193 | apps_ssl_info_callback(SSL *s, int where, int ret) | ||
194 | { | ||
195 | const char *str; | ||
196 | int w; | ||
197 | |||
198 | w = where & ~SSL_ST_MASK; | ||
199 | |||
200 | if (w & SSL_ST_CONNECT) | ||
201 | str = "SSL_connect"; | ||
202 | else if (w & SSL_ST_ACCEPT) | ||
203 | str = "SSL_accept"; | ||
204 | else | ||
205 | str = "undefined"; | ||
206 | |||
207 | if (where & SSL_CB_LOOP) { | ||
208 | BIO_printf(bio_err, "%s:%s\en", str, | ||
209 | SSL_state_string_long(s)); | ||
210 | } else if (where & SSL_CB_ALERT) { | ||
211 | str = (where & SSL_CB_READ) ? "read" : "write"; | ||
212 | BIO_printf(bio_err, "SSL3 alert %s:%s:%s\en", str, | ||
213 | SSL_alert_type_string_long(ret), | ||
214 | SSL_alert_desc_string_long(ret)); | ||
215 | } else if (where & SSL_CB_EXIT) { | ||
216 | if (ret == 0) | ||
217 | BIO_printf(bio_err, "%s:failed in %s\en", | ||
218 | str, SSL_state_string_long(s)); | ||
219 | else if (ret < 0) { | ||
220 | BIO_printf(bio_err, "%s:error in %s\en", | ||
221 | str, SSL_state_string_long(s)); | ||
222 | } | ||
223 | } | ||
224 | } | ||
225 | .Ed | ||
226 | .Sh SEE ALSO | ||
227 | .Xr ssl 3 , | ||
228 | .Xr SSL_alert_type_string 3 , | ||
229 | .Xr SSL_state_string 3 | ||
230 | .Sh HISTORY | ||
231 | These functions first appeared in SSLeay 0.6.0 | ||
232 | and have been available since | ||
233 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_keylog_callback.3 b/src/lib/libssl/man/SSL_CTX_set_keylog_callback.3 deleted file mode 100644 index 24b8f9992f..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_keylog_callback.3 +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_keylog_callback.3,v 1.3 2024/05/16 08:39:30 tb Exp $ | ||
2 | .\" OpenSSL pod checked up to: 61f805c1 Jan 16 01:01:46 2018 +0800 | ||
3 | .\" | ||
4 | .\" Copyright (c) 2021 Bob Beck <beck@openbsd.org> | ||
5 | .\" | ||
6 | .\" Permission to use, copy, modify, and distribute this software for any | ||
7 | .\" purpose with or without fee is hereby granted, provided that the above | ||
8 | .\" copyright notice and this permission notice appear in all copies. | ||
9 | .\" | ||
10 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
11 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
12 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
13 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
14 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
15 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
16 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
17 | .\" | ||
18 | .Dd $Mdocdate: May 16 2024 $ | ||
19 | .Dt SSL_CTX_SET_KEYLOG_CALLBACK 3 | ||
20 | .Os | ||
21 | .Sh NAME | ||
22 | .Nm SSL_CTX_set_keylog_callback , | ||
23 | .Nm SSL_CTX_get_keylog_callback | ||
24 | .Nd set and get the unused key logging callback | ||
25 | .Sh SYNOPSIS | ||
26 | .In openssl/ssl.h | ||
27 | .Ft typedef void | ||
28 | .Fo (*SSL_CTX_keylog_cb_func) | ||
29 | .Fa "const SSL *ssl" | ||
30 | .Fa "const char *line" | ||
31 | .Fc | ||
32 | .Ft void | ||
33 | .Fn SSL_CTX_set_keylog_callback "SSL_CTX *ctx" "SSL_CTX_keylog_cb_func cb" | ||
34 | .Ft SSL_CTX_keylog_cb_func | ||
35 | .Fn SSL_CTX_get_keylog_callback "const SSL_CTX *ctx" | ||
36 | .Sh DESCRIPTION | ||
37 | .Fn SSL_CTX_set_keylog_callback | ||
38 | sets the TLS key logging callback. | ||
39 | This callback is never called in LibreSSL. | ||
40 | .Pp | ||
41 | .Fn SSL_CTX_get_keylog_callback | ||
42 | retrieves the previously set TLS key logging callback. | ||
43 | .Pp | ||
44 | These functions are provided only for compatibility with OpenSSL. | ||
45 | .Sh RETURN VALUES | ||
46 | .Fn SSL_CTX_get_keylog_callback | ||
47 | returns the previously set TLS key logging callback, or | ||
48 | .Dv NULL | ||
49 | if no callback has been set. | ||
50 | .Sh SEE ALSO | ||
51 | .Xr ssl 3 , | ||
52 | .Xr SSL_CTX_new 3 | ||
53 | .Sh HISTORY | ||
54 | These function first appeared in OpenSSL 1.1.1 | ||
55 | and have been available since | ||
56 | .Ox 7.1 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_max_cert_list.3 b/src/lib/libssl/man/SSL_CTX_set_max_cert_list.3 deleted file mode 100644 index 89513b1006..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_max_cert_list.3 +++ /dev/null | |||
@@ -1,154 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_max_cert_list.3,v 1.6 2019/06/12 09:36:30 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: June 12 2019 $ | ||
52 | .Dt SSL_CTX_SET_MAX_CERT_LIST 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_CTX_set_max_cert_list , | ||
56 | .Nm SSL_CTX_get_max_cert_list , | ||
57 | .Nm SSL_set_max_cert_list , | ||
58 | .Nm SSL_get_max_cert_list | ||
59 | .Nd manipulate allowed size for the peer's certificate chain | ||
60 | .Sh SYNOPSIS | ||
61 | .In openssl/ssl.h | ||
62 | .Ft long | ||
63 | .Fn SSL_CTX_set_max_cert_list "SSL_CTX *ctx" "long size" | ||
64 | .Ft long | ||
65 | .Fn SSL_CTX_get_max_cert_list "SSL_CTX *ctx" | ||
66 | .Ft long | ||
67 | .Fn SSL_set_max_cert_list "SSL *ssl" "long size" | ||
68 | .Ft long | ||
69 | .Fn SSL_get_max_cert_list "SSL *ctx" | ||
70 | .Sh DESCRIPTION | ||
71 | .Fn SSL_CTX_set_max_cert_list | ||
72 | sets the maximum size allowed for the peer's certificate chain for all | ||
73 | .Vt SSL | ||
74 | objects created from | ||
75 | .Fa ctx | ||
76 | to be | ||
77 | .Fa size | ||
78 | bytes. | ||
79 | The | ||
80 | .Vt SSL | ||
81 | objects inherit the setting valid for | ||
82 | .Fa ctx | ||
83 | at the time | ||
84 | .Xr SSL_new 3 | ||
85 | is being called. | ||
86 | .Pp | ||
87 | .Fn SSL_CTX_get_max_cert_list | ||
88 | returns the currently set maximum size for | ||
89 | .Fa ctx . | ||
90 | .Pp | ||
91 | .Fn SSL_set_max_cert_list | ||
92 | sets the maximum size allowed for the peer's certificate chain for | ||
93 | .Fa ssl | ||
94 | to be | ||
95 | .Fa size | ||
96 | bytes. | ||
97 | This setting stays valid until a new value is set. | ||
98 | .Pp | ||
99 | .Fn SSL_get_max_cert_list | ||
100 | returns the currently set maximum size for | ||
101 | .Fa ssl . | ||
102 | .Pp | ||
103 | During the handshake process, the peer may send a certificate chain. | ||
104 | The TLS/SSL standard does not give any maximum size of the certificate chain. | ||
105 | The OpenSSL library handles incoming data by a dynamically allocated buffer. | ||
106 | In order to prevent this buffer from growing without bound due to data | ||
107 | received from a faulty or malicious peer, a maximum size for the certificate | ||
108 | chain is set. | ||
109 | .Pp | ||
110 | The default value for the maximum certificate chain size is 100kB (30kB | ||
111 | on the 16bit DOS platform). | ||
112 | This should be sufficient for usual certificate chains | ||
113 | (OpenSSL's default maximum chain length is 10, see | ||
114 | .Xr SSL_CTX_set_verify 3 , | ||
115 | and certificates without special extensions have a typical size of 1-2kB). | ||
116 | .Pp | ||
117 | For special applications it can be necessary to extend the maximum certificate | ||
118 | chain size allowed to be sent by the peer. | ||
119 | See for example the work on | ||
120 | .%T "Internet X.509 Public Key Infrastructure Proxy Certificate Profile" | ||
121 | and | ||
122 | .%T "TLS Delegation Protocol" | ||
123 | at | ||
124 | .Lk https://www.ietf.org/ | ||
125 | and | ||
126 | .Lk http://www.globus.org/ . | ||
127 | .Pp | ||
128 | Under normal conditions it should never be necessary to set a value smaller | ||
129 | than the default, as the buffer is handled dynamically and only uses the | ||
130 | memory actually required by the data sent by the peer. | ||
131 | .Pp | ||
132 | If the maximum certificate chain size allowed is exceeded, the handshake will | ||
133 | fail with a | ||
134 | .Dv SSL_R_EXCESSIVE_MESSAGE_SIZE | ||
135 | error. | ||
136 | .Sh RETURN VALUES | ||
137 | .Fn SSL_CTX_set_max_cert_list | ||
138 | and | ||
139 | .Fn SSL_set_max_cert_list | ||
140 | return the previously set value. | ||
141 | .Pp | ||
142 | .Fn SSL_CTX_get_max_cert_list | ||
143 | and | ||
144 | .Fn SSL_get_max_cert_list | ||
145 | return the currently set value. | ||
146 | .Sh SEE ALSO | ||
147 | .Xr ssl 3 , | ||
148 | .Xr SSL_CTX_ctrl 3 , | ||
149 | .Xr SSL_CTX_set_verify 3 , | ||
150 | .Xr SSL_new 3 | ||
151 | .Sh HISTORY | ||
152 | These functions first appeared in OpenSSL 0.9.7 | ||
153 | and have been available since | ||
154 | .Ox 3.2 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_min_proto_version.3 b/src/lib/libssl/man/SSL_CTX_set_min_proto_version.3 deleted file mode 100644 index a2597cda83..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_min_proto_version.3 +++ /dev/null | |||
@@ -1,156 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_min_proto_version.3,v 1.5 2021/04/15 16:40:32 tb Exp $ | ||
2 | .\" full merge up to: OpenSSL 3edabd3c Sep 14 09:28:39 2017 +0200 | ||
3 | .\" | ||
4 | .\" This file was written by Kurt Roeckx <kurt@roeckx.be> and | ||
5 | .\" Christian Heimes <christian@python.org>. | ||
6 | .\" Copyright (c) 2015, 2017 The OpenSSL Project. All rights reserved. | ||
7 | .\" | ||
8 | .\" Redistribution and use in source and binary forms, with or without | ||
9 | .\" modification, are permitted provided that the following conditions | ||
10 | .\" are met: | ||
11 | .\" | ||
12 | .\" 1. Redistributions of source code must retain the above copyright | ||
13 | .\" notice, this list of conditions and the following disclaimer. | ||
14 | .\" | ||
15 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
16 | .\" notice, this list of conditions and the following disclaimer in | ||
17 | .\" the documentation and/or other materials provided with the | ||
18 | .\" distribution. | ||
19 | .\" | ||
20 | .\" 3. All advertising materials mentioning features or use of this | ||
21 | .\" software must display the following acknowledgment: | ||
22 | .\" "This product includes software developed by the OpenSSL Project | ||
23 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
24 | .\" | ||
25 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | .\" endorse or promote products derived from this software without | ||
27 | .\" prior written permission. For written permission, please contact | ||
28 | .\" openssl-core@openssl.org. | ||
29 | .\" | ||
30 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
31 | .\" nor may "OpenSSL" appear in their names without prior written | ||
32 | .\" permission of the OpenSSL Project. | ||
33 | .\" | ||
34 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
35 | .\" acknowledgment: | ||
36 | .\" "This product includes software developed by the OpenSSL Project | ||
37 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
38 | .\" | ||
39 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | .\" | ||
52 | .Dd $Mdocdate: April 15 2021 $ | ||
53 | .Dt SSL_CTX_SET_MIN_PROTO_VERSION 3 | ||
54 | .Os | ||
55 | .Sh NAME | ||
56 | .Nm SSL_CTX_set_min_proto_version , | ||
57 | .Nm SSL_CTX_set_max_proto_version , | ||
58 | .Nm SSL_CTX_get_min_proto_version , | ||
59 | .Nm SSL_CTX_get_max_proto_version , | ||
60 | .Nm SSL_set_min_proto_version , | ||
61 | .Nm SSL_set_max_proto_version , | ||
62 | .Nm SSL_get_min_proto_version , | ||
63 | .Nm SSL_get_max_proto_version | ||
64 | .Nd get and set minimum and maximum supported protocol version | ||
65 | .Sh SYNOPSIS | ||
66 | .In openssl/ssl.h | ||
67 | .Ft int | ||
68 | .Fo SSL_CTX_set_min_proto_version | ||
69 | .Fa "SSL_CTX *ctx" | ||
70 | .Fa "uint16_t version" | ||
71 | .Fc | ||
72 | .Ft int | ||
73 | .Fo SSL_CTX_set_max_proto_version | ||
74 | .Fa "SSL_CTX *ctx" | ||
75 | .Fa "uint16_t version" | ||
76 | .Fc | ||
77 | .Ft int | ||
78 | .Fo SSL_CTX_get_min_proto_version | ||
79 | .Fa "SSL_CTX *ctx" | ||
80 | .Fc | ||
81 | .Ft int | ||
82 | .Fo SSL_CTX_get_max_proto_version | ||
83 | .Fa "SSL_CTX *ctx" | ||
84 | .Fc | ||
85 | .Ft int | ||
86 | .Fo SSL_set_min_proto_version | ||
87 | .Fa "SSL *ssl" | ||
88 | .Fa "uint16_t version" | ||
89 | .Fc | ||
90 | .Ft int | ||
91 | .Fo SSL_set_max_proto_version | ||
92 | .Fa "SSL *ssl" | ||
93 | .Fa "uint16_t version" | ||
94 | .Fc | ||
95 | .Ft int | ||
96 | .Fo SSL_get_min_proto_version | ||
97 | .Fa "SSL *ssl" | ||
98 | .Fc | ||
99 | .Ft int | ||
100 | .Fo SSL_get_max_proto_version | ||
101 | .Fa "SSL *ssl" | ||
102 | .Fc | ||
103 | .Sh DESCRIPTION | ||
104 | These functions get or set the minimum and maximum supported protocol | ||
105 | versions for | ||
106 | .Fa ctx | ||
107 | or | ||
108 | .Fa ssl . | ||
109 | This works in combination with the options set via | ||
110 | .Xr SSL_CTX_set_options 3 | ||
111 | that also make it possible to disable specific protocol versions. | ||
112 | Use these functions instead of disabling specific protocol versions. | ||
113 | .Pp | ||
114 | Setting the minimum or maximum version to 0 will enable protocol | ||
115 | versions down to the lowest or up to the highest version supported | ||
116 | by the library, respectively. | ||
117 | .Pp | ||
118 | Currently supported versions are | ||
119 | .Dv TLS1_VERSION , | ||
120 | .Dv TLS1_1_VERSION , | ||
121 | and | ||
122 | .Dv TLS1_2_VERSION | ||
123 | for TLS and | ||
124 | .Dv DTLS1_VERSION | ||
125 | and | ||
126 | .Dv DTLS1_2_VERSION | ||
127 | for DTLS. | ||
128 | .Pp | ||
129 | In other implementations, these functions may be implemented as macros. | ||
130 | .Sh RETURN VALUES | ||
131 | The setter functions return 1 on success or 0 on failure. | ||
132 | .Pp | ||
133 | The getter functions return the configured version or 0 if | ||
134 | .Fa ctx | ||
135 | or | ||
136 | .Fa ssl | ||
137 | has been configured to automatically use the lowest or highest | ||
138 | version supported by the library. | ||
139 | .Sh SEE ALSO | ||
140 | .Xr ssl 3 , | ||
141 | .Xr SSL_CTX_new 3 , | ||
142 | .Xr SSL_CTX_set_options 3 | ||
143 | .Sh HISTORY | ||
144 | The setter functions first appeared in BoringSSL in December 2014, | ||
145 | with shorter names without the | ||
146 | .Sy proto_ | ||
147 | part. | ||
148 | Two years later, OpenSSL included them in their 1.1.0 release, | ||
149 | gratuitously changing the names; Google shrugged and adopted | ||
150 | the longer names one month later. | ||
151 | They have been available since | ||
152 | .Ox 6.2 . | ||
153 | .Pp | ||
154 | The getter functions first appeared in OpenSSL 1.1.0g | ||
155 | and have been available since | ||
156 | .Ox 6.3 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_mode.3 b/src/lib/libssl/man/SSL_CTX_set_mode.3 deleted file mode 100644 index fca1a977d0..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_mode.3 +++ /dev/null | |||
@@ -1,204 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_mode.3,v 1.7 2020/10/08 16:02:38 tb Exp $ | ||
2 | .\" full merge up to: OpenSSL 8671b898 Jun 3 02:48:34 2008 +0000 | ||
3 | .\" selective merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100 | ||
4 | .\" | ||
5 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org> and | ||
6 | .\" Ben Laurie <ben@openssl.org>. | ||
7 | .\" Copyright (c) 2001, 2008 The OpenSSL Project. All rights reserved. | ||
8 | .\" | ||
9 | .\" Redistribution and use in source and binary forms, with or without | ||
10 | .\" modification, are permitted provided that the following conditions | ||
11 | .\" are met: | ||
12 | .\" | ||
13 | .\" 1. Redistributions of source code must retain the above copyright | ||
14 | .\" notice, this list of conditions and the following disclaimer. | ||
15 | .\" | ||
16 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
17 | .\" notice, this list of conditions and the following disclaimer in | ||
18 | .\" the documentation and/or other materials provided with the | ||
19 | .\" distribution. | ||
20 | .\" | ||
21 | .\" 3. All advertising materials mentioning features or use of this | ||
22 | .\" software must display the following acknowledgment: | ||
23 | .\" "This product includes software developed by the OpenSSL Project | ||
24 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
25 | .\" | ||
26 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
27 | .\" endorse or promote products derived from this software without | ||
28 | .\" prior written permission. For written permission, please contact | ||
29 | .\" openssl-core@openssl.org. | ||
30 | .\" | ||
31 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
32 | .\" nor may "OpenSSL" appear in their names without prior written | ||
33 | .\" permission of the OpenSSL Project. | ||
34 | .\" | ||
35 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
36 | .\" acknowledgment: | ||
37 | .\" "This product includes software developed by the OpenSSL Project | ||
38 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
39 | .\" | ||
40 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
41 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
42 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
43 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
44 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
45 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
46 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
47 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
48 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
49 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
50 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
51 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
52 | .\" | ||
53 | .Dd $Mdocdate: October 8 2020 $ | ||
54 | .Dt SSL_CTX_SET_MODE 3 | ||
55 | .Os | ||
56 | .Sh NAME | ||
57 | .Nm SSL_CTX_set_mode , | ||
58 | .Nm SSL_set_mode , | ||
59 | .Nm SSL_CTX_clear_mode , | ||
60 | .Nm SSL_clear_mode , | ||
61 | .Nm SSL_CTX_get_mode , | ||
62 | .Nm SSL_get_mode | ||
63 | .Nd manipulate SSL engine mode | ||
64 | .Sh SYNOPSIS | ||
65 | .In openssl/ssl.h | ||
66 | .Ft long | ||
67 | .Fn SSL_CTX_set_mode "SSL_CTX *ctx" "long mode" | ||
68 | .Ft long | ||
69 | .Fn SSL_set_mode "SSL *ssl" "long mode" | ||
70 | .Ft long | ||
71 | .Fn SSL_CTX_clear_mode "SSL_CTX *ctx" "long mode" | ||
72 | .Ft long | ||
73 | .Fn SSL_clear_mode "SSL *ssl" "long mode" | ||
74 | .Ft long | ||
75 | .Fn SSL_CTX_get_mode "SSL_CTX *ctx" | ||
76 | .Ft long | ||
77 | .Fn SSL_get_mode "SSL *ssl" | ||
78 | .Sh DESCRIPTION | ||
79 | .Fn SSL_CTX_set_mode | ||
80 | and | ||
81 | .Fn SSL_set_mode | ||
82 | enable the options contained in the bitmask | ||
83 | .Fa mode | ||
84 | for the | ||
85 | .Fa ctx | ||
86 | or | ||
87 | .Fa ssl | ||
88 | object, respectively. | ||
89 | Options that were already enabled before the call are not disabled. | ||
90 | .Pp | ||
91 | .Fn SSL_CTX_clear_mode | ||
92 | and | ||
93 | .Fn SSL_clear_mode | ||
94 | disable the options contained in the bitmask | ||
95 | .Fa mode | ||
96 | for the | ||
97 | .Fa ctx | ||
98 | or | ||
99 | .Fa ssl | ||
100 | object. | ||
101 | .Pp | ||
102 | .Fn SSL_CTX_get_mode | ||
103 | and | ||
104 | .Fn SSL_get_mode | ||
105 | return a bitmask representing the options | ||
106 | that are currently enabled for the | ||
107 | .Fa ctx | ||
108 | or | ||
109 | .Fa ssl | ||
110 | object. | ||
111 | .Pp | ||
112 | The following options are available: | ||
113 | .Bl -tag -width Ds | ||
114 | .It Dv SSL_MODE_ENABLE_PARTIAL_WRITE | ||
115 | Allow | ||
116 | .Fn SSL_write ... n | ||
117 | to return | ||
118 | .Ms r | ||
119 | with | ||
120 | .EQ | ||
121 | 0 < r < n | ||
122 | .EN | ||
123 | (i.e., report success when just a single record has been written). | ||
124 | When not set (the default), | ||
125 | .Xr SSL_write 3 | ||
126 | will only report success once the complete chunk was written. | ||
127 | Once | ||
128 | .Xr SSL_write 3 | ||
129 | returns with | ||
130 | .Ms r , | ||
131 | .Ms r | ||
132 | bytes have been successfully written and the next call to | ||
133 | .Xr SSL_write 3 | ||
134 | must only send the | ||
135 | .Ms n \(mi r | ||
136 | bytes left, imitating the behaviour of | ||
137 | .Xr write 2 . | ||
138 | .It Dv SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER | ||
139 | Make it possible to retry | ||
140 | .Xr SSL_write 3 | ||
141 | with changed buffer location (the buffer contents must stay the same). | ||
142 | This is not the default to avoid the misconception that non-blocking | ||
143 | .Xr SSL_write 3 | ||
144 | behaves like non-blocking | ||
145 | .Xr write 2 . | ||
146 | .It Dv SSL_MODE_AUTO_RETRY | ||
147 | Never bother the application with retries if the transport is blocking. | ||
148 | If a renegotiation takes place during normal operation, a | ||
149 | .Xr SSL_read 3 | ||
150 | or | ||
151 | .Xr SSL_write 3 | ||
152 | would return | ||
153 | with \(mi1 and indicate the need to retry with | ||
154 | .Dv SSL_ERROR_WANT_READ . | ||
155 | In a non-blocking environment applications must be prepared to handle | ||
156 | incomplete read/write operations. | ||
157 | In a blocking environment, applications are not always prepared to deal with | ||
158 | read/write operations returning without success report. | ||
159 | The flag | ||
160 | .Dv SSL_MODE_AUTO_RETRY | ||
161 | will cause read/write operations to only return after the handshake and | ||
162 | successful completion. | ||
163 | .It Dv SSL_MODE_RELEASE_BUFFERS | ||
164 | When we no longer need a read buffer or a write buffer for a given | ||
165 | .Vt SSL , | ||
166 | then release the memory we were using to hold it. | ||
167 | Using this flag can save around 34k per idle SSL connection. | ||
168 | This flag has no effect on SSL v2 connections, or on DTLS connections. | ||
169 | .El | ||
170 | .Sh RETURN VALUES | ||
171 | .Fn SSL_CTX_set_mode , | ||
172 | .Fn SSL_set_mode , | ||
173 | .Fn SSL_CTX_clear_mode , | ||
174 | and | ||
175 | .Fn SSL_clear_mode | ||
176 | return the new mode bitmask after adding or clearing | ||
177 | .Fa mode . | ||
178 | .Pp | ||
179 | .Fn SSL_CTX_get_mode | ||
180 | and | ||
181 | .Fn SSL_get_mode | ||
182 | return the current bitmask. | ||
183 | .Sh SEE ALSO | ||
184 | .Xr ssl 3 , | ||
185 | .Xr SSL_CTX_ctrl 3 , | ||
186 | .Xr SSL_read 3 , | ||
187 | .Xr SSL_write 3 | ||
188 | .Sh HISTORY | ||
189 | .Fn SSL_CTX_set_mode , | ||
190 | .Fn SSL_set_mode , | ||
191 | .Fn SSL_CTX_get_mode , | ||
192 | and | ||
193 | .Fn SSL_get_mode | ||
194 | first appeared in OpenSSL 0.9.4 and have been available since | ||
195 | .Ox 2.6 . | ||
196 | .Pp | ||
197 | .Fn SSL_CTX_clear_mode | ||
198 | and | ||
199 | .Fn SSL_clear_mode | ||
200 | first appeared in OpenSSL 0.9.8m and have been available since | ||
201 | .Ox 4.9 . | ||
202 | .Pp | ||
203 | .Dv SSL_MODE_AUTO_RETRY | ||
204 | was added in OpenSSL 0.9.6. | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_msg_callback.3 b/src/lib/libssl/man/SSL_CTX_set_msg_callback.3 deleted file mode 100644 index a27333e6d9..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_msg_callback.3 +++ /dev/null | |||
@@ -1,183 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_msg_callback.3,v 1.5 2021/04/15 16:43:27 tb Exp $ | ||
2 | .\" OpenSSL SSL_CTX_set_msg_callback.pod e9b77246 Jan 20 19:58:49 2017 +0100 | ||
3 | .\" OpenSSL SSL_CTX_set_msg_callback.pod b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
4 | .\" | ||
5 | .\" This file was written by Bodo Moeller <bodo@openssl.org>. | ||
6 | .\" Copyright (c) 2001, 2014, 2016 The OpenSSL Project. All rights reserved. | ||
7 | .\" | ||
8 | .\" Redistribution and use in source and binary forms, with or without | ||
9 | .\" modification, are permitted provided that the following conditions | ||
10 | .\" are met: | ||
11 | .\" | ||
12 | .\" 1. Redistributions of source code must retain the above copyright | ||
13 | .\" notice, this list of conditions and the following disclaimer. | ||
14 | .\" | ||
15 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
16 | .\" notice, this list of conditions and the following disclaimer in | ||
17 | .\" the documentation and/or other materials provided with the | ||
18 | .\" distribution. | ||
19 | .\" | ||
20 | .\" 3. All advertising materials mentioning features or use of this | ||
21 | .\" software must display the following acknowledgment: | ||
22 | .\" "This product includes software developed by the OpenSSL Project | ||
23 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
24 | .\" | ||
25 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | .\" endorse or promote products derived from this software without | ||
27 | .\" prior written permission. For written permission, please contact | ||
28 | .\" openssl-core@openssl.org. | ||
29 | .\" | ||
30 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
31 | .\" nor may "OpenSSL" appear in their names without prior written | ||
32 | .\" permission of the OpenSSL Project. | ||
33 | .\" | ||
34 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
35 | .\" acknowledgment: | ||
36 | .\" "This product includes software developed by the OpenSSL Project | ||
37 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
38 | .\" | ||
39 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | .\" | ||
52 | .Dd $Mdocdate: April 15 2021 $ | ||
53 | .Dt SSL_CTX_SET_MSG_CALLBACK 3 | ||
54 | .Os | ||
55 | .Sh NAME | ||
56 | .Nm SSL_CTX_set_msg_callback , | ||
57 | .Nm SSL_CTX_set_msg_callback_arg , | ||
58 | .Nm SSL_set_msg_callback , | ||
59 | .Nm SSL_set_msg_callback_arg | ||
60 | .Nd install callback for observing protocol messages | ||
61 | .Sh SYNOPSIS | ||
62 | .In openssl/ssl.h | ||
63 | .Ft void | ||
64 | .Fo SSL_CTX_set_msg_callback | ||
65 | .Fa "SSL_CTX *ctx" | ||
66 | .Fa "void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg)" | ||
67 | .Fc | ||
68 | .Ft void | ||
69 | .Fn SSL_CTX_set_msg_callback_arg "SSL_CTX *ctx" "void *arg" | ||
70 | .Ft void | ||
71 | .Fo SSL_set_msg_callback | ||
72 | .Fa "SSL *ssl" | ||
73 | .Fa "void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg)" | ||
74 | .Fc | ||
75 | .Ft void | ||
76 | .Fn SSL_set_msg_callback_arg "SSL *ssl" "void *arg" | ||
77 | .Sh DESCRIPTION | ||
78 | .Fn SSL_CTX_set_msg_callback | ||
79 | or | ||
80 | .Fn SSL_set_msg_callback | ||
81 | can be used to define a message callback function | ||
82 | .Fa cb | ||
83 | for observing all SSL/TLS protocol messages (such as handshake messages) | ||
84 | that are received or sent. | ||
85 | .Fn SSL_CTX_set_msg_callback_arg | ||
86 | and | ||
87 | .Fn SSL_set_msg_callback_arg | ||
88 | can be used to set argument | ||
89 | .Fa arg | ||
90 | to the callback function, which is available for arbitrary application use. | ||
91 | .Pp | ||
92 | .Fn SSL_CTX_set_msg_callback | ||
93 | and | ||
94 | .Fn SSL_CTX_set_msg_callback_arg | ||
95 | specify default settings that will be copied to new | ||
96 | .Vt SSL | ||
97 | objects by | ||
98 | .Xr SSL_new 3 . | ||
99 | .Fn SSL_set_msg_callback | ||
100 | and | ||
101 | .Fn SSL_set_msg_callback_arg | ||
102 | modify the actual settings of an | ||
103 | .Vt SSL | ||
104 | object. | ||
105 | Using a | ||
106 | .Dv NULL | ||
107 | pointer for | ||
108 | .Fa cb | ||
109 | disables the message callback. | ||
110 | .Pp | ||
111 | When | ||
112 | .Fa cb | ||
113 | is called by the SSL/TLS library for a protocol message, | ||
114 | the function arguments have the following meaning: | ||
115 | .Bl -tag -width Ds | ||
116 | .It Fa write_p | ||
117 | This flag is 0 when a protocol message has been received and 1 when a protocol | ||
118 | message has been sent. | ||
119 | .It Fa version | ||
120 | The protocol version according to which the protocol message is | ||
121 | interpreted by the library, such as | ||
122 | .Dv TLS1_VERSION , | ||
123 | .Dv TLS1_1_VERSION , | ||
124 | .Dv TLS1_2_VERSION , | ||
125 | .Dv DTLS1_VERSION , | ||
126 | or | ||
127 | .Dv DTLS1_2_VERSION . | ||
128 | .It Fa content_type | ||
129 | This is one of the | ||
130 | .Em ContentType | ||
131 | values defined in the protocol specification | ||
132 | .Po | ||
133 | .Dv SSL3_RT_CHANGE_CIPHER_SPEC , | ||
134 | .Dv SSL3_RT_ALERT , | ||
135 | .Dv SSL3_RT_HANDSHAKE , | ||
136 | but never | ||
137 | .Dv SSL3_RT_APPLICATION_DATA | ||
138 | because the callback will only be called for protocol messages. | ||
139 | .Pc | ||
140 | .It Fa buf , Fa len | ||
141 | .Fa buf | ||
142 | points to a buffer containing the protocol message, which consists of | ||
143 | .Fa len | ||
144 | bytes. | ||
145 | The buffer is no longer valid after the callback function has returned. | ||
146 | .It Fa ssl | ||
147 | The | ||
148 | .Vt SSL | ||
149 | object that received or sent the message. | ||
150 | .It Fa arg | ||
151 | The user-defined argument optionally defined by | ||
152 | .Fn SSL_CTX_set_msg_callback_arg | ||
153 | or | ||
154 | .Fn SSL_set_msg_callback_arg . | ||
155 | .El | ||
156 | .Pp | ||
157 | Protocol messages are passed to the callback function after decryption | ||
158 | and fragment collection where applicable. | ||
159 | (Thus record boundaries are not visible.) | ||
160 | .Pp | ||
161 | If processing a received protocol message results in an error, | ||
162 | the callback function may not be called. | ||
163 | For example, the callback function will never see messages that are considered | ||
164 | too large to be processed. | ||
165 | .Pp | ||
166 | Due to automatic protocol version negotiation, | ||
167 | .Fa version | ||
168 | is not necessarily the protocol version used by the sender of the message: | ||
169 | If a TLS 1.0 ClientHello message is received by an SSL 3.0-only server, | ||
170 | .Fa version | ||
171 | will be | ||
172 | .Dv SSL3_VERSION . | ||
173 | .Sh SEE ALSO | ||
174 | .Xr ssl 3 , | ||
175 | .Xr SSL_new 3 | ||
176 | .Sh HISTORY | ||
177 | .Fn SSL_CTX_set_msg_callback , | ||
178 | .Fn SSL_CTX_set_msg_callback_arg , | ||
179 | .Fn SSL_set_msg_callback | ||
180 | and | ||
181 | .Fn SSL_set_msg_callback_arg | ||
182 | first appeared in OpenSSL 0.9.7 and have been available since | ||
183 | .Ox 3.2 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_num_tickets.3 b/src/lib/libssl/man/SSL_CTX_set_num_tickets.3 deleted file mode 100644 index cb6d7e000a..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_num_tickets.3 +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_num_tickets.3,v 1.2 2021/10/23 17:20:50 schwarze Exp $ | ||
2 | .\" OpenSSL pod checked up to: 5402f96a Sep 11 09:58:52 2021 +0100 | ||
3 | .\" | ||
4 | .\" Copyright (c) 2021 Bob Beck <beck@openbsd.org> | ||
5 | .\" | ||
6 | .\" Permission to use, copy, modify, and distribute this software for any | ||
7 | .\" purpose with or without fee is hereby granted, provided that the above | ||
8 | .\" copyright notice and this permission notice appear in all copies. | ||
9 | .\" | ||
10 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
11 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
12 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
13 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
14 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
15 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
16 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
17 | .\" | ||
18 | .Dd $Mdocdate: October 23 2021 $ | ||
19 | .Dt SSL_CTX_SET_NUM_TICKETS 3 | ||
20 | .Os | ||
21 | .Sh NAME | ||
22 | .Nm SSL_CTX_set_num_tickets , | ||
23 | .Nm SSL_CTX_get_num_tickets , | ||
24 | .Nm SSL_set_num_tickets , | ||
25 | .Nm SSL_get_num_tickets | ||
26 | .Nd set and get the number of TLS 1.3 session tickets to be sent | ||
27 | .Sh SYNOPSIS | ||
28 | .In openssl/ssl.h | ||
29 | .Ft int | ||
30 | .Fn SSL_CTX_set_num_tickets "SSL_CTX *ctx" "size_t num_tickets" | ||
31 | .Ft size_t | ||
32 | .Fn SSL_CTX_get_num_tickets "const SSL_CTX *ctx" | ||
33 | .Ft int | ||
34 | .Fn SSL_set_num_tickets "SSL *ssl" "size_t num_tickets" | ||
35 | .Ft size_t | ||
36 | .Fn SSL_get_num_tickets "const SSL *ssl" | ||
37 | .Sh DESCRIPTION | ||
38 | These functions set and retrieve | ||
39 | the configured number of session tickets for | ||
40 | .Fa ctx | ||
41 | and | ||
42 | .Fa ssl , | ||
43 | respectively. | ||
44 | .Pp | ||
45 | They are provided only for compatibility with OpenSSL | ||
46 | and have no effect in LibreSSL. | ||
47 | .Sh RETURN VALUES | ||
48 | .Fn SSL_CTX_set_num_tickets | ||
49 | and | ||
50 | .Fn SSL_set_num_tickets | ||
51 | always return 1. | ||
52 | .Pp | ||
53 | .Fn SSL_CTX_get_num_tickets | ||
54 | and | ||
55 | .Fn SSL_get_num_tickets | ||
56 | return the previously set number of tickets, or 0 if it has not been set. | ||
57 | .Sh SEE ALSO | ||
58 | .Xr ssl 3 , | ||
59 | .Xr SSL_CTX_new 3 | ||
60 | .Sh HISTORY | ||
61 | These function first appeared in OpenSSL 1.1.1 | ||
62 | and have been available since | ||
63 | .Ox 7.1 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_options.3 b/src/lib/libssl/man/SSL_CTX_set_options.3 deleted file mode 100644 index 5df0b07785..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_options.3 +++ /dev/null | |||
@@ -1,374 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_options.3,v 1.16 2022/03/31 17:27:18 naddy Exp $ | ||
2 | .\" full merge up to: OpenSSL 7946ab33 Dec 6 17:56:41 2015 +0100 | ||
3 | .\" selective merge up to: OpenSSL edb79c3a Mar 29 10:07:14 2017 +1000 | ||
4 | .\" | ||
5 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>, | ||
6 | .\" Bodo Moeller <bodo@openssl.org>, and | ||
7 | .\" Dr. Stephen Henson <steve@openssl.org>. | ||
8 | .\" Copyright (c) 2001-2003, 2005, 2007, 2009, 2010, 2013-2015 | ||
9 | .\" The OpenSSL Project. All rights reserved. | ||
10 | .\" | ||
11 | .\" Redistribution and use in source and binary forms, with or without | ||
12 | .\" modification, are permitted provided that the following conditions | ||
13 | .\" are met: | ||
14 | .\" | ||
15 | .\" 1. Redistributions of source code must retain the above copyright | ||
16 | .\" notice, this list of conditions and the following disclaimer. | ||
17 | .\" | ||
18 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
19 | .\" notice, this list of conditions and the following disclaimer in | ||
20 | .\" the documentation and/or other materials provided with the | ||
21 | .\" distribution. | ||
22 | .\" | ||
23 | .\" 3. All advertising materials mentioning features or use of this | ||
24 | .\" software must display the following acknowledgment: | ||
25 | .\" "This product includes software developed by the OpenSSL Project | ||
26 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
27 | .\" | ||
28 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
29 | .\" endorse or promote products derived from this software without | ||
30 | .\" prior written permission. For written permission, please contact | ||
31 | .\" openssl-core@openssl.org. | ||
32 | .\" | ||
33 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
34 | .\" nor may "OpenSSL" appear in their names without prior written | ||
35 | .\" permission of the OpenSSL Project. | ||
36 | .\" | ||
37 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
38 | .\" acknowledgment: | ||
39 | .\" "This product includes software developed by the OpenSSL Project | ||
40 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
41 | .\" | ||
42 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
43 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
44 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
45 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
46 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
47 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
48 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
49 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
50 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
51 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
52 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
53 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
54 | .\" | ||
55 | .Dd $Mdocdate: March 31 2022 $ | ||
56 | .Dt SSL_CTX_SET_OPTIONS 3 | ||
57 | .Os | ||
58 | .Sh NAME | ||
59 | .Nm SSL_CTX_set_options , | ||
60 | .Nm SSL_set_options , | ||
61 | .Nm SSL_CTX_clear_options , | ||
62 | .Nm SSL_clear_options , | ||
63 | .Nm SSL_CTX_get_options , | ||
64 | .Nm SSL_get_options , | ||
65 | .Nm SSL_get_secure_renegotiation_support | ||
66 | .Nd manipulate SSL options | ||
67 | .Sh SYNOPSIS | ||
68 | .In openssl/ssl.h | ||
69 | .Ft long | ||
70 | .Fn SSL_CTX_set_options "SSL_CTX *ctx" "long options" | ||
71 | .Ft long | ||
72 | .Fn SSL_set_options "SSL *ssl" "long options" | ||
73 | .Ft long | ||
74 | .Fn SSL_CTX_clear_options "SSL_CTX *ctx" "long options" | ||
75 | .Ft long | ||
76 | .Fn SSL_clear_options "SSL *ssl" "long options" | ||
77 | .Ft long | ||
78 | .Fn SSL_CTX_get_options "SSL_CTX *ctx" | ||
79 | .Ft long | ||
80 | .Fn SSL_get_options "SSL *ssl" | ||
81 | .Ft long | ||
82 | .Fn SSL_get_secure_renegotiation_support "SSL *ssl" | ||
83 | .Sh DESCRIPTION | ||
84 | .Fn SSL_CTX_set_options | ||
85 | adds the options set via bitmask in | ||
86 | .Fa options | ||
87 | to | ||
88 | .Fa ctx . | ||
89 | Options already set before are not cleared! | ||
90 | .Pp | ||
91 | .Fn SSL_set_options | ||
92 | adds the options set via bitmask in | ||
93 | .Fa options | ||
94 | to | ||
95 | .Fa ssl . | ||
96 | Options already set before are not cleared! | ||
97 | .Pp | ||
98 | .Fn SSL_CTX_clear_options | ||
99 | clears the options set via bitmask in | ||
100 | .Fa options | ||
101 | to | ||
102 | .Fa ctx . | ||
103 | .Pp | ||
104 | .Fn SSL_clear_options | ||
105 | clears the options set via bitmask in | ||
106 | .Fa options | ||
107 | to | ||
108 | .Fa ssl . | ||
109 | .Pp | ||
110 | .Fn SSL_CTX_get_options | ||
111 | returns the options set for | ||
112 | .Fa ctx . | ||
113 | .Pp | ||
114 | .Fn SSL_get_options | ||
115 | returns the options set for | ||
116 | .Fa ssl . | ||
117 | .Pp | ||
118 | .Fn SSL_get_secure_renegotiation_support | ||
119 | indicates whether the peer supports secure renegotiation. | ||
120 | .Pp | ||
121 | All these functions are implemented using macros. | ||
122 | .Pp | ||
123 | The behaviour of the SSL library can be changed by setting several options. | ||
124 | The options are coded as bitmasks and can be combined by a bitwise OR | ||
125 | operation (|). | ||
126 | .Pp | ||
127 | .Fn SSL_CTX_set_options | ||
128 | and | ||
129 | .Fn SSL_set_options | ||
130 | affect the (external) protocol behaviour of the SSL library. | ||
131 | The (internal) behaviour of the API can be changed by using the similar | ||
132 | .Xr SSL_CTX_set_mode 3 | ||
133 | and | ||
134 | .Xr SSL_set_mode 3 | ||
135 | functions. | ||
136 | .Pp | ||
137 | During a handshake, the option settings of the SSL object are used. | ||
138 | When a new SSL object is created from a context using | ||
139 | .Xr SSL_new 3 , | ||
140 | the current option setting is copied. | ||
141 | Changes to | ||
142 | .Fa ctx | ||
143 | do not affect already created | ||
144 | .Vt SSL | ||
145 | objects. | ||
146 | .Fn SSL_clear | ||
147 | does not affect the settings. | ||
148 | .Pp | ||
149 | The following | ||
150 | .Em bug workaround | ||
151 | options are available: | ||
152 | .Bl -tag -width Ds | ||
153 | .It Dv SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS | ||
154 | Disables a countermeasure against a TLS 1.0 protocol vulnerability | ||
155 | affecting CBC ciphers, which cannot be handled by some broken SSL | ||
156 | implementations. | ||
157 | This option has no effect for connections using other ciphers. | ||
158 | .It Dv SSL_OP_ALL | ||
159 | This is currently an alias for | ||
160 | .Dv SSL_OP_LEGACY_SERVER_CONNECT . | ||
161 | .El | ||
162 | .Pp | ||
163 | It is usually safe to use | ||
164 | .Dv SSL_OP_ALL | ||
165 | to enable the bug workaround options if compatibility with somewhat broken | ||
166 | implementations is desired. | ||
167 | .Pp | ||
168 | The following | ||
169 | .Em modifying | ||
170 | options are available: | ||
171 | .Bl -tag -width Ds | ||
172 | .It Dv SSL_OP_CIPHER_SERVER_PREFERENCE | ||
173 | When choosing a cipher, use the server's preferences instead of the client | ||
174 | preferences. | ||
175 | When not set, the server will always follow the client's preferences. | ||
176 | When set, the server will choose following its own preferences. | ||
177 | .It Dv SSL_OP_COOKIE_EXCHANGE | ||
178 | Turn on Cookie Exchange as described in RFC 4347 Section 4.2.1. | ||
179 | Only affects DTLS connections. | ||
180 | .It Dv SSL_OP_LEGACY_SERVER_CONNECT | ||
181 | Allow legacy insecure renegotiation between OpenSSL and unpatched servers | ||
182 | .Em only : | ||
183 | this option is currently set by default. | ||
184 | See the | ||
185 | .Sx SECURE RENEGOTIATION | ||
186 | section for more details. | ||
187 | .It Dv SSL_OP_NO_DTLSv1 | ||
188 | Do not use the DTLSv1 protocol. | ||
189 | Deprecated; use | ||
190 | .Xr SSL_CTX_set_min_proto_version 3 | ||
191 | instead. | ||
192 | .It Dv SSL_OP_NO_DTLSv1_2 | ||
193 | Do not use the DTLSv1.2 protocol. | ||
194 | Deprecated; use | ||
195 | .Xr SSL_CTX_set_min_proto_version 3 | ||
196 | instead. | ||
197 | .It Dv SSL_OP_NO_QUERY_MTU | ||
198 | Do not query the MTU. | ||
199 | Only affects DTLS connections. | ||
200 | .It Dv SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION | ||
201 | When performing renegotiation as a server, always start a new session (i.e., | ||
202 | session resumption requests are only accepted in the initial handshake). | ||
203 | This option is not needed for clients. | ||
204 | .It Dv SSL_OP_NO_TICKET | ||
205 | Normally clients and servers using TLSv1.2 and earlier will, where possible, | ||
206 | transparently make use of | ||
207 | RFC 5077 tickets for stateless session resumption. | ||
208 | .Pp | ||
209 | If this option is set, this functionality is disabled and tickets will not be | ||
210 | used by clients or servers. | ||
211 | .It Dv SSL_OP_NO_TLSv1 | ||
212 | Do not use the TLSv1.0 protocol. | ||
213 | Deprecated; use | ||
214 | .Xr SSL_CTX_set_min_proto_version 3 | ||
215 | instead. | ||
216 | .It Dv SSL_OP_NO_TLSv1_1 | ||
217 | Do not use the TLSv1.1 protocol. | ||
218 | Deprecated; use | ||
219 | .Xr SSL_CTX_set_min_proto_version 3 | ||
220 | instead. | ||
221 | .It Dv SSL_OP_NO_TLSv1_2 | ||
222 | Do not use the TLSv1.2 protocol. | ||
223 | Deprecated; use | ||
224 | .Xr SSL_CTX_set_max_proto_version 3 | ||
225 | instead. | ||
226 | .El | ||
227 | .Pp | ||
228 | The following options used to be supported at some point in the past | ||
229 | and no longer have any effect: | ||
230 | .Dv SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION , | ||
231 | .Dv SSL_OP_EPHEMERAL_RSA , | ||
232 | .Dv SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER , | ||
233 | .Dv SSL_OP_MICROSOFT_SESS_ID_BUG , | ||
234 | .Dv SSL_OP_NETSCAPE_CA_DN_BUG , | ||
235 | .Dv SSL_OP_NETSCAPE_CHALLENGE_BUG , | ||
236 | .Dv SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG , | ||
237 | .Dv SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG , | ||
238 | .Dv SSL_OP_NO_COMPRESSION , | ||
239 | .Dv SSL_OP_NO_SSLv2 , | ||
240 | .Dv SSL_OP_NO_SSLv3 , | ||
241 | .Dv SSL_OP_PKCS1_CHECK_1 , | ||
242 | .Dv SSL_OP_PKCS1_CHECK_2 , | ||
243 | .Dv SSL_OP_SAFARI_ECDHE_ECDSA_BUG , | ||
244 | .Dv SSL_OP_SINGLE_DH_USE , | ||
245 | .Dv SSL_OP_SINGLE_ECDH_USE , | ||
246 | .Dv SSL_OP_SSLEAY_080_CLIENT_DH_BUG , | ||
247 | .Dv SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG , | ||
248 | .Dv SSL_OP_TLS_BLOCK_PADDING_BUG , | ||
249 | .Dv SSL_OP_TLS_D5_BUG , | ||
250 | .Dv SSL_OP_TLS_ROLLBACK_BUG , | ||
251 | .Dv SSL_OP_TLSEXT_PADDING . | ||
252 | .Sh SECURE RENEGOTIATION | ||
253 | OpenSSL 0.9.8m and later always attempts to use secure renegotiation as | ||
254 | described in RFC 5746. | ||
255 | This counters the prefix attack described in CVE-2009-3555 and elsewhere. | ||
256 | .Pp | ||
257 | This attack has far-reaching consequences which application writers should be | ||
258 | aware of. | ||
259 | In the description below an implementation supporting secure renegotiation is | ||
260 | referred to as | ||
261 | .Dq patched . | ||
262 | A server not supporting secure | ||
263 | renegotiation is referred to as | ||
264 | .Dq unpatched . | ||
265 | .Pp | ||
266 | The following sections describe the operations permitted by OpenSSL's secure | ||
267 | renegotiation implementation. | ||
268 | .Ss Patched client and server | ||
269 | Connections and renegotiation are always permitted by OpenSSL implementations. | ||
270 | .Ss Unpatched client and patched OpenSSL server | ||
271 | The initial connection succeeds but client renegotiation is denied by the | ||
272 | server with a | ||
273 | .Em no_renegotiation | ||
274 | warning alert. | ||
275 | .Pp | ||
276 | If the patched OpenSSL server attempts to renegotiate, a fatal | ||
277 | .Em handshake_failure | ||
278 | alert is sent. | ||
279 | This is because the server code may be unaware of the unpatched nature of the | ||
280 | client. | ||
281 | .Pp | ||
282 | Note that a bug in OpenSSL clients earlier than 0.9.8m (all of which | ||
283 | are unpatched) will result in the connection hanging if it receives a | ||
284 | .Em no_renegotiation | ||
285 | alert. | ||
286 | OpenSSL versions 0.9.8m and later will regard a | ||
287 | .Em no_renegotiation | ||
288 | alert as fatal and respond with a fatal | ||
289 | .Em handshake_failure | ||
290 | alert. | ||
291 | This is because the OpenSSL API currently has no provision to indicate to an | ||
292 | application that a renegotiation attempt was refused. | ||
293 | .Ss Patched OpenSSL client and unpatched server | ||
294 | If the option | ||
295 | .Dv SSL_OP_LEGACY_SERVER_CONNECT | ||
296 | is set then initial connections and renegotiation between patched OpenSSL | ||
297 | clients and unpatched servers succeeds. | ||
298 | If neither option is set then initial connections to unpatched servers will | ||
299 | fail. | ||
300 | .Pp | ||
301 | The option | ||
302 | .Dv SSL_OP_LEGACY_SERVER_CONNECT | ||
303 | is currently set by default even though it has security implications: | ||
304 | otherwise it would be impossible to connect to unpatched servers (i.e., all of | ||
305 | them initially) and this is clearly not acceptable. | ||
306 | Renegotiation is permitted because this does not add any additional security | ||
307 | issues: during an attack clients do not see any renegotiations anyway. | ||
308 | .Pp | ||
309 | As more servers become patched, the option | ||
310 | .Dv SSL_OP_LEGACY_SERVER_CONNECT | ||
311 | will | ||
312 | .Em not | ||
313 | be set by default in a future version of OpenSSL. | ||
314 | .Pp | ||
315 | OpenSSL client applications wishing to ensure they can connect to unpatched | ||
316 | servers should always | ||
317 | .Em set | ||
318 | .Dv SSL_OP_LEGACY_SERVER_CONNECT . | ||
319 | .Pp | ||
320 | OpenSSL client applications that want to ensure they can | ||
321 | .Em not | ||
322 | connect to unpatched servers (and thus avoid any security issues) should always | ||
323 | .Em clear | ||
324 | .Dv SSL_OP_LEGACY_SERVER_CONNECT | ||
325 | using | ||
326 | .Fn SSL_CTX_clear_options | ||
327 | or | ||
328 | .Fn SSL_clear_options . | ||
329 | .Sh RETURN VALUES | ||
330 | .Fn SSL_CTX_set_options | ||
331 | and | ||
332 | .Fn SSL_set_options | ||
333 | return the new options bitmask after adding | ||
334 | .Fa options . | ||
335 | .Pp | ||
336 | .Fn SSL_CTX_clear_options | ||
337 | and | ||
338 | .Fn SSL_clear_options | ||
339 | return the new options bitmask after clearing | ||
340 | .Fa options . | ||
341 | .Pp | ||
342 | .Fn SSL_CTX_get_options | ||
343 | and | ||
344 | .Fn SSL_get_options | ||
345 | return the current bitmask. | ||
346 | .Pp | ||
347 | .Fn SSL_get_secure_renegotiation_support | ||
348 | returns 1 is the peer supports secure renegotiation and 0 if it does not. | ||
349 | .Sh SEE ALSO | ||
350 | .Xr openssl 1 , | ||
351 | .Xr ssl 3 , | ||
352 | .Xr SSL_clear 3 , | ||
353 | .Xr SSL_CTX_ctrl 3 , | ||
354 | .Xr SSL_CTX_set_min_proto_version 3 , | ||
355 | .Xr SSL_new 3 | ||
356 | .Sh HISTORY | ||
357 | .Fn SSL_CTX_set_options | ||
358 | and | ||
359 | .Fn SSL_set_options | ||
360 | first appeared in SSLeay 0.9.0 and have been available since | ||
361 | .Ox 2.4 . | ||
362 | .Pp | ||
363 | .Fn SSL_CTX_get_options | ||
364 | and | ||
365 | .Fn SSL_get_options | ||
366 | first appeared in OpenSSL 0.9.2b and have been available since | ||
367 | .Ox 2.6 . | ||
368 | .Pp | ||
369 | .Fn SSL_CTX_clear_options , | ||
370 | .Fn SSL_clear_options , | ||
371 | and | ||
372 | .Fn SSL_get_secure_renegotiation_support | ||
373 | first appeared in OpenSSL 0.9.8m and have been available since | ||
374 | .Ox 4.9 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 b/src/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 deleted file mode 100644 index 71463f1eca..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 +++ /dev/null | |||
@@ -1,161 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_quiet_shutdown.3,v 1.6 2020/03/30 10:28:59 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001, 2005 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 30 2020 $ | ||
52 | .Dt SSL_CTX_SET_QUIET_SHUTDOWN 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_CTX_set_quiet_shutdown , | ||
56 | .Nm SSL_CTX_get_quiet_shutdown , | ||
57 | .Nm SSL_set_quiet_shutdown , | ||
58 | .Nm SSL_get_quiet_shutdown | ||
59 | .Nd manipulate shutdown behaviour | ||
60 | .Sh SYNOPSIS | ||
61 | .In openssl/ssl.h | ||
62 | .Ft void | ||
63 | .Fn SSL_CTX_set_quiet_shutdown "SSL_CTX *ctx" "int mode" | ||
64 | .Ft int | ||
65 | .Fn SSL_CTX_get_quiet_shutdown "const SSL_CTX *ctx" | ||
66 | .Ft void | ||
67 | .Fn SSL_set_quiet_shutdown "SSL *ssl" "int mode" | ||
68 | .Ft int | ||
69 | .Fn SSL_get_quiet_shutdown "const SSL *ssl" | ||
70 | .Sh DESCRIPTION | ||
71 | .Fn SSL_CTX_set_quiet_shutdown | ||
72 | sets the | ||
73 | .Dq quiet shutdown | ||
74 | flag for | ||
75 | .Fa ctx | ||
76 | to be | ||
77 | .Fa mode . | ||
78 | .Vt SSL | ||
79 | objects created from | ||
80 | .Fa ctx | ||
81 | inherit the | ||
82 | .Fa mode | ||
83 | valid at the time | ||
84 | .Xr SSL_new 3 | ||
85 | is called. | ||
86 | .Fa mode | ||
87 | may be 0 or 1. | ||
88 | .Pp | ||
89 | .Fn SSL_CTX_get_quiet_shutdown | ||
90 | returns the | ||
91 | .Dq quiet shutdown | ||
92 | setting of | ||
93 | .Fa ctx . | ||
94 | .Pp | ||
95 | .Fn SSL_set_quiet_shutdown | ||
96 | sets the | ||
97 | .Dq quiet shutdown | ||
98 | flag for | ||
99 | .Fa ssl | ||
100 | to be | ||
101 | .Fa mode . | ||
102 | The setting stays valid until | ||
103 | .Fa ssl | ||
104 | is removed with | ||
105 | .Xr SSL_free 3 | ||
106 | or | ||
107 | .Fn SSL_set_quiet_shutdown | ||
108 | is called again. | ||
109 | It is not changed when | ||
110 | .Xr SSL_clear 3 | ||
111 | is called. | ||
112 | .Fa mode | ||
113 | may be 0 or 1. | ||
114 | .Pp | ||
115 | .Fn SSL_get_quiet_shutdown | ||
116 | returns the | ||
117 | .Dq quiet shutdown | ||
118 | setting of | ||
119 | .Fa ssl . | ||
120 | .Pp | ||
121 | Normally when a SSL connection is finished, the parties must send out | ||
122 | .Dq close notify | ||
123 | alert messages using | ||
124 | .Xr SSL_shutdown 3 | ||
125 | for a clean shutdown. | ||
126 | .Pp | ||
127 | When setting the | ||
128 | .Dq quiet shutdown | ||
129 | flag to 1, | ||
130 | .Xr SSL_shutdown 3 | ||
131 | will set the internal flags to | ||
132 | .Dv SSL_SENT_SHUTDOWN Ns | Ns Dv SSL_RECEIVED_SHUTDOWN | ||
133 | .Po | ||
134 | .Xr SSL_shutdown 3 | ||
135 | then behaves like | ||
136 | .Xr SSL_set_shutdown 3 | ||
137 | called with | ||
138 | .Dv SSL_SENT_SHUTDOWN Ns | Ns Dv SSL_RECEIVED_SHUTDOWN | ||
139 | .Pc . | ||
140 | The session is thus considered to be shut down, but no | ||
141 | .Dq close notify | ||
142 | alert is sent to the peer. | ||
143 | This behaviour violates the TLS standard. | ||
144 | .Pp | ||
145 | The default is normal shutdown behaviour as described by the TLS standard. | ||
146 | .Sh RETURN VALUES | ||
147 | .Fn SSL_CTX_get_quiet_shutdown | ||
148 | and | ||
149 | .Fn SSL_get_quiet_shutdown | ||
150 | return the current setting. | ||
151 | .Sh SEE ALSO | ||
152 | .Xr ssl 3 , | ||
153 | .Xr SSL_clear 3 , | ||
154 | .Xr SSL_free 3 , | ||
155 | .Xr SSL_new 3 , | ||
156 | .Xr SSL_set_shutdown 3 , | ||
157 | .Xr SSL_shutdown 3 | ||
158 | .Sh HISTORY | ||
159 | These functions first appeared in SSLeay 0.8.1 | ||
160 | and have been available since | ||
161 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_read_ahead.3 b/src/lib/libssl/man/SSL_CTX_set_read_ahead.3 deleted file mode 100644 index eae76eb472..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_read_ahead.3 +++ /dev/null | |||
@@ -1,144 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_read_ahead.3,v 1.4 2018/03/27 17:35:50 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Matt Caswell <matt@openssl.org>. | ||
5 | .\" Copyright (c) 2015, 2016 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 27 2018 $ | ||
52 | .Dt SSL_CTX_SET_READ_AHEAD 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_CTX_set_read_ahead , | ||
56 | .Nm SSL_CTX_get_read_ahead , | ||
57 | .Nm SSL_set_read_ahead , | ||
58 | .Nm SSL_get_read_ahead , | ||
59 | .Nm SSL_CTX_get_default_read_ahead | ||
60 | .Nd manage whether to read as many input bytes as possible | ||
61 | .Sh SYNOPSIS | ||
62 | .In openssl/ssl.h | ||
63 | .Ft void | ||
64 | .Fo SSL_CTX_set_read_ahead | ||
65 | .Fa "SSL_CTX *ctx" | ||
66 | .Fa "int yes" | ||
67 | .Fc | ||
68 | .Ft long | ||
69 | .Fo SSL_CTX_get_read_ahead | ||
70 | .Fa "SSL_CTX *ctx" | ||
71 | .Fc | ||
72 | .Ft void | ||
73 | .Fo SSL_set_read_ahead | ||
74 | .Fa "SSL *s" | ||
75 | .Fa "int yes" | ||
76 | .Fc | ||
77 | .Ft long | ||
78 | .Fo SSL_get_read_ahead | ||
79 | .Fa "const SSL *s" | ||
80 | .Fc | ||
81 | .Ft long | ||
82 | .Fo SSL_CTX_get_default_read_ahead | ||
83 | .Fa "SSL_CTX *ctx" | ||
84 | .Fc | ||
85 | .Sh DESCRIPTION | ||
86 | .Fn SSL_CTX_set_read_ahead | ||
87 | and | ||
88 | .Fn SSL_set_read_ahead | ||
89 | set whether as many input bytes as possible are read for non-blocking | ||
90 | reads. | ||
91 | For example if | ||
92 | .Ar x | ||
93 | bytes are currently required by OpenSSL, but | ||
94 | .Ar y | ||
95 | bytes are available from the underlying BIO (where | ||
96 | .Ar y No > Ar x ) , | ||
97 | then OpenSSL will read all | ||
98 | .Ar y | ||
99 | bytes into its buffer (provided that the buffer is large enough) if | ||
100 | reading ahead is on, or | ||
101 | .Ar x | ||
102 | bytes otherwise. | ||
103 | The parameter | ||
104 | .Fa yes | ||
105 | should be 0 to ensure reading ahead is off, or non zero otherwise. | ||
106 | .Pp | ||
107 | .Fn SSL_CTX_get_read_ahead | ||
108 | and | ||
109 | .Fn SSL_get_read_ahead | ||
110 | indicate whether reading ahead is set or not. | ||
111 | .Pp | ||
112 | .Fn SSL_CTX_get_default_read_ahead | ||
113 | is identical to | ||
114 | .Fn SSL_CTX_get_read_ahead . | ||
115 | .Pp | ||
116 | These functions are implemented as macros. | ||
117 | .Pp | ||
118 | These functions have no effect when used with DTLS. | ||
119 | .Sh RETURN VALUES | ||
120 | .Fn SSL_CTX_get_read_ahead | ||
121 | and | ||
122 | .Fn SSL_get_read_ahead | ||
123 | return 0 if reading ahead is off or non-zero otherwise, | ||
124 | except that the return values are undefined for DTLS. | ||
125 | .Sh SEE ALSO | ||
126 | .Xr ssl 3 , | ||
127 | .Xr SSL_pending 3 | ||
128 | .Sh HISTORY | ||
129 | .Fn SSL_set_read_ahead | ||
130 | and | ||
131 | .Fn SSL_get_read_ahead | ||
132 | appeared in SSLeay 0.4 or earlier and have been available since | ||
133 | .Ox 2.4 . | ||
134 | .Pp | ||
135 | .Fn SSL_CTX_set_read_ahead , | ||
136 | .Fn SSL_CTX_get_read_ahead , | ||
137 | and | ||
138 | .Fn SSL_CTX_get_default_read_ahead | ||
139 | first appeared in OpenSSL 0.9.2b and have been available since | ||
140 | .Ox 2.6 . | ||
141 | .Sh CAVEATS | ||
142 | Switching read ahead on can impact the behaviour of the | ||
143 | .Xr SSL_pending 3 | ||
144 | function. | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_security_level.3 b/src/lib/libssl/man/SSL_CTX_set_security_level.3 deleted file mode 100644 index 89adb3d65d..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_security_level.3 +++ /dev/null | |||
@@ -1,159 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_security_level.3,v 1.2 2025/01/18 10:45:12 tb Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 2022 Ingo Schwarze <schwarze@openbsd.org> | ||
4 | .\" | ||
5 | .\" Permission to use, copy, modify, and distribute this software for any | ||
6 | .\" purpose with or without fee is hereby granted, provided that the above | ||
7 | .\" copyright notice and this permission notice appear in all copies. | ||
8 | .\" | ||
9 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | .\" | ||
17 | .Dd $Mdocdate: January 18 2025 $ | ||
18 | .Dt SSL_CTX_SET_SECURITY_LEVEL 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm SSL_CTX_set_security_level , | ||
22 | .Nm SSL_set_security_level , | ||
23 | .Nm SSL_CTX_get_security_level , | ||
24 | .Nm SSL_get_security_level | ||
25 | .Nd change security level for TLS | ||
26 | .Sh SYNOPSIS | ||
27 | .In openssl/ssl.h | ||
28 | .Ft void | ||
29 | .Fo SSL_CTX_set_security_level | ||
30 | .Fa "SSL_CTX *ctx" | ||
31 | .Fa "int level" | ||
32 | .Fc | ||
33 | .Ft void | ||
34 | .Fo SSL_set_security_level | ||
35 | .Fa "SSL *s" | ||
36 | .Fa "int level" | ||
37 | .Fc | ||
38 | .Ft int | ||
39 | .Fo SSL_CTX_get_security_level | ||
40 | .Fa "const SSL_CTX *ctx" | ||
41 | .Fc | ||
42 | .Ft int | ||
43 | .Fo SSL_get_security_level | ||
44 | .Fa "const SSL *s" | ||
45 | .Fc | ||
46 | .Sh DESCRIPTION | ||
47 | A security level is a set of restrictions on algorithms, key lengths, | ||
48 | protocol versions, and other features in TLS connections. | ||
49 | These restrictions apply in addition to those that exist from individually | ||
50 | selecting supported features, for example ciphers, curves, or algorithms. | ||
51 | .Pp | ||
52 | The following table shows properties of the various security levels: | ||
53 | .Bl -column # sec 15360 ECC TLS SHA1 -offset indent | ||
54 | .It # Ta sec Ta \0\0RSA Ta ECC Ta TLS Ta MAC | ||
55 | .It 0 Ta \0\00 Ta \0\0\0\00 Ta \0\00 Ta 1.0 Ta MD5 | ||
56 | .It 1 Ta \080 Ta \01024 Ta 160 Ta 1.0 Ta RC4 | ||
57 | .It 2 Ta 112 Ta \02048 Ta 224 Ta 1.0 Ta | ||
58 | .It 3 Ta 128 Ta \03072 Ta 256 Ta 1.1 Ta SHA1 | ||
59 | .It 4 Ta 192 Ta \07680 Ta 384 Ta 1.2 Ta | ||
60 | .It 5 Ta 256 Ta 15360 Ta 512 Ta 1.2 Ta | ||
61 | .El | ||
62 | .Pp | ||
63 | The meaning of the columns is as follows: | ||
64 | .Pp | ||
65 | .Bl -tag -width features -compact | ||
66 | .It # | ||
67 | The number of the | ||
68 | .Fa level . | ||
69 | .It sec | ||
70 | The minimum security strength measured in bits, which is approximately | ||
71 | the binary logarithm of the number of operations an attacker has | ||
72 | to perform in order to break a cryptographic key. | ||
73 | This minimum strength is enforced for all relevant parameters | ||
74 | including cipher suite encryption algorithms, ECC curves, signature | ||
75 | algorithms, DH parameter sizes, and certificate algorithms and key | ||
76 | sizes. | ||
77 | See SP800-57 below | ||
78 | .Sx SEE ALSO | ||
79 | for details on individual algorithms. | ||
80 | .It RSA | ||
81 | The minimum key length in bits for the RSA and DH algorithms. | ||
82 | .It ECC | ||
83 | The minimum key length in bits for ECC algorithms. | ||
84 | .It TLS | ||
85 | The minimum TLS protocol version. | ||
86 | .It MAC | ||
87 | Cipher suites using the given MACs are allowed on this level | ||
88 | and on lower levels, but not on higher levels. | ||
89 | .El | ||
90 | .Pp | ||
91 | Level 0 is only provided for backward compatibility and permits everything. | ||
92 | .Pp | ||
93 | Level 3 and higher disable support for session tickets | ||
94 | and only accept cipher suites that provide forward secrecy. | ||
95 | .Pp | ||
96 | The functions | ||
97 | .Fn SSL_CTX_set_security_level | ||
98 | and | ||
99 | .Fn SSL_set_security_level | ||
100 | choose the security | ||
101 | .Fa level | ||
102 | for | ||
103 | .Fa ctx | ||
104 | or | ||
105 | .Fa s , | ||
106 | respectively. | ||
107 | If not set, security level 1 is used. | ||
108 | .Pp | ||
109 | .Xr SSL_CTX_new 3 | ||
110 | initializes the security level of the new object to 1. | ||
111 | .Pp | ||
112 | .Xr SSL_new 3 | ||
113 | and | ||
114 | .Xr SSL_set_SSL_CTX 3 | ||
115 | copy the security level from the context to the SSL object. | ||
116 | .Pp | ||
117 | .Xr SSL_dup 3 | ||
118 | copies the security level from the old to the new object. | ||
119 | .Sh RETURN VALUES | ||
120 | .Fn SSL_CTX_get_security_level | ||
121 | and | ||
122 | .Fn SSL_get_security_level | ||
123 | return the security level configured in | ||
124 | .Fa ctx | ||
125 | or | ||
126 | .Fa s , | ||
127 | respectively. | ||
128 | .Sh SEE ALSO | ||
129 | .Xr EVP_PKEY_security_bits 3 , | ||
130 | .Xr RSA_security_bits 3 , | ||
131 | .Xr ssl 3 , | ||
132 | .Xr SSL_CTX_new 3 , | ||
133 | .Xr SSL_new 3 | ||
134 | .Rs | ||
135 | .%A Elaine Barker | ||
136 | .%T Recommendation for Key Management | ||
137 | .%I U.S. National Institute of Standards and Technology | ||
138 | .%R NIST Special Publication 800-57 Part 1 Revision 5 | ||
139 | .%U https://doi.org/10.6028/NIST.SP.800-57pt1r5 | ||
140 | .%C Gaithersburg, MD | ||
141 | .%D May 2020 | ||
142 | .Re | ||
143 | .Sh HISTORY | ||
144 | These functions first appeared in OpenSSL 1.1.0 | ||
145 | and have been available since | ||
146 | .Ox 7.2 . | ||
147 | .Sh CAVEATS | ||
148 | Applications which do not check the return values | ||
149 | of configuration functions will misbehave. | ||
150 | For example, if an application does not check the return value | ||
151 | after trying to set a certificate and the certificate is rejected | ||
152 | because of the security level, the application may behave as if | ||
153 | no certificate had been provided at all. | ||
154 | .Pp | ||
155 | While some restrictions may be handled gracefully by negotiations | ||
156 | between the client and the server, other restrictions may be | ||
157 | fatal and abort the TLS handshake. | ||
158 | For example, this can happen if the peer certificate contains a key | ||
159 | that is too short or if the DH parameter size is too small. | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 b/src/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 deleted file mode 100644 index 1fe67b2a7e..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 +++ /dev/null | |||
@@ -1,198 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_session_cache_mode.3,v 1.7 2019/06/12 09:36:30 schwarze Exp $ | ||
2 | .\" OpenSSL 67adf0a7 Dec 25 19:58:38 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org> and | ||
5 | .\" Geoff Thorpe <geoff@openssl.org>. | ||
6 | .\" Copyright (c) 2001, 2002 The OpenSSL Project. All rights reserved. | ||
7 | .\" | ||
8 | .\" Redistribution and use in source and binary forms, with or without | ||
9 | .\" modification, are permitted provided that the following conditions | ||
10 | .\" are met: | ||
11 | .\" | ||
12 | .\" 1. Redistributions of source code must retain the above copyright | ||
13 | .\" notice, this list of conditions and the following disclaimer. | ||
14 | .\" | ||
15 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
16 | .\" notice, this list of conditions and the following disclaimer in | ||
17 | .\" the documentation and/or other materials provided with the | ||
18 | .\" distribution. | ||
19 | .\" | ||
20 | .\" 3. All advertising materials mentioning features or use of this | ||
21 | .\" software must display the following acknowledgment: | ||
22 | .\" "This product includes software developed by the OpenSSL Project | ||
23 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
24 | .\" | ||
25 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | .\" endorse or promote products derived from this software without | ||
27 | .\" prior written permission. For written permission, please contact | ||
28 | .\" openssl-core@openssl.org. | ||
29 | .\" | ||
30 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
31 | .\" nor may "OpenSSL" appear in their names without prior written | ||
32 | .\" permission of the OpenSSL Project. | ||
33 | .\" | ||
34 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
35 | .\" acknowledgment: | ||
36 | .\" "This product includes software developed by the OpenSSL Project | ||
37 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
38 | .\" | ||
39 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | .\" | ||
52 | .Dd $Mdocdate: June 12 2019 $ | ||
53 | .Dt SSL_CTX_SET_SESSION_CACHE_MODE 3 | ||
54 | .Os | ||
55 | .Sh NAME | ||
56 | .Nm SSL_CTX_set_session_cache_mode , | ||
57 | .Nm SSL_CTX_get_session_cache_mode | ||
58 | .Nd enable/disable session caching | ||
59 | .Sh SYNOPSIS | ||
60 | .In openssl/ssl.h | ||
61 | .Ft long | ||
62 | .Fn SSL_CTX_set_session_cache_mode "SSL_CTX ctx" "long mode" | ||
63 | .Ft long | ||
64 | .Fn SSL_CTX_get_session_cache_mode "SSL_CTX ctx" | ||
65 | .Sh DESCRIPTION | ||
66 | .Fn SSL_CTX_set_session_cache_mode | ||
67 | enables/disables session caching by setting the operational mode for | ||
68 | .Ar ctx | ||
69 | to | ||
70 | .Ar mode . | ||
71 | .Pp | ||
72 | .Fn SSL_CTX_get_session_cache_mode | ||
73 | returns the currently used cache mode. | ||
74 | .Pp | ||
75 | The OpenSSL library can store/retrieve SSL/TLS sessions for later reuse. | ||
76 | The sessions can be held in memory for each | ||
77 | .Fa ctx , | ||
78 | if more than one | ||
79 | .Vt SSL_CTX | ||
80 | object is being maintained, the sessions are unique for each | ||
81 | .Vt SSL_CTX | ||
82 | object. | ||
83 | .Pp | ||
84 | In order to reuse a session, a client must send the session's id to the server. | ||
85 | It can only send exactly one id. | ||
86 | The server then either agrees to reuse the session or it starts a full | ||
87 | handshake (to create a new session). | ||
88 | .Pp | ||
89 | A server will look up the session in its internal session storage. | ||
90 | If the session is not found in internal storage or lookups for the internal | ||
91 | storage have been deactivated | ||
92 | .Pq Dv SSL_SESS_CACHE_NO_INTERNAL_LOOKUP , | ||
93 | the server will try the external storage if available. | ||
94 | .Pp | ||
95 | Since a client may try to reuse a session intended for use in a different | ||
96 | context, the session id context must be set by the server (see | ||
97 | .Xr SSL_CTX_set_session_id_context 3 ) . | ||
98 | .Pp | ||
99 | The following session cache modes and modifiers are available: | ||
100 | .Bl -tag -width Ds | ||
101 | .It Dv SSL_SESS_CACHE_OFF | ||
102 | No session caching for client or server takes place. | ||
103 | .It Dv SSL_SESS_CACHE_CLIENT | ||
104 | Client sessions are added to the session cache. | ||
105 | As there is no reliable way for the OpenSSL library to know whether a session | ||
106 | should be reused or which session to choose (due to the abstract BIO layer the | ||
107 | SSL engine does not have details about the connection), | ||
108 | the application must select the session to be reused by using the | ||
109 | .Xr SSL_set_session 3 | ||
110 | function. | ||
111 | This option is not activated by default. | ||
112 | .It Dv SSL_SESS_CACHE_SERVER | ||
113 | Server sessions are added to the session cache. | ||
114 | When a client proposes a session to be reused, the server looks for the | ||
115 | corresponding session in (first) the internal session cache (unless | ||
116 | .Dv SSL_SESS_CACHE_NO_INTERNAL_LOOKUP | ||
117 | is set), then (second) in the external cache if available. | ||
118 | If the session is found, the server will try to reuse the session. | ||
119 | This is the default. | ||
120 | .It Dv SSL_SESS_CACHE_BOTH | ||
121 | Enable both | ||
122 | .Dv SSL_SESS_CACHE_CLIENT | ||
123 | and | ||
124 | .Dv SSL_SESS_CACHE_SERVER | ||
125 | at the same time. | ||
126 | .It Dv SSL_SESS_CACHE_NO_AUTO_CLEAR | ||
127 | Normally the session cache is checked for expired sessions every 255 | ||
128 | connections using the | ||
129 | .Xr SSL_CTX_flush_sessions 3 | ||
130 | function. | ||
131 | Since this may lead to a delay which cannot be controlled, | ||
132 | the automatic flushing may be disabled and | ||
133 | .Xr SSL_CTX_flush_sessions 3 | ||
134 | can be called explicitly by the application. | ||
135 | .It Dv SSL_SESS_CACHE_NO_INTERNAL_LOOKUP | ||
136 | By setting this flag, session-resume operations in an SSL/TLS server will not | ||
137 | automatically look up sessions in the internal cache, | ||
138 | even if sessions are automatically stored there. | ||
139 | If external session caching callbacks are in use, | ||
140 | this flag guarantees that all lookups are directed to the external cache. | ||
141 | As automatic lookup only applies for SSL/TLS servers, | ||
142 | the flag has no effect on clients. | ||
143 | .It Dv SSL_SESS_CACHE_NO_INTERNAL_STORE | ||
144 | Depending on the presence of | ||
145 | .Dv SSL_SESS_CACHE_CLIENT | ||
146 | and/or | ||
147 | .Dv SSL_SESS_CACHE_SERVER , | ||
148 | sessions negotiated in an SSL/TLS handshake may be cached for possible reuse. | ||
149 | Normally a new session is added to the internal cache as well as any external | ||
150 | session caching (callback) that is configured for the | ||
151 | .Vt SSL_CTX . | ||
152 | This flag will prevent sessions being stored in the internal cache | ||
153 | (though the application can add them manually using | ||
154 | .Xr SSL_CTX_add_session 3 ) . | ||
155 | Note: | ||
156 | in any SSL/TLS servers where external caching is configured, any successful | ||
157 | session lookups in the external cache (e.g., for session-resume requests) would | ||
158 | normally be copied into the local cache before processing continues \(en this | ||
159 | flag prevents these additions to the internal cache as well. | ||
160 | .It Dv SSL_SESS_CACHE_NO_INTERNAL | ||
161 | Enable both | ||
162 | .Dv SSL_SESS_CACHE_NO_INTERNAL_LOOKUP | ||
163 | and | ||
164 | .Dv SSL_SESS_CACHE_NO_INTERNAL_STORE | ||
165 | at the same time. | ||
166 | .El | ||
167 | .Pp | ||
168 | The default mode is | ||
169 | .Dv SSL_SESS_CACHE_SERVER . | ||
170 | .Sh RETURN VALUES | ||
171 | .Fn SSL_CTX_set_session_cache_mode | ||
172 | returns the previously set cache mode. | ||
173 | .Pp | ||
174 | .Fn SSL_CTX_get_session_cache_mode | ||
175 | returns the currently set cache mode. | ||
176 | .Sh SEE ALSO | ||
177 | .Xr ssl 3 , | ||
178 | .Xr SSL_CTX_add_session 3 , | ||
179 | .Xr SSL_CTX_ctrl 3 , | ||
180 | .Xr SSL_CTX_flush_sessions 3 , | ||
181 | .Xr SSL_CTX_sess_number 3 , | ||
182 | .Xr SSL_CTX_sess_set_cache_size 3 , | ||
183 | .Xr SSL_CTX_sess_set_get_cb 3 , | ||
184 | .Xr SSL_CTX_set_session_id_context 3 , | ||
185 | .Xr SSL_CTX_set_timeout 3 , | ||
186 | .Xr SSL_session_reused 3 , | ||
187 | .Xr SSL_set_session 3 | ||
188 | .Sh HISTORY | ||
189 | .Fn SSL_CTX_set_session_cache_mode | ||
190 | and | ||
191 | .Fn SSL_CTX_get_session_cache_mode | ||
192 | first appeared in SSLeay 0.6.1 and have been available since | ||
193 | .Ox 2.4 . | ||
194 | .Pp | ||
195 | .Dv SSL_SESS_CACHE_NO_INTERNAL_STORE | ||
196 | and | ||
197 | .Dv SSL_SESS_CACHE_NO_INTERNAL | ||
198 | were introduced in OpenSSL 0.9.6h. | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_session_id_context.3 b/src/lib/libssl/man/SSL_CTX_set_session_id_context.3 deleted file mode 100644 index 06fd9348ae..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_session_id_context.3 +++ /dev/null | |||
@@ -1,160 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_session_id_context.3,v 1.6 2019/06/08 15:25:43 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001, 2004 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: June 8 2019 $ | ||
52 | .Dt SSL_CTX_SET_SESSION_ID_CONTEXT 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_CTX_set_session_id_context , | ||
56 | .Nm SSL_set_session_id_context | ||
57 | .Nd set context within which session can be reused (server side only) | ||
58 | .Sh SYNOPSIS | ||
59 | .In openssl/ssl.h | ||
60 | .Ft int | ||
61 | .Fo SSL_CTX_set_session_id_context | ||
62 | .Fa "SSL_CTX *ctx" | ||
63 | .Fa "const unsigned char *sid_ctx" | ||
64 | .Fa "unsigned int sid_ctx_len" | ||
65 | .Fc | ||
66 | .Ft int | ||
67 | .Fo SSL_set_session_id_context | ||
68 | .Fa "SSL *ssl" | ||
69 | .Fa "const unsigned char *sid_ctx" | ||
70 | .Fa "unsigned int sid_ctx_len" | ||
71 | .Fc | ||
72 | .Sh DESCRIPTION | ||
73 | .Fn SSL_CTX_set_session_id_context | ||
74 | sets the context | ||
75 | .Fa sid_ctx | ||
76 | of length | ||
77 | .Fa sid_ctx_len | ||
78 | within which a session can be reused for the | ||
79 | .Fa ctx | ||
80 | object. | ||
81 | .Pp | ||
82 | .Fn SSL_set_session_id_context | ||
83 | sets the context | ||
84 | .Fa sid_ctx | ||
85 | of length | ||
86 | .Fa sid_ctx_len | ||
87 | within which a session can be reused for the | ||
88 | .Fa ssl | ||
89 | object. | ||
90 | .Pp | ||
91 | Sessions are generated within a certain context. | ||
92 | When exporting/importing sessions with | ||
93 | .Xr i2d_SSL_SESSION 3 | ||
94 | and | ||
95 | .Xr d2i_SSL_SESSION 3 , | ||
96 | it would be possible to re-import a session generated from another context | ||
97 | (e.g., another application), which might lead to malfunctions. | ||
98 | Therefore each application must set its own session id context | ||
99 | .Fa sid_ctx | ||
100 | which is used to distinguish the contexts and is stored in exported sessions. | ||
101 | The | ||
102 | .Fa sid_ctx | ||
103 | can be any kind of binary data with a given length; it is therefore possible | ||
104 | to use, for instance, the name of the application, the hostname, the service | ||
105 | name... | ||
106 | .Pp | ||
107 | The session id context becomes part of the session. | ||
108 | The session id context is set by the SSL/TLS server. | ||
109 | The | ||
110 | .Fn SSL_CTX_set_session_id_context | ||
111 | and | ||
112 | .Fn SSL_set_session_id_context | ||
113 | functions are therefore only useful on the server side. | ||
114 | .Pp | ||
115 | OpenSSL clients will check the session id context returned by the server when | ||
116 | reusing a session. | ||
117 | .Pp | ||
118 | The maximum length of the | ||
119 | .Fa sid_ctx | ||
120 | is limited to | ||
121 | .Dv SSL_MAX_SSL_SESSION_ID_LENGTH . | ||
122 | .Sh WARNINGS | ||
123 | If the session id context is not set on an SSL/TLS server and client | ||
124 | certificates are used, stored sessions will not be reused but a fatal error | ||
125 | will be flagged and the handshake will fail. | ||
126 | .Pp | ||
127 | If a server returns a different session id context to an OpenSSL client | ||
128 | when reusing a session, an error will be flagged and the handshake will | ||
129 | fail. | ||
130 | OpenSSL servers will always return the correct session id context, | ||
131 | as an OpenSSL server checks the session id context itself before reusing | ||
132 | a session as described above. | ||
133 | .Sh RETURN VALUES | ||
134 | .Fn SSL_CTX_set_session_id_context | ||
135 | and | ||
136 | .Fn SSL_set_session_id_context | ||
137 | return the following values: | ||
138 | .Bl -tag -width Ds | ||
139 | .It 0 | ||
140 | The length | ||
141 | .Fa sid_ctx_len | ||
142 | of the session id context | ||
143 | .Fa sid_ctx | ||
144 | exceeded | ||
145 | the maximum allowed length of | ||
146 | .Dv SSL_MAX_SSL_SESSION_ID_LENGTH . | ||
147 | The error is logged to the error stack. | ||
148 | .It 1 | ||
149 | The operation succeeded. | ||
150 | .El | ||
151 | .Sh SEE ALSO | ||
152 | .Xr ssl 3 , | ||
153 | .Xr SSL_SESSION_set1_id_context 3 | ||
154 | .Sh HISTORY | ||
155 | .Fn SSL_set_session_id_context | ||
156 | first appeared in OpenSSL 0.9.2b. | ||
157 | .Fn SSL_CTX_set_session_id_context | ||
158 | first appeared in OpenSSL 0.9.3. | ||
159 | Both functions have been available since | ||
160 | .Ox 2.6 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_ssl_version.3 b/src/lib/libssl/man/SSL_CTX_set_ssl_version.3 deleted file mode 100644 index b1bdb92bb0..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_ssl_version.3 +++ /dev/null | |||
@@ -1,146 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_ssl_version.3,v 1.5 2021/05/11 19:48:56 tb Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2000, 2001, 2005 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: May 11 2021 $ | ||
52 | .Dt SSL_CTX_SET_SSL_VERSION 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_CTX_set_ssl_version , | ||
56 | .Nm SSL_set_ssl_method , | ||
57 | .Nm SSL_CTX_get_ssl_method , | ||
58 | .Nm SSL_get_ssl_method | ||
59 | .Nd choose a new TLS/SSL method | ||
60 | .Sh SYNOPSIS | ||
61 | .In openssl/ssl.h | ||
62 | .Ft int | ||
63 | .Fn SSL_CTX_set_ssl_version "SSL_CTX *ctx" "const SSL_METHOD *method" | ||
64 | .Ft int | ||
65 | .Fn SSL_set_ssl_method "SSL *s" "const SSL_METHOD *method" | ||
66 | .Ft const SSL_METHOD * | ||
67 | .Fn SSL_CTX_get_ssl_method "SSL_CTX *ctx" | ||
68 | .Ft const SSL_METHOD * | ||
69 | .Fn SSL_get_ssl_method "SSL *ssl" | ||
70 | .Sh DESCRIPTION | ||
71 | .Fn SSL_CTX_set_ssl_version | ||
72 | sets a new default TLS/SSL | ||
73 | .Fa method | ||
74 | for | ||
75 | .Vt SSL | ||
76 | objects newly created from this | ||
77 | .Fa ctx . | ||
78 | .Vt SSL | ||
79 | objects already created with | ||
80 | .Xr SSL_new 3 | ||
81 | are not affected, except when | ||
82 | .Xr SSL_clear 3 | ||
83 | is called. | ||
84 | .Pp | ||
85 | .Fn SSL_set_ssl_method | ||
86 | sets a new TLS/SSL | ||
87 | .Fa method | ||
88 | for a particular | ||
89 | .Vt SSL | ||
90 | object | ||
91 | .Fa s . | ||
92 | It may be reset when | ||
93 | .Xr SSL_clear 3 | ||
94 | is called. | ||
95 | .Pp | ||
96 | .Fn SSL_CTX_get_ssl_method | ||
97 | and | ||
98 | .Fn SSL_get_ssl_method | ||
99 | return a function pointer to the TLS/SSL method set in | ||
100 | .Fa ctx | ||
101 | and | ||
102 | .Fa ssl , | ||
103 | respectively. | ||
104 | .Pp | ||
105 | The available | ||
106 | .Fa method | ||
107 | choices are described in | ||
108 | .Xr SSL_CTX_new 3 . | ||
109 | .Pp | ||
110 | When | ||
111 | .Xr SSL_clear 3 | ||
112 | is called and no session is connected to an | ||
113 | .Vt SSL | ||
114 | object, the method of the | ||
115 | .Vt SSL | ||
116 | object is reset to the method currently set in the corresponding | ||
117 | .Vt SSL_CTX | ||
118 | object. | ||
119 | .Sh RETURN VALUES | ||
120 | The following return values can occur for | ||
121 | .Fn SSL_CTX_set_ssl_version | ||
122 | and | ||
123 | .Fn SSL_set_ssl_method : | ||
124 | .Bl -tag -width Ds | ||
125 | .It 0 | ||
126 | The new choice failed. | ||
127 | Check the error stack to find out the reason. | ||
128 | .It 1 | ||
129 | The operation succeeded. | ||
130 | .El | ||
131 | .Sh SEE ALSO | ||
132 | .Xr ssl 3 , | ||
133 | .Xr SSL_clear 3 , | ||
134 | .Xr SSL_CTX_new 3 , | ||
135 | .Xr SSL_new 3 , | ||
136 | .Xr SSL_set_connect_state 3 | ||
137 | .Sh HISTORY | ||
138 | .Fn SSL_CTX_set_ssl_version , | ||
139 | .Fn SSL_set_ssl_method , | ||
140 | and | ||
141 | .Fn SSL_get_ssl_method | ||
142 | first appeared in SSLeay 0.8.0 and have been available since | ||
143 | .Ox 2.4 . | ||
144 | .Fn SSL_CTX_get_ssl_method | ||
145 | first appeared in OpenSSL 1.1.0 and has been available since | ||
146 | .Ox 7.0 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_timeout.3 b/src/lib/libssl/man/SSL_CTX_set_timeout.3 deleted file mode 100644 index ab99e2016e..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_timeout.3 +++ /dev/null | |||
@@ -1,118 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_timeout.3,v 1.4 2018/03/27 17:35:50 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 27 2018 $ | ||
52 | .Dt SSL_CTX_SET_TIMEOUT 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_CTX_set_timeout , | ||
56 | .Nm SSL_CTX_get_timeout | ||
57 | .Nd manipulate timeout values for session caching | ||
58 | .Sh SYNOPSIS | ||
59 | .In openssl/ssl.h | ||
60 | .Ft long | ||
61 | .Fn SSL_CTX_set_timeout "SSL_CTX *ctx" "long t" | ||
62 | .Ft long | ||
63 | .Fn SSL_CTX_get_timeout "SSL_CTX *ctx" | ||
64 | .Sh DESCRIPTION | ||
65 | .Fn SSL_CTX_set_timeout | ||
66 | sets the timeout for newly created sessions for | ||
67 | .Fa ctx | ||
68 | to | ||
69 | .Fa t . | ||
70 | The timeout value | ||
71 | .Fa t | ||
72 | must be given in seconds. | ||
73 | .Pp | ||
74 | .Fn SSL_CTX_get_timeout | ||
75 | returns the currently set timeout value for | ||
76 | .Fa ctx . | ||
77 | .Pp | ||
78 | Whenever a new session is created, it is assigned a maximum lifetime. | ||
79 | This lifetime is specified by storing the creation time of the session and the | ||
80 | timeout value valid at this time. | ||
81 | If the actual time is later than creation time plus timeout, | ||
82 | the session is not reused. | ||
83 | .Pp | ||
84 | Due to this realization, all sessions behave according to the timeout value | ||
85 | valid at the time of the session negotiation. | ||
86 | Changes of the timeout value do not affect already established sessions. | ||
87 | .Pp | ||
88 | The expiration time of a single session can be modified using the | ||
89 | .Xr SSL_SESSION_get_time 3 | ||
90 | family of functions. | ||
91 | .Pp | ||
92 | Expired sessions are removed from the internal session cache, whenever | ||
93 | .Xr SSL_CTX_flush_sessions 3 | ||
94 | is called, either directly by the application or automatically (see | ||
95 | .Xr SSL_CTX_set_session_cache_mode 3 ) . | ||
96 | .Pp | ||
97 | The default value for session timeout is decided on a per-protocol basis; see | ||
98 | .Xr SSL_get_default_timeout 3 . | ||
99 | All currently supported protocols have the same default timeout value of 300 | ||
100 | seconds. | ||
101 | .Sh RETURN VALUES | ||
102 | .Fn SSL_CTX_set_timeout | ||
103 | returns the previously set timeout value. | ||
104 | .Pp | ||
105 | .Fn SSL_CTX_get_timeout | ||
106 | returns the currently set timeout value. | ||
107 | .Sh SEE ALSO | ||
108 | .Xr ssl 3 , | ||
109 | .Xr SSL_CTX_flush_sessions 3 , | ||
110 | .Xr SSL_CTX_set_session_cache_mode 3 , | ||
111 | .Xr SSL_get_default_timeout 3 , | ||
112 | .Xr SSL_SESSION_get_time 3 | ||
113 | .Sh HISTORY | ||
114 | .Fn SSL_CTX_set_timeout | ||
115 | and | ||
116 | .Fn SSL_CTX_get_timeout | ||
117 | first appeared in SSLeay 0.6.1 and have been available since | ||
118 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_tlsext_servername_callback.3 b/src/lib/libssl/man/SSL_CTX_set_tlsext_servername_callback.3 deleted file mode 100644 index 2b54406de8..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_tlsext_servername_callback.3 +++ /dev/null | |||
@@ -1,247 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_tlsext_servername_callback.3,v 1.6 2021/09/01 13:56:03 schwarze Exp $ | ||
2 | .\" full merge up to: OpenSSL 190b9a03 Jun 28 15:46:13 2017 +0800 | ||
3 | .\" selective merge up to: OpenSSL 6328d367 Jul 4 21:58:30 2020 +0200 | ||
4 | .\" | ||
5 | .\" This file was written by Jon Spillett <jon.spillett@oracle.com>, | ||
6 | .\" Paul Yang <yang dot yang at baishancloud dot com>, and | ||
7 | .\" Matt Caswell <matt@openssl.org>. | ||
8 | .\" Copyright (c) 2017, 2019 The OpenSSL Project. All rights reserved. | ||
9 | .\" | ||
10 | .\" Redistribution and use in source and binary forms, with or without | ||
11 | .\" modification, are permitted provided that the following conditions | ||
12 | .\" are met: | ||
13 | .\" | ||
14 | .\" 1. Redistributions of source code must retain the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer. | ||
16 | .\" | ||
17 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
18 | .\" notice, this list of conditions and the following disclaimer in | ||
19 | .\" the documentation and/or other materials provided with the | ||
20 | .\" distribution. | ||
21 | .\" | ||
22 | .\" 3. All advertising materials mentioning features or use of this | ||
23 | .\" software must display the following acknowledgment: | ||
24 | .\" "This product includes software developed by the OpenSSL Project | ||
25 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
26 | .\" | ||
27 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
28 | .\" endorse or promote products derived from this software without | ||
29 | .\" prior written permission. For written permission, please contact | ||
30 | .\" openssl-core@openssl.org. | ||
31 | .\" | ||
32 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
33 | .\" nor may "OpenSSL" appear in their names without prior written | ||
34 | .\" permission of the OpenSSL Project. | ||
35 | .\" | ||
36 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
37 | .\" acknowledgment: | ||
38 | .\" "This product includes software developed by the OpenSSL Project | ||
39 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
40 | .\" | ||
41 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
42 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
43 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
44 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
45 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
46 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
47 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
48 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
49 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
50 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
51 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
52 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
53 | .\" | ||
54 | .Dd $Mdocdate: September 1 2021 $ | ||
55 | .Dt SSL_CTX_SET_TLSEXT_SERVERNAME_CALLBACK 3 | ||
56 | .Os | ||
57 | .Sh NAME | ||
58 | .Nm SSL_CTX_set_tlsext_servername_callback , | ||
59 | .Nm SSL_CTX_set_tlsext_servername_arg , | ||
60 | .Nm SSL_get_servername_type , | ||
61 | .Nm SSL_get_servername , | ||
62 | .Nm SSL_set_tlsext_host_name | ||
63 | .Nd handle server name indication (SNI) | ||
64 | .Sh SYNOPSIS | ||
65 | .In openssl/ssl.h | ||
66 | .Ft long | ||
67 | .Fo SSL_CTX_set_tlsext_servername_callback | ||
68 | .Fa "SSL_CTX *ctx" | ||
69 | .Fa "int (*cb)(SSL *ssl, int *alert, void *arg)" | ||
70 | .Fc | ||
71 | .Ft long | ||
72 | .Fo SSL_CTX_set_tlsext_servername_arg | ||
73 | .Fa "SSL_CTX *ctx" | ||
74 | .Fa "void *arg" | ||
75 | .Fc | ||
76 | .Ft const char * | ||
77 | .Fo SSL_get_servername | ||
78 | .Fa "const SSL *ssl" | ||
79 | .Fa "const int type" | ||
80 | .Fc | ||
81 | .Ft int | ||
82 | .Fo SSL_get_servername_type | ||
83 | .Fa "const SSL *ssl" | ||
84 | .Fc | ||
85 | .Ft int | ||
86 | .Fo SSL_set_tlsext_host_name | ||
87 | .Fa "const SSL *ssl" | ||
88 | .Fa "const char *name" | ||
89 | .Fc | ||
90 | .Sh DESCRIPTION | ||
91 | .Fn SSL_CTX_set_tlsext_servername_callback | ||
92 | sets the application callback | ||
93 | .Fa cb | ||
94 | used by a server to perform any actions or configuration required based | ||
95 | on the servername extension received in the incoming connection. | ||
96 | Like the ALPN callback, it is executed during Client Hello processing. | ||
97 | When | ||
98 | .Fa cb | ||
99 | is | ||
100 | .Dv NULL , | ||
101 | SNI is not used. | ||
102 | .Pp | ||
103 | The servername callback should return one of the following values: | ||
104 | .Bl -tag -width Ds | ||
105 | .It Dv SSL_TLSEXT_ERR_OK | ||
106 | This is used to indicate that the servername requested by the client | ||
107 | has been accepted. | ||
108 | Typically a server will call | ||
109 | .Xr SSL_set_SSL_CTX 3 | ||
110 | in the callback to set up a different configuration | ||
111 | for the selected servername in this case. | ||
112 | .It Dv SSL_TLSEXT_ERR_ALERT_FATAL | ||
113 | In this case the servername requested by the client is not accepted | ||
114 | and the handshake will be aborted. | ||
115 | The value of the alert to be used should be stored in the location | ||
116 | pointed to by the | ||
117 | .Fa alert | ||
118 | parameter to the callback. | ||
119 | By default this value is initialised to | ||
120 | .Dv SSL_AD_UNRECOGNIZED_NAME . | ||
121 | .It Dv SSL_TLSEXT_ERR_ALERT_WARNING | ||
122 | If this value is returned, then the servername is not accepted by the server. | ||
123 | However, the handshake will continue and send a warning alert instead. | ||
124 | The value of the alert should be stored in the location pointed to by the | ||
125 | .Fa alert | ||
126 | parameter as for | ||
127 | .Dv SSL_TLSEXT_ERR_ALERT_FATAL | ||
128 | above. | ||
129 | Note that TLSv1.3 does not support warning alerts, so if TLSv1.3 has | ||
130 | been negotiated then this return value is treated the same way as | ||
131 | .Dv SSL_TLSEXT_ERR_NOACK . | ||
132 | .It Dv SSL_TLSEXT_ERR_NOACK | ||
133 | This return value indicates | ||
134 | that the servername is not accepted by the server. | ||
135 | No alerts are sent | ||
136 | and the server will not acknowledge the requested servername. | ||
137 | .El | ||
138 | .Pp | ||
139 | .Fn SSL_CTX_set_tlsext_servername_arg | ||
140 | sets a context-specific argument to be passed into the callback via the | ||
141 | .Fa arg | ||
142 | parameter for | ||
143 | .Fa ctx . | ||
144 | .ig end_of_get_servername_details | ||
145 | .\" I would suggest to comment out that second wall text of dubious | ||
146 | .\" usefulness and see if we can meet all these documented API | ||
147 | .\" requirements in the future or decide that it's not worth the | ||
148 | .\" effort. -- tb@ Aug 30, 2021 | ||
149 | .Pp | ||
150 | The behaviour of | ||
151 | .Fn SSL_get_servername | ||
152 | depends on a number of different factors. | ||
153 | In particular note that in TLSv1.3, | ||
154 | the servername is negotiated in every handshake. | ||
155 | In TLSv1.2 the servername is only negotiated on initial handshakes | ||
156 | and not on resumption handshakes. | ||
157 | .Bl -tag -width Ds | ||
158 | .It On the client, before the handshake: | ||
159 | If a servername has been set via a call to | ||
160 | .Fn SSL_set_tlsext_host_name , | ||
161 | then it will return that servername. | ||
162 | If one has not been set, but a TLSv1.2 resumption is being attempted | ||
163 | and the session from the original handshake had a servername | ||
164 | accepted by the server, then it will return that servername. | ||
165 | Otherwise it returns | ||
166 | .Dv NULL . | ||
167 | .It On the client, during or after the handshake,\ | ||
168 | if a TLSv1.2 (or below) resumption occurred: | ||
169 | If the session from the original handshake had a servername accepted by the | ||
170 | server, then it will return that servername. | ||
171 | Otherwise it returns the servername set via | ||
172 | .Fn SSL_set_tlsext_host_name | ||
173 | or | ||
174 | .Dv NULL | ||
175 | if it was not called. | ||
176 | .It On the client, during or after the handshake,\ | ||
177 | if a TLSv1.2 (or below) resumption did not occur: | ||
178 | It will return the servername set via | ||
179 | .Fn SSL_set_tlsext_host_name | ||
180 | or | ||
181 | .Dv NULL | ||
182 | if it was not called. | ||
183 | .It On the server, before the handshake: | ||
184 | The function will always return | ||
185 | .Dv NULL | ||
186 | before the handshake. | ||
187 | .It On the server, after the servername extension has been processed,\ | ||
188 | if a TLSv1.2 (or below) resumption occurred: | ||
189 | If a servername was accepted by the server in the original handshake, | ||
190 | then it will return that servername, or | ||
191 | .Dv NULL | ||
192 | otherwise. | ||
193 | .It On the server, after the servername extension has been processed,\ | ||
194 | if a TLSv1.2 (or below) resumption did not occur: | ||
195 | The function will return the servername | ||
196 | requested by the client in this handshake or | ||
197 | .Dv NULL | ||
198 | if none was requested. | ||
199 | .El | ||
200 | .Pp | ||
201 | Note that the early callback occurs before a servername extension | ||
202 | from the client is processed. | ||
203 | The servername, certificate and ALPN callbacks occur | ||
204 | after a servername extension from the client is processed. | ||
205 | .end_of_get_servername_details | ||
206 | .Pp | ||
207 | .Fn SSL_set_tlsext_host_name | ||
208 | sets the server name indication ClientHello extension | ||
209 | to contain the value | ||
210 | .Fa name , | ||
211 | or clears it if | ||
212 | .Fa name | ||
213 | is | ||
214 | .Dv NULL . | ||
215 | The type of server name indication | ||
216 | extension is set to | ||
217 | .Dv TLSEXT_NAMETYPE_host_name | ||
218 | as defined in RFC 3546. | ||
219 | .Pp | ||
220 | All three functions are implemented as macros. | ||
221 | .Sh RETURN VALUES | ||
222 | .Fn SSL_CTX_set_tlsext_servername_callback | ||
223 | and | ||
224 | .Fn SSL_CTX_set_tlsext_servername_arg | ||
225 | always return 1 indicating success. | ||
226 | .Pp | ||
227 | .Fn SSL_get_servername | ||
228 | returns a servername extension value of the specified type if provided | ||
229 | in the Client Hello, or | ||
230 | .Dv NULL | ||
231 | otherwise. | ||
232 | .Pp | ||
233 | .Fn SSL_get_servername_type | ||
234 | returns the servername type or -1 if no servername is present. | ||
235 | Currently the only supported type (defined in RFC 3546) is | ||
236 | .Dv TLSEXT_NAMETYPE_host_name . | ||
237 | .Pp | ||
238 | .Fn SSL_set_tlsext_host_name | ||
239 | returns 1 on success or 0 in case of an error. | ||
240 | .Sh SEE ALSO | ||
241 | .Xr ssl 3 , | ||
242 | .Xr SSL_CTX_callback_ctrl 3 , | ||
243 | .Xr SSL_CTX_set_alpn_select_cb 3 | ||
244 | .Sh HISTORY | ||
245 | These functions first appeared in OpenSSL 0.9.8f | ||
246 | and have been available since | ||
247 | .Ox 4.5 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_tlsext_status_cb.3 b/src/lib/libssl/man/SSL_CTX_set_tlsext_status_cb.3 deleted file mode 100644 index d5979af1e8..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_tlsext_status_cb.3 +++ /dev/null | |||
@@ -1,238 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_tlsext_status_cb.3,v 1.8 2021/09/11 18:58:41 schwarze Exp $ | ||
2 | .\" full merge up to: OpenSSL 43c34894 Nov 30 16:04:51 2015 +0000 | ||
3 | .\" selective merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100 | ||
4 | .\" | ||
5 | .\" This file was written by Matt Caswell <matt@openssl.org>. | ||
6 | .\" Copyright (c) 2015, 2016 The OpenSSL Project. All rights reserved. | ||
7 | .\" | ||
8 | .\" Redistribution and use in source and binary forms, with or without | ||
9 | .\" modification, are permitted provided that the following conditions | ||
10 | .\" are met: | ||
11 | .\" | ||
12 | .\" 1. Redistributions of source code must retain the above copyright | ||
13 | .\" notice, this list of conditions and the following disclaimer. | ||
14 | .\" | ||
15 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
16 | .\" notice, this list of conditions and the following disclaimer in | ||
17 | .\" the documentation and/or other materials provided with the | ||
18 | .\" distribution. | ||
19 | .\" | ||
20 | .\" 3. All advertising materials mentioning features or use of this | ||
21 | .\" software must display the following acknowledgment: | ||
22 | .\" "This product includes software developed by the OpenSSL Project | ||
23 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
24 | .\" | ||
25 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | .\" endorse or promote products derived from this software without | ||
27 | .\" prior written permission. For written permission, please contact | ||
28 | .\" openssl-core@openssl.org. | ||
29 | .\" | ||
30 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
31 | .\" nor may "OpenSSL" appear in their names without prior written | ||
32 | .\" permission of the OpenSSL Project. | ||
33 | .\" | ||
34 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
35 | .\" acknowledgment: | ||
36 | .\" "This product includes software developed by the OpenSSL Project | ||
37 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
38 | .\" | ||
39 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | .\" | ||
52 | .Dd $Mdocdate: September 11 2021 $ | ||
53 | .Dt SSL_CTX_SET_TLSEXT_STATUS_CB 3 | ||
54 | .Os | ||
55 | .Sh NAME | ||
56 | .Nm SSL_CTX_set_tlsext_status_cb , | ||
57 | .Nm SSL_CTX_get_tlsext_status_cb , | ||
58 | .Nm SSL_CTX_set_tlsext_status_arg , | ||
59 | .Nm SSL_CTX_get_tlsext_status_arg , | ||
60 | .Nm SSL_set_tlsext_status_type , | ||
61 | .Nm SSL_get_tlsext_status_type , | ||
62 | .Nm SSL_get_tlsext_status_ocsp_resp , | ||
63 | .Nm SSL_set_tlsext_status_ocsp_resp | ||
64 | .Nd OCSP Certificate Status Request functions | ||
65 | .Sh SYNOPSIS | ||
66 | .In openssl/tls1.h | ||
67 | .Ft long | ||
68 | .Fo SSL_CTX_set_tlsext_status_cb | ||
69 | .Fa "SSL_CTX *ctx" | ||
70 | .Fa "int (*callback)(SSL *, void *)" | ||
71 | .Fc | ||
72 | .Ft long | ||
73 | .Fo SSL_CTX_get_tlsext_status_cb | ||
74 | .Fa "SSL_CTX *ctx" | ||
75 | .Fa "int (*callback)(SSL *, void *)" | ||
76 | .Fc | ||
77 | .Ft long | ||
78 | .Fo SSL_CTX_set_tlsext_status_arg | ||
79 | .Fa "SSL_CTX *ctx" | ||
80 | .Fa "void *arg" | ||
81 | .Fc | ||
82 | .Ft long | ||
83 | .Fo SSL_CTX_get_tlsext_status_arg | ||
84 | .Fa "SSL_CTX *ctx" | ||
85 | .Fa "void **arg" | ||
86 | .Fc | ||
87 | .Ft long | ||
88 | .Fo SSL_set_tlsext_status_type | ||
89 | .Fa "SSL *s" | ||
90 | .Fa "int type" | ||
91 | .Fc | ||
92 | .Ft long | ||
93 | .Fo SSL_get_tlsext_status_type | ||
94 | .Fa "SSL *s" | ||
95 | .Fc | ||
96 | .Ft long | ||
97 | .Fo SSL_get_tlsext_status_ocsp_resp | ||
98 | .Fa ssl | ||
99 | .Fa "unsigned char **resp" | ||
100 | .Fc | ||
101 | .Ft long | ||
102 | .Fo SSL_set_tlsext_status_ocsp_resp | ||
103 | .Fa ssl | ||
104 | .Fa "unsigned char *resp" | ||
105 | .Fa "int len" | ||
106 | .Fc | ||
107 | .Sh DESCRIPTION | ||
108 | A client application may request that a server send back an OCSP status | ||
109 | response (also known as OCSP stapling). | ||
110 | To do so the client should call the | ||
111 | .Fn SSL_set_tlsext_status_type | ||
112 | function on an individual | ||
113 | .Vt SSL | ||
114 | object prior to the start of the handshake. | ||
115 | Currently the only supported type is | ||
116 | .Dv TLSEXT_STATUSTYPE_ocsp . | ||
117 | This value should be passed in the | ||
118 | .Fa type | ||
119 | argument. | ||
120 | .Pp | ||
121 | The client should additionally provide a callback function to decide | ||
122 | what to do with the returned OCSP response by calling | ||
123 | .Fn SSL_CTX_set_tlsext_status_cb . | ||
124 | The callback function should determine whether the returned OCSP | ||
125 | response is acceptable or not. | ||
126 | The callback will be passed as an argument the value previously set via | ||
127 | a call to | ||
128 | .Fn SSL_CTX_set_tlsext_status_arg . | ||
129 | Note that the callback will not be called in the event of a handshake | ||
130 | where session resumption occurs (because there are no Certificates | ||
131 | exchanged in such a handshake). | ||
132 | .Pp | ||
133 | The callback previously set via | ||
134 | .Fn SSL_CTX_set_tlsext_status_cb | ||
135 | can be retrieved by calling | ||
136 | .Fn SSL_CTX_get_tlsext_status_cb , | ||
137 | and the argument by calling | ||
138 | .Fn SSL_CTX_get_tlsext_status_arg . | ||
139 | .Pp | ||
140 | On the client side, | ||
141 | .Fn SSL_get_tlsext_status_type | ||
142 | can be used to determine whether the client has previously called | ||
143 | .Fn SSL_set_tlsext_status_type . | ||
144 | It will return | ||
145 | .Dv TLSEXT_STATUSTYPE_ocsp | ||
146 | if it has been called or \-1 otherwise. | ||
147 | On the server side, | ||
148 | .Fn SSL_get_tlsext_status_type | ||
149 | can be used to determine whether the client requested OCSP stapling. | ||
150 | If the client requested it, then this function will return | ||
151 | .Dv TLSEXT_STATUSTYPE_ocsp , | ||
152 | or \-1 otherwise. | ||
153 | .Pp | ||
154 | The response returned by the server can be obtained via a call to | ||
155 | .Fn SSL_get_tlsext_status_ocsp_resp . | ||
156 | The value | ||
157 | .Pf * Fa resp | ||
158 | will be updated to point to the OCSP response data and the return value | ||
159 | will be the length of that data. | ||
160 | If the server has not provided any response data, then | ||
161 | .Pf * Fa resp | ||
162 | will be | ||
163 | .Dv NULL | ||
164 | and the return value from | ||
165 | .Fn SSL_get_tlsext_status_ocsp_resp | ||
166 | will be -1. | ||
167 | .Pp | ||
168 | A server application must also call the | ||
169 | .Fn SSL_CTX_set_tlsext_status_cb | ||
170 | function if it wants to be able to provide clients with OCSP Certificate | ||
171 | Status responses. | ||
172 | Typically the server callback would obtain the server certificate that | ||
173 | is being sent back to the client via a call to | ||
174 | .Xr SSL_get_certificate 3 , | ||
175 | obtain the OCSP response to be sent back, and then set that response | ||
176 | data by calling | ||
177 | .Fn SSL_set_tlsext_status_ocsp_resp . | ||
178 | A pointer to the response data should be provided in the | ||
179 | .Fa resp | ||
180 | argument, and the length of that data should be in the | ||
181 | .Fa len | ||
182 | argument. | ||
183 | .Sh RETURN VALUES | ||
184 | The callback when used on the client side should return a negative | ||
185 | value on error, 0 if the response is not acceptable (in which case | ||
186 | the handshake will fail), or a positive value if it is acceptable. | ||
187 | .Pp | ||
188 | The callback when used on the server side should return with either | ||
189 | .Dv SSL_TLSEXT_ERR_OK | ||
190 | (meaning that the OCSP response that has been set should be returned), | ||
191 | .Dv SSL_TLSEXT_ERR_NOACK | ||
192 | (meaning that an OCSP response should not be returned), or | ||
193 | .Dv SSL_TLSEXT_ERR_ALERT_FATAL | ||
194 | (meaning that a fatal error has occurred). | ||
195 | .Pp | ||
196 | .Fn SSL_CTX_set_tlsext_status_cb , | ||
197 | .Fn SSL_CTX_get_tlsext_status_cb , | ||
198 | .Fn SSL_CTX_set_tlsext_status_arg , | ||
199 | .Fn SSL_CTX_get_tlsext_status_arg , | ||
200 | .Fn SSL_set_tlsext_status_type , | ||
201 | and | ||
202 | .Fn SSL_set_tlsext_status_ocsp_resp | ||
203 | always return 1, indicating success. | ||
204 | .Pp | ||
205 | .Fn SSL_get_tlsext_status_type | ||
206 | returns | ||
207 | .Dv TLSEXT_STATUSTYPE_ocsp | ||
208 | on the client side if | ||
209 | .Fn SSL_set_tlsext_status_type | ||
210 | was previously called, or on the server side | ||
211 | if the client requested OCSP stapling. | ||
212 | Otherwise \-1 is returned. | ||
213 | .Pp | ||
214 | .Fn SSL_get_tlsext_status_ocsp_resp | ||
215 | returns the length of the OCSP response data | ||
216 | or \-1 if there is no OCSP response data. | ||
217 | .Sh SEE ALSO | ||
218 | .Xr ssl 3 , | ||
219 | .Xr SSL_CTX_callback_ctrl 3 | ||
220 | .Sh HISTORY | ||
221 | .Fn SSL_CTX_set_tlsext_status_cb , | ||
222 | .Fn SSL_CTX_set_tlsext_status_arg , | ||
223 | .Fn SSL_set_tlsext_status_type , | ||
224 | .Fn SSL_get_tlsext_status_ocsp_resp , | ||
225 | and | ||
226 | .Fn SSL_set_tlsext_status_ocsp_resp | ||
227 | first appeared in OpenSSL 0.9.8h and have been available since | ||
228 | .Ox 4.5 . | ||
229 | .Pp | ||
230 | .Fn SSL_CTX_get_tlsext_status_cb | ||
231 | and | ||
232 | .Fn SSL_CTX_get_tlsext_status_arg | ||
233 | first appeared in OpenSSL 1.1.0 and have been available since | ||
234 | .Ox 6.3 . | ||
235 | .Pp | ||
236 | .Fn SSL_get_tlsext_status_type | ||
237 | first appeared in OpenSSL 1.1.0 and has been available since | ||
238 | .Ox 7.0 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 b/src/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 deleted file mode 100644 index b6ccabaeca..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 +++ /dev/null | |||
@@ -1,300 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_tlsext_ticket_key_cb.3,v 1.8 2022/01/25 18:01:20 tb Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Rich Salz <rsalz@akamai.com> | ||
5 | .\" Copyright (c) 2014, 2015, 2016 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: January 25 2022 $ | ||
52 | .Dt SSL_CTX_SET_TLSEXT_TICKET_KEY_CB 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_CTX_set_tlsext_ticket_key_cb | ||
56 | .Nd set a callback for session ticket processing | ||
57 | .Sh SYNOPSIS | ||
58 | .In openssl/tls1.h | ||
59 | .Ft long | ||
60 | .Fo SSL_CTX_set_tlsext_ticket_key_cb | ||
61 | .Fa "SSL_CTX sslctx" | ||
62 | .Fa "int (*cb)(SSL *s, unsigned char key_name[16],\ | ||
63 | unsigned char iv[EVP_MAX_IV_LENGTH],\ | ||
64 | EVP_CIPHER_CTX *ctx, HMAC_CTX *hctx, int enc)" | ||
65 | .Fc | ||
66 | .Sh DESCRIPTION | ||
67 | .Fn SSL_CTX_set_tlsext_ticket_key_cb | ||
68 | sets a callback function | ||
69 | .Fa cb | ||
70 | for handling session tickets for the ssl context | ||
71 | .Fa sslctx . | ||
72 | Session tickets, defined in RFC 5077, provide an enhanced session | ||
73 | resumption capability where the server implementation is not required to | ||
74 | maintain per session state. | ||
75 | .Pp | ||
76 | The callback function | ||
77 | .Fa cb | ||
78 | will be called for every client instigated TLS session when session | ||
79 | ticket extension is presented in the TLS hello message. | ||
80 | It is the responsibility of this function to create or retrieve the | ||
81 | cryptographic parameters and to maintain their state. | ||
82 | .Pp | ||
83 | The OpenSSL library uses the callback function to help implement a | ||
84 | common TLS ticket construction state according to RFC 5077 Section 4 such | ||
85 | that per session state is unnecessary and a small set of cryptographic | ||
86 | variables needs to be maintained by the callback function | ||
87 | implementation. | ||
88 | .Pp | ||
89 | In order to reuse a session, a TLS client must send a session ticket | ||
90 | extension to the server. | ||
91 | The client can only send exactly one session ticket. | ||
92 | The server, through the callback function, either agrees to reuse the | ||
93 | session ticket information or it starts a full TLS handshake to create a | ||
94 | new session ticket. | ||
95 | .Pp | ||
96 | The callback is called with | ||
97 | .Fa ctx | ||
98 | and | ||
99 | .Fa hctx | ||
100 | which were newly allocated with | ||
101 | .Xr EVP_CIPHER_CTX_new 3 | ||
102 | and | ||
103 | .Xr HMAC_CTX_new 3 , | ||
104 | respectively. | ||
105 | .Pp | ||
106 | For new sessions tickets, when the client doesn't present a session | ||
107 | ticket, or an attempted retrieval of the ticket failed, or a renew | ||
108 | option was indicated, the callback function will be called with | ||
109 | .Fa enc | ||
110 | equal to 1. | ||
111 | The OpenSSL library expects that the function will set an arbitrary | ||
112 | .Fa key_name , | ||
113 | initialize | ||
114 | .Fa iv , | ||
115 | and set the cipher context | ||
116 | .Fa ctx | ||
117 | and the hash context | ||
118 | .Fa hctx . | ||
119 | .Pp | ||
120 | The | ||
121 | .Fa key_name | ||
122 | is 16 characters long and is used as a key identifier. | ||
123 | .Pp | ||
124 | The | ||
125 | .Fa iv | ||
126 | length is the length of the IV of the corresponding cipher. | ||
127 | The maximum IV length is | ||
128 | .Dv EVP_MAX_IV_LENGTH | ||
129 | bytes defined in | ||
130 | .In openssl/evp.h . | ||
131 | .Pp | ||
132 | The initialization vector | ||
133 | .Fa iv | ||
134 | should be a random value. | ||
135 | The cipher context | ||
136 | .Fa ctx | ||
137 | should use the initialisation vector | ||
138 | .Fa iv . | ||
139 | The cipher context can be set using | ||
140 | .Xr EVP_EncryptInit_ex 3 . | ||
141 | The hmac context can be set using | ||
142 | .Xr HMAC_Init_ex 3 . | ||
143 | .Pp | ||
144 | When the client presents a session ticket, the callback function | ||
145 | with be called with | ||
146 | .Fa enc | ||
147 | set to 0 indicating that the | ||
148 | .Fa cb | ||
149 | function should retrieve a set of parameters. | ||
150 | In this case | ||
151 | .Fa key_name | ||
152 | and | ||
153 | .Fa iv | ||
154 | have already been parsed out of the session ticket. | ||
155 | The OpenSSL library expects that the | ||
156 | .Em key_name | ||
157 | will be used to retrieve a cryptographic parameters and that the | ||
158 | cryptographic context | ||
159 | .Fa ctx | ||
160 | will be set with the retrieved parameters and the initialization vector | ||
161 | .Fa iv | ||
162 | using a function like | ||
163 | .Xr EVP_DecryptInit_ex 3 . | ||
164 | The | ||
165 | .Fa hctx | ||
166 | needs to be set using | ||
167 | .Xr HMAC_Init_ex 3 . | ||
168 | .Pp | ||
169 | If the | ||
170 | .Fa key_name | ||
171 | is still valid but a renewal of the ticket is required, the callback | ||
172 | function should return 2. | ||
173 | The library will call the callback again with an argument of | ||
174 | .Fa enc | ||
175 | equal to 1 to set the new ticket. | ||
176 | .Pp | ||
177 | The return value of the | ||
178 | .Fa cb | ||
179 | function is used by OpenSSL to determine what further processing will | ||
180 | occur. | ||
181 | The following return values have meaning: | ||
182 | .Bl -tag -width Ds | ||
183 | .It 2 | ||
184 | This indicates that the | ||
185 | .Fa ctx | ||
186 | and | ||
187 | .Fa hctx | ||
188 | have been set and the session can continue on those parameters. | ||
189 | Additionally it indicates that the session ticket is in a renewal period | ||
190 | and should be replaced. | ||
191 | The OpenSSL library will call | ||
192 | .Fa cb | ||
193 | again with an | ||
194 | .Fa enc | ||
195 | argument of 1 to set the new ticket (see RFC 5077 3.3 paragraph 2). | ||
196 | .It 1 | ||
197 | This indicates that the | ||
198 | .Fa ctx | ||
199 | and | ||
200 | .Fa hctx | ||
201 | have been set and the session can continue on those parameters. | ||
202 | .It 0 | ||
203 | This indicates that it was not possible to set/retrieve a session ticket | ||
204 | and the SSL/TLS session will continue by negotiating a set of | ||
205 | cryptographic parameters or using the alternate SSL/TLS resumption | ||
206 | mechanism, session ids. | ||
207 | .Pp | ||
208 | If called with | ||
209 | .Fa enc | ||
210 | equal to 0, the library will call the | ||
211 | .Fa cb | ||
212 | again to get a new set of parameters. | ||
213 | .It less than 0 | ||
214 | This indicates an error. | ||
215 | .El | ||
216 | .Pp | ||
217 | Session resumption shortcuts the TLS so that the client certificate | ||
218 | negotiation don't occur. | ||
219 | It makes up for this by storing client certificate and all other | ||
220 | negotiated state information encrypted within the ticket. | ||
221 | In a resumed session the applications will have all this state | ||
222 | information available exactly as if a full negotiation had occurred. | ||
223 | .Pp | ||
224 | If an attacker can obtain the key used to encrypt a session ticket, they | ||
225 | can obtain the master secret for any ticket using that key and decrypt | ||
226 | any traffic using that session: even if the ciphersuite supports forward | ||
227 | secrecy. | ||
228 | As a result applications may wish to use multiple keys and avoid using | ||
229 | long term keys stored in files. | ||
230 | .Pp | ||
231 | Applications can use longer keys to maintain a consistent level of | ||
232 | security. | ||
233 | For example if a ciphersuite uses 256 bit ciphers but only a 128 bit | ||
234 | ticket key the overall security is only 128 bits because breaking the | ||
235 | ticket key will enable an attacker to obtain the session keys. | ||
236 | .Sh RETURN VALUES | ||
237 | This function returns 0 to indicate that the callback function was set. | ||
238 | .Sh EXAMPLES | ||
239 | Reference Implementation: | ||
240 | .Bd -literal | ||
241 | SSL_CTX_set_tlsext_ticket_key_cb(SSL, ssl_tlsext_ticket_key_cb); | ||
242 | \&.... | ||
243 | static int ssl_tlsext_ticket_key_cb(SSL *s, unsigned char key_name[16], | ||
244 | unsigned char *iv, EVP_CIPHER_CTX *ctx, HMAC_CTX *hctx, int enc) | ||
245 | { | ||
246 | if (enc) { /* create new session */ | ||
247 | if (RAND_bytes(iv, EVP_MAX_IV_LENGTH)) | ||
248 | return -1; /* insufficient random */ | ||
249 | |||
250 | key = currentkey(); /* something you need to implement */ | ||
251 | if (!key) { | ||
252 | /* current key doesn't exist or isn't valid */ | ||
253 | key = createkey(); | ||
254 | /* something that you need to implement. | ||
255 | * createkey needs to initialise a name, | ||
256 | * an aes_key, a hmac_key, and optionally | ||
257 | * an expire time. */ | ||
258 | if (!key) /* key couldn't be created */ | ||
259 | return 0; | ||
260 | } | ||
261 | memcpy(key_name, key->name, 16); | ||
262 | |||
263 | EVP_EncryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL, | ||
264 | key->aes_key, iv); | ||
265 | HMAC_Init_ex(&hctx, key->hmac_key, 16, EVP_sha256(), NULL); | ||
266 | |||
267 | return 1; | ||
268 | |||
269 | } else { /* retrieve session */ | ||
270 | key = findkey(name); | ||
271 | |||
272 | if (!key || key->expire < now()) | ||
273 | return 0; | ||
274 | |||
275 | HMAC_Init_ex(&hctx, key->hmac_key, 16, EVP_sha256(), NULL); | ||
276 | EVP_DecryptInit_ex(&ctx, EVP_aes_128_cbc(), NULL, | ||
277 | key->aes_key, iv ); | ||
278 | |||
279 | if (key->expire < (now() - RENEW_TIME)) | ||
280 | /* this session will get a new ticket | ||
281 | * even though the current is still valid */ | ||
282 | return 2; | ||
283 | |||
284 | return 1; | ||
285 | } | ||
286 | } | ||
287 | .Ed | ||
288 | .Sh SEE ALSO | ||
289 | .Xr ssl 3 , | ||
290 | .Xr SSL_CTX_add_session 3 , | ||
291 | .Xr SSL_CTX_callback_ctrl 3 , | ||
292 | .Xr SSL_CTX_sess_number 3 , | ||
293 | .Xr SSL_CTX_sess_set_get_cb 3 , | ||
294 | .Xr SSL_CTX_set_session_id_context 3 , | ||
295 | .Xr SSL_session_reused 3 , | ||
296 | .Xr SSL_set_session 3 | ||
297 | .Sh HISTORY | ||
298 | .Fn SSL_CTX_set_tlsext_ticket_key_cb | ||
299 | first appeared in OpenSSL 0.9.8h and has been available since | ||
300 | .Ox 4.5 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_tlsext_use_srtp.3 b/src/lib/libssl/man/SSL_CTX_set_tlsext_use_srtp.3 deleted file mode 100644 index 04c4833c6a..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_tlsext_use_srtp.3 +++ /dev/null | |||
@@ -1,197 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_tlsext_use_srtp.3,v 1.6 2021/06/11 19:41:39 jmc Exp $ | ||
2 | .\" full merge up to: OpenSSL b0edda11 Mar 20 13:00:17 2018 +0000 | ||
3 | .\" | ||
4 | .\" This file was written by Matt Caswell <matt@openssl.org>. | ||
5 | .\" Copyright (c) 2017 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: June 11 2021 $ | ||
52 | .Dt SSL_CTX_SET_TLSEXT_USE_SRTP 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_CTX_set_tlsext_use_srtp , | ||
56 | .Nm SSL_set_tlsext_use_srtp , | ||
57 | .Nm SSL_get_srtp_profiles , | ||
58 | .Nm SSL_get_selected_srtp_profile | ||
59 | .Nd Configure and query SRTP support | ||
60 | .Sh SYNOPSIS | ||
61 | .In openssl/srtp.h | ||
62 | .Ft int | ||
63 | .Fo SSL_CTX_set_tlsext_use_srtp | ||
64 | .Fa "SSL_CTX *ctx" | ||
65 | .Fa "const char *profiles" | ||
66 | .Fc | ||
67 | .Ft int | ||
68 | .Fo SSL_set_tlsext_use_srtp | ||
69 | .Fa "SSL *ssl" | ||
70 | .Fa "const char *profiles" | ||
71 | .Fc | ||
72 | .Ft STACK_OF(SRTP_PROTECTION_PROFILE) * | ||
73 | .Fo SSL_get_srtp_profiles | ||
74 | .Fa "SSL *ssl" | ||
75 | .Fc | ||
76 | .Ft SRTP_PROTECTION_PROFILE * | ||
77 | .Fo SSL_get_selected_srtp_profile | ||
78 | .Fa "SSL *ssl" | ||
79 | .Fc | ||
80 | .Sh DESCRIPTION | ||
81 | SRTP is the Secure Real-Time Transport Protocol. | ||
82 | OpenSSL implements support for the "use_srtp" DTLS extension | ||
83 | defined in RFC 5764. | ||
84 | This provides a mechanism for establishing SRTP keying material, | ||
85 | algorithms and parameters using DTLS. | ||
86 | This capability may be used as part of an implementation that | ||
87 | conforms to RFC 5763. | ||
88 | OpenSSL does not implement SRTP itself or RFC 5763. | ||
89 | Note that OpenSSL does not support the use of SRTP Master Key | ||
90 | Identifiers (MKIs). | ||
91 | Also note that this extension is only supported in DTLS. | ||
92 | Any SRTP configuration is ignored if a TLS connection is attempted. | ||
93 | .Pp | ||
94 | An OpenSSL client wishing to send the "use_srtp" extension should call | ||
95 | .Fn SSL_CTX_set_tlsext_use_srtp | ||
96 | to set its use for all | ||
97 | .Vt SSL | ||
98 | objects subsequently created from | ||
99 | .Fa ctx . | ||
100 | Alternatively a client may call | ||
101 | .Fn SSL_set_tlsext_use_srtp | ||
102 | to set its use for an individual | ||
103 | .Vt SSL | ||
104 | object. | ||
105 | The | ||
106 | .Fa profiles | ||
107 | parameter should point to a NUL-terminated, colon delimited list of | ||
108 | SRTP protection profile names. | ||
109 | .Pp | ||
110 | The currently supported protection profile names are: | ||
111 | .Bl -tag -width Ds | ||
112 | .It Dv SRTP_AES128_CM_SHA1_80 | ||
113 | This corresponds to SRTP_AES128_CM_HMAC_SHA1_80 defined in RFC 5764. | ||
114 | .It Dv SRTP_AES128_CM_SHA1_32 | ||
115 | This corresponds to SRTP_AES128_CM_HMAC_SHA1_32 defined in RFC 5764. | ||
116 | .It Dv SRTP_AEAD_AES_128_GCM | ||
117 | This corresponds to SRTP_AEAD_AES_128_GCM defined in RFC 7714. | ||
118 | .It Dv SRTP_AEAD_AES_256_GCM | ||
119 | This corresponds to SRTP_AEAD_AES_256_GCM defined in RFC 7714. | ||
120 | .El | ||
121 | .Pp | ||
122 | Supplying an unrecognised protection profile name results in an error. | ||
123 | .Pp | ||
124 | An OpenSSL server wishing to support the "use_srtp" extension should | ||
125 | also call | ||
126 | .Fn SSL_CTX_set_tlsext_use_srtp | ||
127 | or | ||
128 | .Fn SSL_set_tlsext_use_srtp | ||
129 | to indicate the protection profiles that it is willing to negotiate. | ||
130 | .Pp | ||
131 | The currently configured list of protection profiles for either a client | ||
132 | or a server can be obtained by calling | ||
133 | .Fn SSL_get_srtp_profiles . | ||
134 | This returns a stack of | ||
135 | .Vt SRTP_PROTECTION_PROFILE | ||
136 | objects. | ||
137 | The memory pointed to in the return value of this function should not be | ||
138 | freed by the caller. | ||
139 | .Pp | ||
140 | After a handshake has been completed, the negotiated SRTP protection | ||
141 | profile (if any) can be obtained (on the client or the server) by | ||
142 | calling | ||
143 | .Fn SSL_get_selected_srtp_profile . | ||
144 | This function returns | ||
145 | .Dv NULL | ||
146 | if no SRTP protection profile was negotiated. | ||
147 | The memory returned from this function should not be freed by the | ||
148 | caller. | ||
149 | .Pp | ||
150 | If an SRTP protection profile has been successfully negotiated, | ||
151 | then the SRTP keying material (on both the client and server) | ||
152 | should be obtained by calling | ||
153 | .Xr SSL_export_keying_material 3 | ||
154 | with a | ||
155 | .Fa label | ||
156 | of | ||
157 | .Qq EXTRACTOR-dtls_srtp , | ||
158 | a | ||
159 | .Fa context | ||
160 | of | ||
161 | .Dv NULL , | ||
162 | and a | ||
163 | .Fa use_context | ||
164 | argument of 0. | ||
165 | The total length of keying material obtained should be equal to two | ||
166 | times the sum of the master key length and the salt length as defined | ||
167 | for the protection profile in use. | ||
168 | This provides the client write master key, the server write master key, | ||
169 | the client write master salt and the server write master salt in that | ||
170 | order. | ||
171 | .Sh RETURN VALUES | ||
172 | Contrary to OpenSSL conventions, | ||
173 | .Fn SSL_CTX_set_tlsext_use_srtp | ||
174 | and | ||
175 | .Fn SSL_set_tlsext_use_srtp | ||
176 | return 0 on success or 1 on error. | ||
177 | .Pp | ||
178 | .Fn SSL_get_srtp_profiles | ||
179 | returns a stack of | ||
180 | .Vt SRTP_PROTECTION_PROFILE | ||
181 | objects on success or | ||
182 | .Dv NULL | ||
183 | on error or if no protection profiles have been configured. | ||
184 | .Pp | ||
185 | .Fn SSL_get_selected_srtp_profile | ||
186 | returns a pointer to an | ||
187 | .Vt SRTP_PROTECTION_PROFILE | ||
188 | object if one has been negotiated or | ||
189 | .Dv NULL | ||
190 | otherwise. | ||
191 | .Sh SEE ALSO | ||
192 | .Xr ssl 3 , | ||
193 | .Xr SSL_export_keying_material 3 | ||
194 | .Sh HISTORY | ||
195 | These functions first appeared in OpenSSL 1.0.1 | ||
196 | and have been available since | ||
197 | .Ox 5.3 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 b/src/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 deleted file mode 100644 index c6f5253431..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 +++ /dev/null | |||
@@ -1,229 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_tmp_dh_callback.3,v 1.11 2025/01/18 10:45:12 tb Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001, 2014, 2015 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: January 18 2025 $ | ||
52 | .Dt SSL_CTX_SET_TMP_DH_CALLBACK 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_CTX_set_tmp_dh_callback , | ||
56 | .Nm SSL_CTX_set_tmp_dh , | ||
57 | .Nm SSL_set_tmp_dh_callback , | ||
58 | .Nm SSL_set_tmp_dh | ||
59 | .Nd handle DH keys for ephemeral key exchange | ||
60 | .Sh SYNOPSIS | ||
61 | .In openssl/ssl.h | ||
62 | .Ft void | ||
63 | .Fo SSL_CTX_set_tmp_dh_callback | ||
64 | .Fa "SSL_CTX *ctx" | ||
65 | .Fa "DH *(*tmp_dh_callback)(SSL *ssl, int is_export, int keylength)" | ||
66 | .Fc | ||
67 | .Ft long | ||
68 | .Fn SSL_CTX_set_tmp_dh "SSL_CTX *ctx" "DH *dh" | ||
69 | .Ft void | ||
70 | .Fo SSL_set_tmp_dh_callback | ||
71 | .Fa "SSL *ssl" | ||
72 | .Fa "DH *(*tmp_dh_callback)(SSL *ssl, int is_export, int keylength" | ||
73 | .Fc | ||
74 | .Ft long | ||
75 | .Fn SSL_set_tmp_dh "SSL *ssl" "DH *dh" | ||
76 | .Sh DESCRIPTION | ||
77 | .Fn SSL_CTX_set_tmp_dh_callback | ||
78 | sets the callback function for | ||
79 | .Fa ctx | ||
80 | to be used when a DH parameters are required to | ||
81 | .Fa tmp_dh_callback . | ||
82 | The callback is inherited by all | ||
83 | .Vt ssl | ||
84 | objects created from | ||
85 | .Fa ctx . | ||
86 | .Pp | ||
87 | .Fn SSL_CTX_set_tmp_dh | ||
88 | sets DH parameters to be used by | ||
89 | .Fa ctx . | ||
90 | The key is inherited by all | ||
91 | .Fa ssl | ||
92 | objects created from | ||
93 | .Fa ctx . | ||
94 | .Pp | ||
95 | .Fn SSL_set_tmp_dh_callback | ||
96 | sets the callback only for | ||
97 | .Fa ssl . | ||
98 | .Pp | ||
99 | .Fn SSL_set_tmp_dh | ||
100 | sets the parameters only for | ||
101 | .Fa ssl . | ||
102 | .Pp | ||
103 | These functions apply to SSL/TLS servers only. | ||
104 | .Pp | ||
105 | When using a cipher with RSA authentication, | ||
106 | an ephemeral DH key exchange can take place. | ||
107 | In these cases, the session data are negotiated using the ephemeral/temporary | ||
108 | DH key and the key supplied and certified by the certificate chain is only used | ||
109 | for signing. | ||
110 | Anonymous ciphers (without a permanent server key) also use ephemeral DH keys. | ||
111 | .Pp | ||
112 | Using ephemeral DH key exchange yields forward secrecy, | ||
113 | as the connection can only be decrypted when the DH key is known. | ||
114 | By generating a temporary DH key inside the server application that is lost | ||
115 | when the application is left, it becomes impossible for attackers to decrypt | ||
116 | past sessions, even if they get hold of the normal (certified) key, | ||
117 | as this key was only used for signing. | ||
118 | .Pp | ||
119 | In order to perform a DH key exchange, the server must use a DH group | ||
120 | (DH parameters) and generate a DH key. | ||
121 | The server will always generate a new DH key during the negotiation. | ||
122 | .Pp | ||
123 | As generating DH parameters is extremely time consuming, an application should | ||
124 | not generate the parameters on the fly but supply the parameters. | ||
125 | DH parameters can be reused, | ||
126 | as the actual key is newly generated during the negotiation. | ||
127 | The risk in reusing DH parameters is that an attacker may specialize on a very | ||
128 | often used DH group. | ||
129 | Applications should therefore generate their own DH parameters during the | ||
130 | installation process using the | ||
131 | .Xr openssl 1 | ||
132 | .Cm dhparam | ||
133 | application. | ||
134 | This application guarantees that "strong" primes are used. | ||
135 | .Pp | ||
136 | Files | ||
137 | .Pa dh2048.pem | ||
138 | and | ||
139 | .Pa dh4096.pem | ||
140 | in the | ||
141 | .Pa apps | ||
142 | directory of the current version of the OpenSSL distribution contain the | ||
143 | .Sq SKIP | ||
144 | DH parameters, | ||
145 | which use safe primes and were generated verifiably pseudo-randomly. | ||
146 | These files can be converted into C code using the | ||
147 | .Fl C | ||
148 | option of the | ||
149 | .Xr openssl 1 | ||
150 | .Cm dhparam | ||
151 | application. | ||
152 | Generation of custom DH parameters during installation should still | ||
153 | be preferred to stop an attacker from specializing on a commonly | ||
154 | used group. | ||
155 | The file | ||
156 | .Pa dh1024.pem | ||
157 | contains old parameters that must not be used by applications. | ||
158 | .Pp | ||
159 | An application may either directly specify the DH parameters or can supply the | ||
160 | DH parameters via a callback function. | ||
161 | .Pp | ||
162 | Previous versions of the callback used | ||
163 | .Fa is_export | ||
164 | and | ||
165 | .Fa keylength | ||
166 | parameters to control parameter generation for export and non-export | ||
167 | cipher suites. | ||
168 | Modern servers that do not support export ciphersuites are advised | ||
169 | to either use | ||
170 | .Fn SSL_CTX_set_tmp_dh | ||
171 | or alternatively, use the callback but ignore | ||
172 | .Fa keylength | ||
173 | and | ||
174 | .Fa is_export | ||
175 | and simply supply at least 2048-bit parameters in the callback. | ||
176 | .Sh RETURN VALUES | ||
177 | .Fn SSL_CTX_set_tmp_dh | ||
178 | and | ||
179 | .Fn SSL_set_tmp_dh | ||
180 | do return 1 on success and 0 on failure. | ||
181 | Check the error queue to find out the reason of failure. | ||
182 | .Sh EXAMPLES | ||
183 | Set up DH parameters with a key length of 2048 bits. | ||
184 | Error handling is partly left out. | ||
185 | .Pp | ||
186 | Command-line parameter generation: | ||
187 | .Pp | ||
188 | .Dl openssl dhparam -out dh_param_2048.pem 2048 | ||
189 | .Pp | ||
190 | Code for setting up parameters during server initialization: | ||
191 | .Bd -literal | ||
192 | SSL_CTX ctx = SSL_CTX_new(); | ||
193 | \&... | ||
194 | |||
195 | /* Set up ephemeral DH parameters. */ | ||
196 | DH *dh_2048 = NULL; | ||
197 | FILE *paramfile; | ||
198 | paramfile = fopen("dh_param_2048.pem", "r"); | ||
199 | if (paramfile) { | ||
200 | dh_2048 = PEM_read_DHparams(paramfile, NULL, NULL, NULL); | ||
201 | fclose(paramfile); | ||
202 | } else { | ||
203 | /* Error. */ | ||
204 | } | ||
205 | if (dh_2048 == NULL) { | ||
206 | /* Error. */ | ||
207 | } | ||
208 | if (SSL_CTX_set_tmp_dh(ctx, dh_2048) != 1) { | ||
209 | /* Error. */ | ||
210 | } | ||
211 | .Ed | ||
212 | .Sh SEE ALSO | ||
213 | .Xr openssl 1 , | ||
214 | .Xr ssl 3 , | ||
215 | .Xr SSL_CTX_set_cipher_list 3 , | ||
216 | .Xr SSL_CTX_set_options 3 , | ||
217 | .Xr SSL_set_tmp_ecdh 3 | ||
218 | .Sh HISTORY | ||
219 | .Fn SSL_CTX_set_tmp_dh_callback | ||
220 | and | ||
221 | .Fn SSL_CTX_set_tmp_dh | ||
222 | first appeared in SSLeay 0.8.0 and have been available since | ||
223 | .Ox 2.4 . | ||
224 | .Pp | ||
225 | .Fn SSL_set_tmp_dh_callback | ||
226 | and | ||
227 | .Fn SSL_set_tmp_dh | ||
228 | first appeared in OpenSSL 0.9.2b and have been available since | ||
229 | .Ox 2.6 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 b/src/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 deleted file mode 100644 index b4c3a3c647..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 +++ /dev/null | |||
@@ -1,114 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_tmp_rsa_callback.3,v 1.9 2022/03/29 14:27:59 naddy Exp $ | ||
2 | .\" OpenSSL 0b30fc90 Dec 19 15:23:05 2013 -0500 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001, 2006, 2013 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 29 2022 $ | ||
52 | .Dt SSL_CTX_SET_TMP_RSA_CALLBACK 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_CTX_set_tmp_rsa_callback , | ||
56 | .Nm SSL_CTX_set_tmp_rsa , | ||
57 | .Nm SSL_CTX_need_tmp_RSA , | ||
58 | .Nm SSL_set_tmp_rsa_callback , | ||
59 | .Nm SSL_set_tmp_rsa , | ||
60 | .Nm SSL_need_tmp_RSA | ||
61 | .Nd handle RSA keys for ephemeral key exchange | ||
62 | .Sh SYNOPSIS | ||
63 | .In openssl/ssl.h | ||
64 | .Ft void | ||
65 | .Fo SSL_CTX_set_tmp_rsa_callback | ||
66 | .Fa "SSL_CTX *ctx" | ||
67 | .Fa "RSA *(*tmp_rsa_callback)(SSL *ssl, int is_export, int keylength)" | ||
68 | .Fc | ||
69 | .Ft long | ||
70 | .Fn SSL_CTX_set_tmp_rsa "SSL_CTX *ctx" "RSA *rsa" | ||
71 | .Ft long | ||
72 | .Fn SSL_CTX_need_tmp_RSA "SSL_CTX *ctx" | ||
73 | .Ft void | ||
74 | .Fo SSL_set_tmp_rsa_callback | ||
75 | .Fa "SSL_CTX *ctx" | ||
76 | .Fa "RSA *(*tmp_rsa_callback)(SSL *ssl, int is_export, int keylength)" | ||
77 | .Fc | ||
78 | .Ft long | ||
79 | .Fn SSL_set_tmp_rsa "SSL *ssl" "RSA *rsa" | ||
80 | .Ft long | ||
81 | .Fn SSL_need_tmp_RSA "SSL *ssl" | ||
82 | .Sh DESCRIPTION | ||
83 | Since they mattered only for deliberately insecure RSA authentication | ||
84 | mandated by historical U.S. export restrictions, these functions | ||
85 | are all deprecated and have no effect except that | ||
86 | .Fn SSL_CTX_set_tmp_rsa_callback , | ||
87 | .Fn SSL_CTX_set_tmp_rsa , | ||
88 | .Fn SSL_set_tmp_rsa_callback , | ||
89 | and | ||
90 | .Fn SSL_set_tmp_rsa | ||
91 | issue error messages when called. | ||
92 | .Sh RETURN VALUES | ||
93 | These functions always return 0, indicating failure. | ||
94 | .Sh SEE ALSO | ||
95 | .Xr ssl 3 , | ||
96 | .Xr SSL_CTX_set_cipher_list 3 , | ||
97 | .Xr SSL_CTX_set_options 3 , | ||
98 | .Xr SSL_CTX_set_tmp_dh_callback 3 , | ||
99 | .Xr SSL_new 3 , | ||
100 | .Xr SSL_set_tmp_ecdh 3 | ||
101 | .Sh HISTORY | ||
102 | .Fn SSL_CTX_set_tmp_rsa_callback , | ||
103 | .Fn SSL_CTX_set_tmp_rsa , | ||
104 | and | ||
105 | .Fn SSL_CTX_need_tmp_RSA | ||
106 | first appeared in SSLeay 0.8.0 and have been available since | ||
107 | .Ox 2.4 . | ||
108 | .Pp | ||
109 | .Fn SSL_set_tmp_rsa_callback , | ||
110 | .Fn SSL_set_tmp_rsa , | ||
111 | and | ||
112 | .Fn SSL_need_tmp_RSA | ||
113 | first appeared in OpenSSL 0.9.2b and have been available since | ||
114 | .Ox 2.6 . | ||
diff --git a/src/lib/libssl/man/SSL_CTX_set_verify.3 b/src/lib/libssl/man/SSL_CTX_set_verify.3 deleted file mode 100644 index 1ed86407e9..0000000000 --- a/src/lib/libssl/man/SSL_CTX_set_verify.3 +++ /dev/null | |||
@@ -1,479 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_set_verify.3,v 1.9 2021/06/12 16:59:53 jmc Exp $ | ||
2 | .\" full merge up to: OpenSSL 9b86974e Aug 17 15:21:33 2015 -0400 | ||
3 | .\" selective merge up to: OpenSSL 1cb7eff4 Sep 10 13:56:40 2019 +0100 | ||
4 | .\" | ||
5 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
6 | .\" Copyright (c) 2000, 2001, 2002, 2003, 2014 The OpenSSL Project. | ||
7 | .\" All rights reserved. | ||
8 | .\" | ||
9 | .\" Redistribution and use in source and binary forms, with or without | ||
10 | .\" modification, are permitted provided that the following conditions | ||
11 | .\" are met: | ||
12 | .\" | ||
13 | .\" 1. Redistributions of source code must retain the above copyright | ||
14 | .\" notice, this list of conditions and the following disclaimer. | ||
15 | .\" | ||
16 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
17 | .\" notice, this list of conditions and the following disclaimer in | ||
18 | .\" the documentation and/or other materials provided with the | ||
19 | .\" distribution. | ||
20 | .\" | ||
21 | .\" 3. All advertising materials mentioning features or use of this | ||
22 | .\" software must display the following acknowledgment: | ||
23 | .\" "This product includes software developed by the OpenSSL Project | ||
24 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
25 | .\" | ||
26 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
27 | .\" endorse or promote products derived from this software without | ||
28 | .\" prior written permission. For written permission, please contact | ||
29 | .\" openssl-core@openssl.org. | ||
30 | .\" | ||
31 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
32 | .\" nor may "OpenSSL" appear in their names without prior written | ||
33 | .\" permission of the OpenSSL Project. | ||
34 | .\" | ||
35 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
36 | .\" acknowledgment: | ||
37 | .\" "This product includes software developed by the OpenSSL Project | ||
38 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
39 | .\" | ||
40 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
41 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
42 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
43 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
44 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
45 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
46 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
47 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
48 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
49 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
50 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
51 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
52 | .\" | ||
53 | .Dd $Mdocdate: June 12 2021 $ | ||
54 | .Dt SSL_CTX_SET_VERIFY 3 | ||
55 | .Os | ||
56 | .Sh NAME | ||
57 | .Nm SSL_CTX_set_verify , | ||
58 | .Nm SSL_set_verify , | ||
59 | .Nm SSL_CTX_set_verify_depth , | ||
60 | .Nm SSL_set_verify_depth | ||
61 | .Nd set peer certificate verification parameters | ||
62 | .Sh SYNOPSIS | ||
63 | .In openssl/ssl.h | ||
64 | .Ft void | ||
65 | .Fo SSL_CTX_set_verify | ||
66 | .Fa "SSL_CTX *ctx" | ||
67 | .Fa "int mode" | ||
68 | .Fa "int (*verify_callback)(int, X509_STORE_CTX *)" | ||
69 | .Fc | ||
70 | .Ft void | ||
71 | .Fo SSL_set_verify | ||
72 | .Fa "SSL *s" | ||
73 | .Fa "int mode" | ||
74 | .Fa "int (*verify_callback)(int, X509_STORE_CTX *)" | ||
75 | .Fc | ||
76 | .Ft void | ||
77 | .Fn SSL_CTX_set_verify_depth "SSL_CTX *ctx" "int depth" | ||
78 | .Ft void | ||
79 | .Fn SSL_set_verify_depth "SSL *s" "int depth" | ||
80 | .Ft int | ||
81 | .Fn verify_callback "int preverify_ok" "X509_STORE_CTX *x509_ctx" | ||
82 | .Sh DESCRIPTION | ||
83 | .Fn SSL_CTX_set_verify | ||
84 | sets the verification flags for | ||
85 | .Fa ctx | ||
86 | to be | ||
87 | .Fa mode | ||
88 | and | ||
89 | specifies the | ||
90 | .Fa verify_callback | ||
91 | function to be used. | ||
92 | If no callback function shall be specified, the | ||
93 | .Dv NULL | ||
94 | pointer can be used for | ||
95 | .Fa verify_callback . | ||
96 | .Pp | ||
97 | .Fn SSL_set_verify | ||
98 | sets the verification flags for | ||
99 | .Fa ssl | ||
100 | to be | ||
101 | .Fa mode | ||
102 | and specifies the | ||
103 | .Fa verify_callback | ||
104 | function to be used. | ||
105 | If no callback function shall be specified, the | ||
106 | .Dv NULL | ||
107 | pointer can be used for | ||
108 | .Fa verify_callback . | ||
109 | In this case last | ||
110 | .Fa verify_callback | ||
111 | set specifically for this | ||
112 | .Fa ssl | ||
113 | remains. | ||
114 | If no special callback was set before, the default callback for the underlying | ||
115 | .Fa ctx | ||
116 | is used, that was valid at the time | ||
117 | .Fa ssl | ||
118 | was created with | ||
119 | .Xr SSL_new 3 . | ||
120 | Within the callback function, | ||
121 | .Xr SSL_get_ex_data_X509_STORE_CTX_idx 3 | ||
122 | can be called to get the data index of the current | ||
123 | .Vt SSL | ||
124 | object that is doing the verification. | ||
125 | .Pp | ||
126 | .Fn SSL_CTX_set_verify_depth | ||
127 | sets the maximum | ||
128 | .Fa depth | ||
129 | for the certificate chain verification that shall be allowed for | ||
130 | .Fa ctx . | ||
131 | (See the | ||
132 | .Sx BUGS | ||
133 | section.) | ||
134 | .Pp | ||
135 | .Fn SSL_set_verify_depth | ||
136 | sets the maximum | ||
137 | .Fa depth | ||
138 | for the certificate chain verification that shall be allowed for | ||
139 | .Fa ssl . | ||
140 | (See the | ||
141 | .Sx BUGS | ||
142 | section.) | ||
143 | .Pp | ||
144 | The verification of certificates can be controlled by a set of bitwise ORed | ||
145 | .Fa mode | ||
146 | flags: | ||
147 | .Bl -tag -width Ds | ||
148 | .It Dv SSL_VERIFY_NONE | ||
149 | .Em Server mode : | ||
150 | the server will not send a client certificate request to the client, | ||
151 | so the client will not send a certificate. | ||
152 | .Pp | ||
153 | .Em Client mode : | ||
154 | if not using an anonymous cipher (by default disabled), | ||
155 | the server will send a certificate which will be checked. | ||
156 | The result of the certificate verification process can be checked after the | ||
157 | TLS/SSL handshake using the | ||
158 | .Xr SSL_get_verify_result 3 | ||
159 | function. | ||
160 | The handshake will be continued regardless of the verification result. | ||
161 | .It Dv SSL_VERIFY_PEER | ||
162 | .Em Server mode : | ||
163 | the server sends a client certificate request to the client. | ||
164 | The certificate returned (if any) is checked. | ||
165 | If the verification process fails, | ||
166 | the TLS/SSL handshake is immediately terminated with an alert message | ||
167 | containing the reason for the verification failure. | ||
168 | The behaviour can be controlled by the additional | ||
169 | .Dv SSL_VERIFY_FAIL_IF_NO_PEER_CERT | ||
170 | and | ||
171 | .Dv SSL_VERIFY_CLIENT_ONCE | ||
172 | flags. | ||
173 | .Pp | ||
174 | .Em Client mode : | ||
175 | the server certificate is verified. | ||
176 | If the verification process fails, | ||
177 | the TLS/SSL handshake is immediately terminated with an alert message | ||
178 | containing the reason for the verification failure. | ||
179 | If no server certificate is sent, because an anonymous cipher is used, | ||
180 | .Dv SSL_VERIFY_PEER | ||
181 | is ignored. | ||
182 | .It Dv SSL_VERIFY_FAIL_IF_NO_PEER_CERT | ||
183 | .Em Server mode : | ||
184 | if the client did not return a certificate, the TLS/SSL | ||
185 | handshake is immediately terminated with a | ||
186 | .Dq handshake failure | ||
187 | alert. | ||
188 | This flag must be used together with | ||
189 | .Dv SSL_VERIFY_PEER . | ||
190 | .Pp | ||
191 | .Em Client mode : | ||
192 | ignored | ||
193 | .It Dv SSL_VERIFY_CLIENT_ONCE | ||
194 | .Em Server mode : | ||
195 | only request a client certificate on the initial TLS/SSL handshake. | ||
196 | Do not ask for a client certificate again in case of a renegotiation. | ||
197 | This flag must be used together with | ||
198 | .Dv SSL_VERIFY_PEER . | ||
199 | .Pp | ||
200 | .Em Client mode : | ||
201 | ignored | ||
202 | .El | ||
203 | .Pp | ||
204 | Exactly one of the | ||
205 | .Fa mode | ||
206 | flags | ||
207 | .Dv SSL_VERIFY_NONE | ||
208 | and | ||
209 | .Dv SSL_VERIFY_PEER | ||
210 | must be set at any time. | ||
211 | .Pp | ||
212 | The actual verification procedure is performed either using the built-in | ||
213 | verification procedure or using another application provided verification | ||
214 | function set with | ||
215 | .Xr SSL_CTX_set_cert_verify_callback 3 . | ||
216 | The following descriptions apply in the case of the built-in procedure. | ||
217 | An application provided procedure also has access to the verify depth | ||
218 | information and the | ||
219 | .Fa verify_callback Ns () | ||
220 | function, but the way this information is used may be different. | ||
221 | .Pp | ||
222 | .Fn SSL_CTX_set_verify_depth | ||
223 | and | ||
224 | .Fn SSL_set_verify_depth | ||
225 | set the limit up to which depth certificates in a chain are used during the | ||
226 | verification procedure. | ||
227 | If the certificate chain is longer than allowed, | ||
228 | the certificates above the limit are ignored. | ||
229 | Error messages are generated as if these certificates would not be present, | ||
230 | most likely a | ||
231 | .Dv X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY | ||
232 | will be issued. | ||
233 | The depth count is | ||
234 | .Dq level 0: peer certificate , | ||
235 | .Dq level 1: CA certificate , | ||
236 | .Dq level 2: higher level CA certificate , | ||
237 | and so on. | ||
238 | Setting the maximum depth to 2 allows the levels 0, 1, and 2. | ||
239 | The default depth limit is 100, | ||
240 | allowing for the peer certificate and an additional 100 CA certificates. | ||
241 | .Pp | ||
242 | The | ||
243 | .Fa verify_callback | ||
244 | function is used to control the behaviour when the | ||
245 | .Dv SSL_VERIFY_PEER | ||
246 | flag is set. | ||
247 | It must be supplied by the application and receives two arguments: | ||
248 | .Fa preverify_ok | ||
249 | indicates whether the verification of the certificate in question was passed | ||
250 | (preverify_ok=1) or not (preverify_ok=0). | ||
251 | .Fa x509_ctx | ||
252 | is a pointer to the complete context used | ||
253 | for the certificate chain verification. | ||
254 | .Pp | ||
255 | The certificate chain is checked starting with the deepest nesting level | ||
256 | (the root CA certificate) and worked upward to the peer's certificate. | ||
257 | At each level signatures and issuer attributes are checked. | ||
258 | Whenever a verification error is found, the error number is stored in | ||
259 | .Fa x509_ctx | ||
260 | and | ||
261 | .Fa verify_callback | ||
262 | is called with | ||
263 | .Fa preverify_ok | ||
264 | equal to 0. | ||
265 | By applying | ||
266 | .Fn X509_CTX_store_* | ||
267 | functions | ||
268 | .Fa verify_callback | ||
269 | can locate the certificate in question and perform additional steps (see | ||
270 | .Sx EXAMPLES ) . | ||
271 | If no error is found for a certificate, | ||
272 | .Fa verify_callback | ||
273 | is called with | ||
274 | .Fa preverify_ok | ||
275 | equal to 1 before advancing to the next level. | ||
276 | .Pp | ||
277 | The return value of | ||
278 | .Fa verify_callback | ||
279 | controls the strategy of the further verification process. | ||
280 | If | ||
281 | .Fa verify_callback | ||
282 | returns 0, the verification process is immediately stopped with | ||
283 | .Dq verification failed | ||
284 | state. | ||
285 | If | ||
286 | .Dv SSL_VERIFY_PEER | ||
287 | is set, a verification failure alert is sent to the peer and the TLS/SSL | ||
288 | handshake is terminated. | ||
289 | If | ||
290 | .Fa verify_callback | ||
291 | returns 1, the verification process is continued. | ||
292 | If | ||
293 | .Fa verify_callback | ||
294 | always returns 1, | ||
295 | the TLS/SSL handshake will not be terminated with respect to verification | ||
296 | failures and the connection will be established. | ||
297 | The calling process can however retrieve the error code of the last | ||
298 | verification error using | ||
299 | .Xr SSL_get_verify_result 3 | ||
300 | or by maintaining its own error storage managed by | ||
301 | .Fa verify_callback . | ||
302 | .Pp | ||
303 | If no | ||
304 | .Fa verify_callback | ||
305 | is specified, the default callback will be used. | ||
306 | Its return value is identical to | ||
307 | .Fa preverify_ok , | ||
308 | so that any verification | ||
309 | failure will lead to a termination of the TLS/SSL handshake with an | ||
310 | alert message, if | ||
311 | .Dv SSL_VERIFY_PEER | ||
312 | is set. | ||
313 | .Sh EXAMPLES | ||
314 | The following code sequence realizes an example | ||
315 | .Fa verify_callback | ||
316 | function that will always continue the TLS/SSL handshake regardless of | ||
317 | verification failure, if wished. | ||
318 | The callback realizes a verification depth limit with more informational output. | ||
319 | .Pp | ||
320 | All verification errors are printed; | ||
321 | information about the certificate chain is printed on request. | ||
322 | The example is realized for a server that does allow but not require client | ||
323 | certificates. | ||
324 | .Pp | ||
325 | The example makes use of the ex_data technique to store application data | ||
326 | into/retrieve application data from the | ||
327 | .Vt SSL | ||
328 | structure (see | ||
329 | .Xr SSL_get_ex_new_index 3 , | ||
330 | .Xr SSL_get_ex_data_X509_STORE_CTX_idx 3 ) . | ||
331 | .Bd -literal | ||
332 | \&... | ||
333 | |||
334 | typedef struct { | ||
335 | int verbose_mode; | ||
336 | int verify_depth; | ||
337 | int always_continue; | ||
338 | } mydata_t; | ||
339 | int mydata_index; | ||
340 | \&... | ||
341 | static int | ||
342 | verify_callback(int preverify_ok, X509_STORE_CTX *ctx) | ||
343 | { | ||
344 | char buf[256]; | ||
345 | X509 *err_cert; | ||
346 | int err, depth; | ||
347 | SSL *ssl; | ||
348 | mydata_t *mydata; | ||
349 | |||
350 | err_cert = X509_STORE_CTX_get_current_cert(ctx); | ||
351 | err = X509_STORE_CTX_get_error(ctx); | ||
352 | depth = X509_STORE_CTX_get_error_depth(ctx); | ||
353 | |||
354 | /* | ||
355 | * Retrieve the pointer to the SSL of the connection currently | ||
356 | * treated * and the application specific data stored into the | ||
357 | * SSL object. | ||
358 | */ | ||
359 | ssl = X509_STORE_CTX_get_ex_data(ctx, | ||
360 | SSL_get_ex_data_X509_STORE_CTX_idx()); | ||
361 | mydata = SSL_get_ex_data(ssl, mydata_index); | ||
362 | |||
363 | X509_NAME_oneline(X509_get_subject_name(err_cert), buf, 256); | ||
364 | |||
365 | /* | ||
366 | * Catch a too long certificate chain. The depth limit set using | ||
367 | * SSL_CTX_set_verify_depth() is by purpose set to "limit+1" so | ||
368 | * that whenever the "depth>verify_depth" condition is met, we | ||
369 | * have violated the limit and want to log this error condition. | ||
370 | * We must do it here, because the CHAIN_TOO_LONG error would not | ||
371 | * be found explicitly; only errors introduced by cutting off the | ||
372 | * additional certificates would be logged. | ||
373 | */ | ||
374 | if (depth > mydata->verify_depth) { | ||
375 | preverify_ok = 0; | ||
376 | err = X509_V_ERR_CERT_CHAIN_TOO_LONG; | ||
377 | X509_STORE_CTX_set_error(ctx, err); | ||
378 | } | ||
379 | if (!preverify_ok) { | ||
380 | printf("verify error:num=%d:%s:depth=%d:%s\en", err, | ||
381 | X509_verify_cert_error_string(err), depth, buf); | ||
382 | } else if (mydata->verbose_mode) { | ||
383 | printf("depth=%d:%s\en", depth, buf); | ||
384 | } | ||
385 | |||
386 | /* | ||
387 | * At this point, err contains the last verification error. | ||
388 | * We can use it for something special | ||
389 | */ | ||
390 | if (!preverify_ok && (err == | ||
391 | X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT)) { | ||
392 | X509_NAME_oneline(X509_get_issuer_name(ctx->current_cert), | ||
393 | buf, 256); | ||
394 | printf("issuer= %s\en", buf); | ||
395 | } | ||
396 | |||
397 | if (mydata->always_continue) | ||
398 | return 1; | ||
399 | else | ||
400 | return preverify_ok; | ||
401 | } | ||
402 | \&... | ||
403 | |||
404 | mydata_t mydata; | ||
405 | |||
406 | \&... | ||
407 | |||
408 | mydata_index = SSL_get_ex_new_index(0, "mydata index", NULL, NULL, NULL); | ||
409 | |||
410 | \&... | ||
411 | |||
412 | SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER|SSL_VERIFY_CLIENT_ONCE, | ||
413 | verify_callback); | ||
414 | |||
415 | /* | ||
416 | * Let the verify_callback catch the verify_depth error so that we get | ||
417 | * an appropriate error in the logfile. | ||
418 | */ | ||
419 | SSL_CTX_set_verify_depth(verify_depth + 1); | ||
420 | |||
421 | /* | ||
422 | * Set up the SSL specific data into "mydata" and store it into the SSL | ||
423 | * structure. | ||
424 | */ | ||
425 | mydata.verify_depth = verify_depth; ... | ||
426 | SSL_set_ex_data(ssl, mydata_index, &mydata); | ||
427 | |||
428 | \&... | ||
429 | |||
430 | SSL_accept(ssl); /* check of success left out for clarity */ | ||
431 | if (peer = SSL_get_peer_certificate(ssl)) { | ||
432 | if (SSL_get_verify_result(ssl) == X509_V_OK) { | ||
433 | /* The client sent a certificate which verified OK */ | ||
434 | } | ||
435 | } | ||
436 | .Ed | ||
437 | .Sh SEE ALSO | ||
438 | .Xr ssl 3 , | ||
439 | .Xr SSL_CTX_get_verify_mode 3 , | ||
440 | .Xr SSL_CTX_load_verify_locations 3 , | ||
441 | .Xr SSL_CTX_set_cert_verify_callback 3 , | ||
442 | .Xr SSL_get_ex_data_X509_STORE_CTX_idx 3 , | ||
443 | .Xr SSL_get_ex_new_index 3 , | ||
444 | .Xr SSL_get_peer_certificate 3 , | ||
445 | .Xr SSL_get_verify_result 3 , | ||
446 | .Xr SSL_new 3 , | ||
447 | .Xr SSL_set1_host 3 | ||
448 | .Sh HISTORY | ||
449 | .Fn SSL_set_verify | ||
450 | appeared in SSLeay 0.4 or earlier. | ||
451 | .Fn SSL_CTX_set_verify | ||
452 | first appeared in SSLeay 0.6.4. | ||
453 | Both functions have been available since | ||
454 | .Ox 2.4 . | ||
455 | .Pp | ||
456 | .Fn SSL_CTX_set_verify_depth | ||
457 | and | ||
458 | .Fn SSL_set_verify_depth | ||
459 | first appeared in OpenSSL 0.9.3 and have been available since | ||
460 | .Ox 2.6 . | ||
461 | .Sh BUGS | ||
462 | In client mode, it is not checked whether the | ||
463 | .Dv SSL_VERIFY_PEER | ||
464 | flag is set, but whether | ||
465 | .Dv SSL_VERIFY_NONE | ||
466 | is not set. | ||
467 | This can lead to unexpected behaviour, if the | ||
468 | .Dv SSL_VERIFY_PEER | ||
469 | and | ||
470 | .Dv SSL_VERIFY_NONE | ||
471 | are not used as required (exactly one must be set at any time). | ||
472 | .Pp | ||
473 | The certificate verification depth set with | ||
474 | .Fn SSL[_CTX]_verify_depth | ||
475 | stops the verification at a certain depth. | ||
476 | The error message produced will be that of an incomplete certificate chain and | ||
477 | not | ||
478 | .Dv X509_V_ERR_CERT_CHAIN_TOO_LONG | ||
479 | as may be expected. | ||
diff --git a/src/lib/libssl/man/SSL_CTX_use_certificate.3 b/src/lib/libssl/man/SSL_CTX_use_certificate.3 deleted file mode 100644 index c88a6971b2..0000000000 --- a/src/lib/libssl/man/SSL_CTX_use_certificate.3 +++ /dev/null | |||
@@ -1,451 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_CTX_use_certificate.3,v 1.17 2025/01/18 10:45:12 tb Exp $ | ||
2 | .\" full merge up to: OpenSSL 3aaa1bd0 Mar 28 16:35:25 2017 +1000 | ||
3 | .\" selective merge up to: OpenSSL d1f7a1e6 Apr 26 14:05:40 2018 +0100 | ||
4 | .\" | ||
5 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
6 | .\" Copyright (c) 2000, 2001, 2002, 2003, 2005 The OpenSSL Project. | ||
7 | .\" All rights reserved. | ||
8 | .\" | ||
9 | .\" Redistribution and use in source and binary forms, with or without | ||
10 | .\" modification, are permitted provided that the following conditions | ||
11 | .\" are met: | ||
12 | .\" | ||
13 | .\" 1. Redistributions of source code must retain the above copyright | ||
14 | .\" notice, this list of conditions and the following disclaimer. | ||
15 | .\" | ||
16 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
17 | .\" notice, this list of conditions and the following disclaimer in | ||
18 | .\" the documentation and/or other materials provided with the | ||
19 | .\" distribution. | ||
20 | .\" | ||
21 | .\" 3. All advertising materials mentioning features or use of this | ||
22 | .\" software must display the following acknowledgment: | ||
23 | .\" "This product includes software developed by the OpenSSL Project | ||
24 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
25 | .\" | ||
26 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
27 | .\" endorse or promote products derived from this software without | ||
28 | .\" prior written permission. For written permission, please contact | ||
29 | .\" openssl-core@openssl.org. | ||
30 | .\" | ||
31 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
32 | .\" nor may "OpenSSL" appear in their names without prior written | ||
33 | .\" permission of the OpenSSL Project. | ||
34 | .\" | ||
35 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
36 | .\" acknowledgment: | ||
37 | .\" "This product includes software developed by the OpenSSL Project | ||
38 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
39 | .\" | ||
40 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
41 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
42 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
43 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
44 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
45 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
46 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
47 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
48 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
49 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
50 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
51 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
52 | .\" | ||
53 | .Dd $Mdocdate: January 18 2025 $ | ||
54 | .Dt SSL_CTX_USE_CERTIFICATE 3 | ||
55 | .Os | ||
56 | .Sh NAME | ||
57 | .Nm SSL_CTX_use_certificate , | ||
58 | .Nm SSL_CTX_use_certificate_ASN1 , | ||
59 | .Nm SSL_CTX_use_certificate_file , | ||
60 | .Nm SSL_use_certificate , | ||
61 | .Nm SSL_use_certificate_ASN1 , | ||
62 | .Nm SSL_use_certificate_chain_file , | ||
63 | .Nm SSL_use_certificate_file , | ||
64 | .Nm SSL_CTX_use_certificate_chain_file , | ||
65 | .Nm SSL_CTX_use_certificate_chain_mem , | ||
66 | .Nm SSL_CTX_use_PrivateKey , | ||
67 | .Nm SSL_CTX_use_PrivateKey_ASN1 , | ||
68 | .Nm SSL_CTX_use_PrivateKey_file , | ||
69 | .Nm SSL_CTX_use_RSAPrivateKey , | ||
70 | .Nm SSL_CTX_use_RSAPrivateKey_ASN1 , | ||
71 | .Nm SSL_CTX_use_RSAPrivateKey_file , | ||
72 | .Nm SSL_use_PrivateKey_file , | ||
73 | .Nm SSL_use_PrivateKey_ASN1 , | ||
74 | .Nm SSL_use_PrivateKey , | ||
75 | .Nm SSL_use_RSAPrivateKey , | ||
76 | .Nm SSL_use_RSAPrivateKey_ASN1 , | ||
77 | .Nm SSL_use_RSAPrivateKey_file , | ||
78 | .Nm SSL_CTX_check_private_key , | ||
79 | .Nm SSL_check_private_key | ||
80 | .Nd load certificate and key data | ||
81 | .Sh SYNOPSIS | ||
82 | .In openssl/ssl.h | ||
83 | .Ft int | ||
84 | .Fn SSL_CTX_use_certificate "SSL_CTX *ctx" "X509 *x" | ||
85 | .Ft int | ||
86 | .Fn SSL_CTX_use_certificate_ASN1 "SSL_CTX *ctx" "int len" "unsigned char *d" | ||
87 | .Ft int | ||
88 | .Fn SSL_CTX_use_certificate_file "SSL_CTX *ctx" "const char *file" "int type" | ||
89 | .Ft int | ||
90 | .Fn SSL_use_certificate "SSL *ssl" "X509 *x" | ||
91 | .Ft int | ||
92 | .Fn SSL_use_certificate_ASN1 "SSL *ssl" "unsigned char *d" "int len" | ||
93 | .Ft int | ||
94 | .Fn SSL_use_certificate_chain_file "SSL *ssl" "const char *file" | ||
95 | .Ft int | ||
96 | .Fn SSL_use_certificate_file "SSL *ssl" "const char *file" "int type" | ||
97 | .Ft int | ||
98 | .Fn SSL_CTX_use_certificate_chain_file "SSL_CTX *ctx" "const char *file" | ||
99 | .Ft int | ||
100 | .Fn SSL_CTX_use_certificate_chain_mem "SSL_CTX *ctx" "void *buf" "int len" | ||
101 | .Ft int | ||
102 | .Fn SSL_CTX_use_PrivateKey "SSL_CTX *ctx" "EVP_PKEY *pkey" | ||
103 | .Ft int | ||
104 | .Fo SSL_CTX_use_PrivateKey_ASN1 | ||
105 | .Fa "int pk" "SSL_CTX *ctx" "unsigned char *d" "long len" | ||
106 | .Fc | ||
107 | .Ft int | ||
108 | .Fn SSL_CTX_use_PrivateKey_file "SSL_CTX *ctx" "const char *file" "int type" | ||
109 | .Ft int | ||
110 | .Fn SSL_CTX_use_RSAPrivateKey "SSL_CTX *ctx" "RSA *rsa" | ||
111 | .Ft int | ||
112 | .Fn SSL_CTX_use_RSAPrivateKey_ASN1 "SSL_CTX *ctx" "unsigned char *d" "long len" | ||
113 | .Ft int | ||
114 | .Fn SSL_CTX_use_RSAPrivateKey_file "SSL_CTX *ctx" "const char *file" "int type" | ||
115 | .Ft int | ||
116 | .Fn SSL_use_PrivateKey "SSL *ssl" "EVP_PKEY *pkey" | ||
117 | .Ft int | ||
118 | .Fn SSL_use_PrivateKey_ASN1 "int pk" "SSL *ssl" "unsigned char *d" "long len" | ||
119 | .Ft int | ||
120 | .Fn SSL_use_PrivateKey_file "SSL *ssl" "const char *file" "int type" | ||
121 | .Ft int | ||
122 | .Fn SSL_use_RSAPrivateKey "SSL *ssl" "RSA *rsa" | ||
123 | .Ft int | ||
124 | .Fn SSL_use_RSAPrivateKey_ASN1 "SSL *ssl" "const unsigned char *d" "long len" | ||
125 | .Ft int | ||
126 | .Fn SSL_use_RSAPrivateKey_file "SSL *ssl" "const char *file" "int type" | ||
127 | .Ft int | ||
128 | .Fn SSL_CTX_check_private_key "const SSL_CTX *ctx" | ||
129 | .Ft int | ||
130 | .Fn SSL_check_private_key "const SSL *ssl" | ||
131 | .Sh DESCRIPTION | ||
132 | These functions load the certificates and private keys into the | ||
133 | .Vt SSL_CTX | ||
134 | or | ||
135 | .Vt SSL | ||
136 | object, respectively. | ||
137 | .Pp | ||
138 | The | ||
139 | .Fn SSL_CTX_* | ||
140 | class of functions loads the certificates and keys into the | ||
141 | .Vt SSL_CTX | ||
142 | object | ||
143 | .Fa ctx . | ||
144 | The information is passed to | ||
145 | .Vt SSL | ||
146 | objects | ||
147 | .Fa ssl | ||
148 | created from | ||
149 | .Fa ctx | ||
150 | with | ||
151 | .Xr SSL_new 3 | ||
152 | by copying, so that changes applied to | ||
153 | .Fa ctx | ||
154 | do not propagate to already existing | ||
155 | .Vt SSL | ||
156 | objects. | ||
157 | .Pp | ||
158 | The | ||
159 | .Fn SSL_* | ||
160 | class of functions only loads certificates and keys into a specific | ||
161 | .Vt SSL | ||
162 | object. | ||
163 | The specific information is kept when | ||
164 | .Xr SSL_clear 3 | ||
165 | is called for this | ||
166 | .Vt SSL | ||
167 | object. | ||
168 | .Pp | ||
169 | .Fn SSL_CTX_use_certificate | ||
170 | loads the certificate | ||
171 | .Fa x | ||
172 | into | ||
173 | .Fa ctx ; | ||
174 | .Fn SSL_use_certificate | ||
175 | loads | ||
176 | .Fa x | ||
177 | into | ||
178 | .Fa ssl . | ||
179 | The rest of the certificates needed to form the complete certificate chain can | ||
180 | be specified using the | ||
181 | .Xr SSL_CTX_add_extra_chain_cert 3 | ||
182 | function. | ||
183 | .Pp | ||
184 | .Fn SSL_CTX_use_certificate_ASN1 | ||
185 | loads the ASN1 encoded certificate from the memory location | ||
186 | .Fa d | ||
187 | (with length | ||
188 | .Fa len ) | ||
189 | into | ||
190 | .Fa ctx ; | ||
191 | .Fn SSL_use_certificate_ASN1 | ||
192 | loads the ASN1 encoded certificate into | ||
193 | .Fa ssl . | ||
194 | .Pp | ||
195 | .Fn SSL_CTX_use_certificate_file | ||
196 | loads the first certificate stored in | ||
197 | .Fa file | ||
198 | into | ||
199 | .Fa ctx . | ||
200 | The formatting | ||
201 | .Fa type | ||
202 | of the certificate must be specified from the known types | ||
203 | .Dv SSL_FILETYPE_PEM | ||
204 | and | ||
205 | .Dv SSL_FILETYPE_ASN1 . | ||
206 | .Fn SSL_use_certificate_file | ||
207 | loads the certificate from | ||
208 | .Fa file | ||
209 | into | ||
210 | .Fa ssl . | ||
211 | See the | ||
212 | .Sx NOTES | ||
213 | section on why | ||
214 | .Fn SSL_CTX_use_certificate_chain_file | ||
215 | should be preferred. | ||
216 | .Pp | ||
217 | The | ||
218 | .Fn SSL_CTX_use_certificate_chain* | ||
219 | functions load a certificate chain into | ||
220 | .Fa ctx . | ||
221 | The certificates must be in PEM format and must be sorted starting with the | ||
222 | subject's certificate (actual client or server certificate), | ||
223 | followed by intermediate CA certificates if applicable, | ||
224 | and ending at the highest level (root) CA. | ||
225 | With the exception of | ||
226 | .Fn SSL_use_certificate_chain_file , | ||
227 | there is no corresponding function working on a single | ||
228 | .Vt SSL | ||
229 | object. | ||
230 | .Pp | ||
231 | .Fn SSL_CTX_use_PrivateKey | ||
232 | adds | ||
233 | .Fa pkey | ||
234 | as private key to | ||
235 | .Fa ctx . | ||
236 | .Fn SSL_CTX_use_RSAPrivateKey | ||
237 | adds the private key | ||
238 | .Fa rsa | ||
239 | of type RSA to | ||
240 | .Fa ctx . | ||
241 | .Fn SSL_use_PrivateKey | ||
242 | adds | ||
243 | .Fa pkey | ||
244 | as private key to | ||
245 | .Fa ssl ; | ||
246 | .Fn SSL_use_RSAPrivateKey | ||
247 | adds | ||
248 | .Fa rsa | ||
249 | as private key of type RSA to | ||
250 | .Fa ssl . | ||
251 | If a certificate has already been set and the private does not belong to the | ||
252 | certificate, an error is returned. | ||
253 | To change a certificate private key pair, | ||
254 | the new certificate needs to be set with | ||
255 | .Fn SSL_use_certificate | ||
256 | or | ||
257 | .Fn SSL_CTX_use_certificate | ||
258 | before setting the private key with | ||
259 | .Fn SSL_CTX_use_PrivateKey | ||
260 | or | ||
261 | .Fn SSL_use_PrivateKey . | ||
262 | .Pp | ||
263 | .Fn SSL_CTX_use_PrivateKey_ASN1 | ||
264 | adds the private key of type | ||
265 | .Fa pk | ||
266 | stored at memory location | ||
267 | .Fa d | ||
268 | (length | ||
269 | .Fa len ) | ||
270 | to | ||
271 | .Fa ctx . | ||
272 | .Fn SSL_CTX_use_RSAPrivateKey_ASN1 | ||
273 | adds the private key of type RSA stored at memory location | ||
274 | .Fa d | ||
275 | (length | ||
276 | .Fa len ) | ||
277 | to | ||
278 | .Fa ctx . | ||
279 | .Fn SSL_use_PrivateKey_ASN1 | ||
280 | and | ||
281 | .Fn SSL_use_RSAPrivateKey_ASN1 | ||
282 | add the private key to | ||
283 | .Fa ssl . | ||
284 | .Pp | ||
285 | .Fn SSL_CTX_use_PrivateKey_file | ||
286 | adds the first private key found in | ||
287 | .Fa file | ||
288 | to | ||
289 | .Fa ctx . | ||
290 | The formatting | ||
291 | .Fa type | ||
292 | of the private key must be specified from the known types | ||
293 | .Dv SSL_FILETYPE_PEM | ||
294 | and | ||
295 | .Dv SSL_FILETYPE_ASN1 . | ||
296 | .Fn SSL_CTX_use_RSAPrivateKey_file | ||
297 | adds the first private RSA key found in | ||
298 | .Fa file | ||
299 | to | ||
300 | .Fa ctx . | ||
301 | .Fn SSL_use_PrivateKey_file | ||
302 | adds the first private key found in | ||
303 | .Fa file | ||
304 | to | ||
305 | .Fa ssl ; | ||
306 | .Fn SSL_use_RSAPrivateKey_file | ||
307 | adds the first private RSA key found to | ||
308 | .Fa ssl . | ||
309 | .Pp | ||
310 | The | ||
311 | .Fn SSL_CTX_check_private_key | ||
312 | function is seriously misnamed. | ||
313 | It compares the | ||
314 | .Em public | ||
315 | key components and parameters of an OpenSSL private key with the | ||
316 | corresponding certificate loaded into | ||
317 | .Fa ctx . | ||
318 | If more than one key/certificate pair (RSA/ECDSA) is installed, | ||
319 | the last item installed will be compared. | ||
320 | If, e.g., the last item was an RSA certificate or key, | ||
321 | the RSA key/certificate pair will be checked. | ||
322 | .Fn SSL_check_private_key | ||
323 | performs the same | ||
324 | .Em public | ||
325 | key comparison for | ||
326 | .Fa ssl . | ||
327 | If no key/certificate was explicitly added for this | ||
328 | .Fa ssl , | ||
329 | the last item added into | ||
330 | .Fa ctx | ||
331 | will be checked. | ||
332 | .Pp | ||
333 | Despite the name, neither | ||
334 | .Fn SSL_CTX_check_private_key | ||
335 | nor | ||
336 | .Fn SSL_check_private_key | ||
337 | checks whether the private key component is indeed a private key, | ||
338 | nor whether it matches the public key component. | ||
339 | They merely compare the public materials (e.g. exponent and modulus of | ||
340 | an RSA key) and/or key parameters (e.g. EC params of an EC key) of a | ||
341 | key pair. | ||
342 | .Sh NOTES | ||
343 | The internal certificate store of OpenSSL can hold several private | ||
344 | key/certificate pairs at a time. | ||
345 | The certificate used depends on the cipher selected. | ||
346 | See also | ||
347 | .Xr SSL_CTX_set_cipher_list 3 . | ||
348 | .Pp | ||
349 | When reading certificates and private keys from file, files of type | ||
350 | .Dv SSL_FILETYPE_ASN1 | ||
351 | (also known as | ||
352 | .Em DER , | ||
353 | binary encoding) can only contain one certificate or private key; consequently, | ||
354 | .Fn SSL_CTX_use_certificate_chain_file | ||
355 | is only applicable to PEM formatting. | ||
356 | Files of type | ||
357 | .Dv SSL_FILETYPE_PEM | ||
358 | can contain more than one item. | ||
359 | .Pp | ||
360 | .Fn SSL_CTX_use_certificate_chain_file | ||
361 | adds the first certificate found in the file to the certificate store. | ||
362 | The other certificates are added to the store of chain certificates using | ||
363 | .Xr SSL_CTX_add1_chain_cert 3 . | ||
364 | It is recommended to use the | ||
365 | .Fn SSL_CTX_use_certificate_chain_file | ||
366 | instead of the | ||
367 | .Fn SSL_CTX_use_certificate_file | ||
368 | function in order to allow the use of complete certificate chains even when no | ||
369 | trusted CA storage is used or when the CA issuing the certificate shall not be | ||
370 | added to the trusted CA storage. | ||
371 | .Pp | ||
372 | If additional certificates are needed to complete the chain during the TLS | ||
373 | negotiation, CA certificates are additionally looked up in the locations of | ||
374 | trusted CA certificates (see | ||
375 | .Xr SSL_CTX_load_verify_locations 3 ) . | ||
376 | .Pp | ||
377 | The private keys loaded from file can be encrypted. | ||
378 | In order to successfully load encrypted keys, | ||
379 | a function returning the passphrase must have been supplied (see | ||
380 | .Xr SSL_CTX_set_default_passwd_cb 3 ) . | ||
381 | (Certificate files might be encrypted as well from the technical point of view, | ||
382 | it however does not make sense as the data in the certificate is considered | ||
383 | public anyway.) | ||
384 | .Sh RETURN VALUES | ||
385 | On success, the functions return 1. | ||
386 | Otherwise check out the error stack to find out the reason. | ||
387 | .Sh SEE ALSO | ||
388 | .Xr ssl 3 , | ||
389 | .Xr SSL_clear 3 , | ||
390 | .Xr SSL_CTX_add1_chain_cert 3 , | ||
391 | .Xr SSL_CTX_add_extra_chain_cert 3 , | ||
392 | .Xr SSL_CTX_load_verify_locations 3 , | ||
393 | .Xr SSL_CTX_set_cipher_list 3 , | ||
394 | .Xr SSL_CTX_set_client_CA_list 3 , | ||
395 | .Xr SSL_CTX_set_client_cert_cb 3 , | ||
396 | .Xr SSL_CTX_set_default_passwd_cb 3 , | ||
397 | .Xr SSL_new 3 , | ||
398 | .Xr X509_check_private_key 3 | ||
399 | .Sh HISTORY | ||
400 | .Fn SSL_use_certificate , | ||
401 | .Fn SSL_use_certificate_file , | ||
402 | .Fn SSL_use_RSAPrivateKey , | ||
403 | and | ||
404 | .Fn SSL_use_RSAPrivateKey_file | ||
405 | appeared in SSLeay 0.4 or earlier. | ||
406 | .Fn SSL_use_certificate_ASN1 | ||
407 | and | ||
408 | .Fn SSL_use_RSAPrivateKey_ASN1 | ||
409 | first appeared in SSLeay 0.5.1. | ||
410 | .Fn SSL_use_PrivateKey_file , | ||
411 | .Fn SSL_use_PrivateKey_ASN1 , | ||
412 | and | ||
413 | .Fn SSL_use_PrivateKey | ||
414 | first appeared in SSLeay 0.6.0. | ||
415 | .Fn SSL_CTX_use_certificate , | ||
416 | .Fn SSL_CTX_use_certificate_ASN1 , | ||
417 | .Fn SSL_CTX_use_certificate_file , | ||
418 | .Fn SSL_CTX_use_PrivateKey , | ||
419 | .Fn SSL_CTX_use_PrivateKey_ASN1 , | ||
420 | .Fn SSL_CTX_use_PrivateKey_file , | ||
421 | .Fn SSL_CTX_use_RSAPrivateKey , | ||
422 | .Fn SSL_CTX_use_RSAPrivateKey_ASN1 , | ||
423 | and | ||
424 | .Fn SSL_CTX_use_RSAPrivateKey_file | ||
425 | first appeared in SSLeay 0.6.1. | ||
426 | .Fn SSL_CTX_check_private_key | ||
427 | and | ||
428 | .Fn SSL_check_private_key | ||
429 | first appeared in SSLeay 0.6.5. | ||
430 | All these functions have been available since | ||
431 | .Ox 2.4 . | ||
432 | .Pp | ||
433 | .Fn SSL_CTX_use_certificate_chain_file | ||
434 | first appeared in OpenSSL 0.9.4 and has been available since | ||
435 | .Ox 2.6 . | ||
436 | .Pp | ||
437 | .Fn SSL_use_certificate_chain_file | ||
438 | first appeared in OpenSSL 1.1.0 and has been available since | ||
439 | .Ox 6.9 . | ||
440 | .Pp | ||
441 | Support for DER encoded private keys | ||
442 | .Pq Dv SSL_FILETYPE_ASN1 | ||
443 | in | ||
444 | .Fn SSL_CTX_use_PrivateKey_file | ||
445 | and | ||
446 | .Fn SSL_use_PrivateKey_file | ||
447 | was added in 0.9.8. | ||
448 | .Pp | ||
449 | .Fn SSL_CTX_use_certificate_chain_mem | ||
450 | first appeared in | ||
451 | .Ox 5.7 . | ||
diff --git a/src/lib/libssl/man/SSL_SESSION_free.3 b/src/lib/libssl/man/SSL_SESSION_free.3 deleted file mode 100644 index 3f785e95e5..0000000000 --- a/src/lib/libssl/man/SSL_SESSION_free.3 +++ /dev/null | |||
@@ -1,148 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_SESSION_free.3,v 1.7 2019/06/12 09:36:30 schwarze Exp $ | ||
2 | .\" full merge up to: OpenSSL b31db505 Mar 24 16:01:50 2017 +0000 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org> | ||
5 | .\" and Matt Caswell <matt@openssl.org>. | ||
6 | .\" Copyright (c) 2000, 2001, 2009, 2017 The OpenSSL Project. | ||
7 | .\" All rights reserved. | ||
8 | .\" | ||
9 | .\" Redistribution and use in source and binary forms, with or without | ||
10 | .\" modification, are permitted provided that the following conditions | ||
11 | .\" are met: | ||
12 | .\" | ||
13 | .\" 1. Redistributions of source code must retain the above copyright | ||
14 | .\" notice, this list of conditions and the following disclaimer. | ||
15 | .\" | ||
16 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
17 | .\" notice, this list of conditions and the following disclaimer in | ||
18 | .\" the documentation and/or other materials provided with the | ||
19 | .\" distribution. | ||
20 | .\" | ||
21 | .\" 3. All advertising materials mentioning features or use of this | ||
22 | .\" software must display the following acknowledgment: | ||
23 | .\" "This product includes software developed by the OpenSSL Project | ||
24 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
25 | .\" | ||
26 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
27 | .\" endorse or promote products derived from this software without | ||
28 | .\" prior written permission. For written permission, please contact | ||
29 | .\" openssl-core@openssl.org. | ||
30 | .\" | ||
31 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
32 | .\" nor may "OpenSSL" appear in their names without prior written | ||
33 | .\" permission of the OpenSSL Project. | ||
34 | .\" | ||
35 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
36 | .\" acknowledgment: | ||
37 | .\" "This product includes software developed by the OpenSSL Project | ||
38 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
39 | .\" | ||
40 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
41 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
42 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
43 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
44 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
45 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
46 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
47 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
48 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
49 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
50 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
51 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
52 | .\" | ||
53 | .Dd $Mdocdate: June 12 2019 $ | ||
54 | .Dt SSL_SESSION_FREE 3 | ||
55 | .Os | ||
56 | .Sh NAME | ||
57 | .Nm SSL_SESSION_up_ref , | ||
58 | .Nm SSL_SESSION_free | ||
59 | .Nd SSL_SESSION reference counting | ||
60 | .Sh SYNOPSIS | ||
61 | .In openssl/ssl.h | ||
62 | .Ft int | ||
63 | .Fn SSL_SESSION_up_ref "SSL_SESSION *session" | ||
64 | .Ft void | ||
65 | .Fn SSL_SESSION_free "SSL_SESSION *session" | ||
66 | .Sh DESCRIPTION | ||
67 | .Fn SSL_SESSION_up_ref | ||
68 | increments the reference count of the given | ||
69 | .Fa session | ||
70 | by 1. | ||
71 | .Pp | ||
72 | .Fn SSL_SESSION_free | ||
73 | decrements the reference count of the given | ||
74 | .Fa session | ||
75 | by 1. | ||
76 | If the reference count reaches 0, it frees the memory used by the | ||
77 | .Fa session . | ||
78 | If | ||
79 | .Fa session | ||
80 | is a | ||
81 | .Dv NULL | ||
82 | pointer, no action occurs. | ||
83 | .Pp | ||
84 | .Vt SSL_SESSION | ||
85 | objects are allocated when a TLS/SSL handshake operation is successfully | ||
86 | completed. | ||
87 | Depending on the settings, see | ||
88 | .Xr SSL_CTX_set_session_cache_mode 3 , | ||
89 | the | ||
90 | .Vt SSL_SESSION | ||
91 | objects are internally referenced by the | ||
92 | .Vt SSL_CTX | ||
93 | and linked into its session cache. | ||
94 | .Vt SSL | ||
95 | objects may be using the | ||
96 | .Vt SSL_SESSION | ||
97 | object; as a session may be reused, several | ||
98 | .Vt SSL | ||
99 | objects may be using one | ||
100 | .Vt SSL_SESSION | ||
101 | object at the same time. | ||
102 | It is therefore crucial to keep the reference count (usage information) correct | ||
103 | and not delete a | ||
104 | .Vt SSL_SESSION | ||
105 | object that is still used, as this may lead to program failures due to dangling | ||
106 | pointers. | ||
107 | These failures may also appear delayed, e.g., when an | ||
108 | .Vt SSL_SESSION | ||
109 | object is completely freed as the reference count incorrectly becomes 0, but it | ||
110 | is still referenced in the internal session cache and the cache list is | ||
111 | processed during a | ||
112 | .Xr SSL_CTX_flush_sessions 3 | ||
113 | operation. | ||
114 | .Pp | ||
115 | .Fn SSL_SESSION_free | ||
116 | must only be called for | ||
117 | .Vt SSL_SESSION | ||
118 | objects, for which the reference count was explicitly incremented (e.g., by | ||
119 | calling | ||
120 | .Xr SSL_get1_session 3 ; | ||
121 | see | ||
122 | .Xr SSL_get_session 3 ) | ||
123 | or when the | ||
124 | .Vt SSL_SESSION | ||
125 | object was generated outside a TLS handshake operation, e.g., by using | ||
126 | .Xr d2i_SSL_SESSION 3 . | ||
127 | It must not be called on other | ||
128 | .Vt SSL_SESSION | ||
129 | objects, as this would cause incorrect reference counts and therefore program | ||
130 | failures. | ||
131 | .Sh RETURN VALUES | ||
132 | .Fn SSL_SESSION_up_ref | ||
133 | returns 1 on success or 0 on error. | ||
134 | .Sh SEE ALSO | ||
135 | .Xr d2i_SSL_SESSION 3 , | ||
136 | .Xr ssl 3 , | ||
137 | .Xr SSL_CTX_flush_sessions 3 , | ||
138 | .Xr SSL_CTX_set_session_cache_mode 3 , | ||
139 | .Xr SSL_get_session 3 , | ||
140 | .Xr SSL_SESSION_new 3 | ||
141 | .Sh HISTORY | ||
142 | .Fn SSL_SESSION_free | ||
143 | first appeared in SSLeay 0.5.2 and has been available since | ||
144 | .Ox 2.4 . | ||
145 | .Pp | ||
146 | .Fn SSL_SESSION_up_ref | ||
147 | first appeared in OpenSSL 1.1.0 and has been available since | ||
148 | .Ox 6.3 . | ||
diff --git a/src/lib/libssl/man/SSL_SESSION_get0_cipher.3 b/src/lib/libssl/man/SSL_SESSION_get0_cipher.3 deleted file mode 100644 index 239a426dbd..0000000000 --- a/src/lib/libssl/man/SSL_SESSION_get0_cipher.3 +++ /dev/null | |||
@@ -1,94 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_SESSION_get0_cipher.3,v 1.1 2021/05/12 14:16:25 tb Exp $ | ||
2 | .\" full merge up to: OpenSSL d42e7759f Mar 30 19:40:04 2017 +0200 | ||
3 | .\" selective merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100 | ||
4 | .\" | ||
5 | .\" This file was written by Rich Salz <rsalz@openssl.org>. | ||
6 | .\" Copyright (c) 2016, 2017 The OpenSSL Project. All rights reserved. | ||
7 | .\" | ||
8 | .\" Redistribution and use in source and binary forms, with or without | ||
9 | .\" modification, are permitted provided that the following conditions | ||
10 | .\" are met: | ||
11 | .\" | ||
12 | .\" 1. Redistributions of source code must retain the above copyright | ||
13 | .\" notice, this list of conditions and the following disclaimer. | ||
14 | .\" | ||
15 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
16 | .\" notice, this list of conditions and the following disclaimer in | ||
17 | .\" the documentation and/or other materials provided with the | ||
18 | .\" distribution. | ||
19 | .\" | ||
20 | .\" 3. All advertising materials mentioning features or use of this | ||
21 | .\" software must display the following acknowledgment: | ||
22 | .\" "This product includes software developed by the OpenSSL Project | ||
23 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
24 | .\" | ||
25 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | .\" endorse or promote products derived from this software without | ||
27 | .\" prior written permission. For written permission, please contact | ||
28 | .\" openssl-core@openssl.org. | ||
29 | .\" | ||
30 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
31 | .\" nor may "OpenSSL" appear in their names without prior written | ||
32 | .\" permission of the OpenSSL Project. | ||
33 | .\" | ||
34 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
35 | .\" acknowledgment: | ||
36 | .\" "This product includes software developed by the OpenSSL Project | ||
37 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
38 | .\" | ||
39 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | .\" | ||
52 | .Dd $Mdocdate: May 12 2021 $ | ||
53 | .Dt SSL_SESSION_GET0_CIPHER 3 | ||
54 | .Os | ||
55 | .Sh NAME | ||
56 | .Nm SSL_SESSION_get0_cipher | ||
57 | .Nd retrieve the SSL cipher associated with a session | ||
58 | .Sh SYNOPSIS | ||
59 | .In openssl/ssl.h | ||
60 | .Ft const SSL_CIPHER * | ||
61 | .Fo SSL_SESSION_get0_cipher | ||
62 | .Fa "const SSL_SESSION *session" | ||
63 | .Fc | ||
64 | .Sh DESCRIPTION | ||
65 | .Fn SSL_SESSION_get0_cipher | ||
66 | retrieves the cipher that was used by the connection when the session | ||
67 | was created, or | ||
68 | .Dv NULL | ||
69 | if it cannot be determined. | ||
70 | .Pp | ||
71 | The value returned is a pointer to an object maintained within | ||
72 | .Fa session | ||
73 | and should not be released. | ||
74 | .Sh RETURN VALUES | ||
75 | .Fn SSL_SESSION_get0_cipher | ||
76 | returns the | ||
77 | .Vt SSL_CIPHER | ||
78 | associated with | ||
79 | .Fa session | ||
80 | or | ||
81 | .Dv NULL | ||
82 | if it cannot be determined. | ||
83 | .Sh SEE ALSO | ||
84 | .Xr ssl 3 , | ||
85 | .Xr SSL_CIPHER_get_name 3 , | ||
86 | .Xr SSL_get_current_cipher 3 , | ||
87 | .Xr SSL_get_session 3 , | ||
88 | .Xr SSL_SESSION_new 3 | ||
89 | .Sh HISTORY | ||
90 | The | ||
91 | .Fn SSL_SESSION_get0_cipher | ||
92 | function first appeared in OpenSSL 1.1.0 | ||
93 | and has been available since | ||
94 | .Ox 7.0 . | ||
diff --git a/src/lib/libssl/man/SSL_SESSION_get0_peer.3 b/src/lib/libssl/man/SSL_SESSION_get0_peer.3 deleted file mode 100644 index 6b1ef6680e..0000000000 --- a/src/lib/libssl/man/SSL_SESSION_get0_peer.3 +++ /dev/null | |||
@@ -1,80 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_SESSION_get0_peer.3,v 1.2 2018/03/23 05:50:30 schwarze Exp $ | ||
2 | .\" OpenSSL SSL_SESSION_get0_peer.pod b31db505 Mar 24 16:01:50 2017 +0000 | ||
3 | .\" | ||
4 | .\" This file was written by Matt Caswell <matt@openssl.org> | ||
5 | .\" Copyright (c) 2017 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 23 2018 $ | ||
52 | .Dt SSL_SESSION_GET0_PEER 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_SESSION_get0_peer | ||
56 | .Nd get details about peer's certificate for a session | ||
57 | .Sh SYNOPSIS | ||
58 | .In openssl/ssl.h | ||
59 | .Ft X509 * | ||
60 | .Fo SSL_SESSION_get0_peer | ||
61 | .Fa "SSL_SESSION *s" | ||
62 | .Fc | ||
63 | .Sh DESCRIPTION | ||
64 | .Fn SSL_SESSION_get0_peer | ||
65 | returns a pointer to the peer certificate associated with the session | ||
66 | .Fa s | ||
67 | or | ||
68 | .Dv NULL | ||
69 | if no peer certificate is available. | ||
70 | The caller should not free the returned value, unless | ||
71 | .Xr X509_up_ref 3 | ||
72 | has also been called. | ||
73 | .Sh SEE ALSO | ||
74 | .Xr ssl 3 , | ||
75 | .Xr SSL_get_session 3 , | ||
76 | .Xr SSL_SESSION_new 3 | ||
77 | .Sh HISTORY | ||
78 | .Fn SSL_SESSION_get0_peer | ||
79 | first appeared in OpenSSL 1.0.1 and has been available since | ||
80 | .Ox 5.3 . | ||
diff --git a/src/lib/libssl/man/SSL_SESSION_get_compress_id.3 b/src/lib/libssl/man/SSL_SESSION_get_compress_id.3 deleted file mode 100644 index aedc216a15..0000000000 --- a/src/lib/libssl/man/SSL_SESSION_get_compress_id.3 +++ /dev/null | |||
@@ -1,78 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_SESSION_get_compress_id.3,v 1.3 2018/03/23 05:50:30 schwarze Exp $ | ||
2 | .\" OpenSSL SSL_SESSION_get_compress_id.pod b31db505 Mar 24 16:01:50 2017 | ||
3 | .\" | ||
4 | .\" This file was written by Matt Caswell <matt@openssl.org> | ||
5 | .\" Copyright (c) 2017 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 23 2018 $ | ||
52 | .Dt SSL_SESSION_GET_COMPRESS_ID 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_SESSION_get_compress_id | ||
56 | .Nd get details about the compression associated with a session | ||
57 | .Sh SYNOPSIS | ||
58 | .In openssl/ssl.h | ||
59 | .Ft unsigned int | ||
60 | .Fo SSL_SESSION_get_compress_id | ||
61 | .Fa "const SSL_SESSION *s" | ||
62 | .Fc | ||
63 | .Sh DESCRIPTION | ||
64 | If compression has been negotiated for an ssl session, | ||
65 | .Fn SSL_SESSION_get_compress_id | ||
66 | returns the id for the compression method, or 0 otherwise. | ||
67 | The only built-in supported compression method is zlib, | ||
68 | which has an id of 1. | ||
69 | .Sh SEE ALSO | ||
70 | .Xr ssl 3 , | ||
71 | .Xr SSL_get_session 3 , | ||
72 | .Xr SSL_SESSION_get_id 3 , | ||
73 | .Xr SSL_SESSION_get_protocol_version 3 , | ||
74 | .Xr SSL_SESSION_new 3 | ||
75 | .Sh HISTORY | ||
76 | .Fn SSL_SESSION_get_compress_id | ||
77 | first appeared in OpenSSL 1.0.1 and has been available since | ||
78 | .Ox 5.3 . | ||
diff --git a/src/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 b/src/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 deleted file mode 100644 index 9fd6949b6a..0000000000 --- a/src/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 +++ /dev/null | |||
@@ -1,134 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_SESSION_get_ex_new_index.3,v 1.3 2018/03/21 08:06:34 schwarze Exp $ | ||
2 | .\" OpenSSL 9b86974e Aug 17 15:21:33 2015 -0400 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001, 2005 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 21 2018 $ | ||
52 | .Dt SSL_SESSION_GET_EX_NEW_INDEX 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_SESSION_get_ex_new_index , | ||
56 | .Nm SSL_SESSION_set_ex_data , | ||
57 | .Nm SSL_SESSION_get_ex_data | ||
58 | .Nd internal application specific data functions | ||
59 | .Sh SYNOPSIS | ||
60 | .In openssl/ssl.h | ||
61 | .Ft int | ||
62 | .Fo SSL_SESSION_get_ex_new_index | ||
63 | .Fa "long argl" | ||
64 | .Fa "void *argp" | ||
65 | .Fa "CRYPTO_EX_new *new_func" | ||
66 | .Fa "CRYPTO_EX_dup *dup_func" | ||
67 | .Fa "CRYPTO_EX_free *free_func" | ||
68 | .Fc | ||
69 | .Ft int | ||
70 | .Fn SSL_SESSION_set_ex_data "SSL_SESSION *session" "int idx" "void *arg" | ||
71 | .Ft void * | ||
72 | .Fn SSL_SESSION_get_ex_data "const SSL_SESSION *session" "int idx" | ||
73 | .Bd -literal | ||
74 | typedef int new_func(void *parent, void *ptr, CRYPTO_EX_DATA *ad, | ||
75 | int idx, long argl, void *argp); | ||
76 | typedef void free_func(void *parent, void *ptr, CRYPTO_EX_DATA *ad, | ||
77 | int idx, long argl, void *argp); | ||
78 | typedef int dup_func(CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from, void *from_d, | ||
79 | int idx, long argl, void *argp); | ||
80 | .Ed | ||
81 | .Sh DESCRIPTION | ||
82 | Several OpenSSL structures can have application specific data attached to them. | ||
83 | These functions are used internally by OpenSSL to manipulate | ||
84 | application-specific data attached to a specific structure. | ||
85 | .Pp | ||
86 | .Fn SSL_SESSION_get_ex_new_index | ||
87 | is used to register a new index for application-specific data. | ||
88 | .Pp | ||
89 | .Fn SSL_SESSION_set_ex_data | ||
90 | is used to store application data at | ||
91 | .Fa arg | ||
92 | for | ||
93 | .Fa idx | ||
94 | into the | ||
95 | .Fa session | ||
96 | object. | ||
97 | .Pp | ||
98 | .Fn SSL_SESSION_get_ex_data | ||
99 | is used to retrieve the information for | ||
100 | .Fa idx | ||
101 | from | ||
102 | .Fa session . | ||
103 | .Pp | ||
104 | A detailed description for the | ||
105 | .Fn *_get_ex_new_index | ||
106 | functionality | ||
107 | can be found in | ||
108 | .Xr RSA_get_ex_new_index 3 . | ||
109 | The | ||
110 | .Fn *_get_ex_data | ||
111 | and | ||
112 | .Fn *_set_ex_data | ||
113 | functionality is described in | ||
114 | .Xr CRYPTO_set_ex_data 3 . | ||
115 | .Sh WARNINGS | ||
116 | The application data is only maintained for sessions held in memory. | ||
117 | The application data is not included when dumping the session with | ||
118 | .Xr i2d_SSL_SESSION 3 | ||
119 | (and all functions indirectly calling the dump functions like | ||
120 | .Xr PEM_write_SSL_SESSION 3 | ||
121 | and | ||
122 | .Xr PEM_write_bio_SSL_SESSION 3 ) | ||
123 | and can therefore not be restored. | ||
124 | .Sh SEE ALSO | ||
125 | .Xr CRYPTO_set_ex_data 3 , | ||
126 | .Xr RSA_get_ex_new_index 3 , | ||
127 | .Xr ssl 3 | ||
128 | .Sh HISTORY | ||
129 | .Fn SSL_SESSION_get_ex_new_index , | ||
130 | .Fn SSL_SESSION_set_ex_data , | ||
131 | and | ||
132 | .Fn SSL_SESSION_get_ex_data | ||
133 | first appeared in SSLeay 0.9.0 and have been available since | ||
134 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_SESSION_get_id.3 b/src/lib/libssl/man/SSL_SESSION_get_id.3 deleted file mode 100644 index 6d0de1e52e..0000000000 --- a/src/lib/libssl/man/SSL_SESSION_get_id.3 +++ /dev/null | |||
@@ -1,112 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_SESSION_get_id.3,v 1.6 2018/03/24 00:55:37 schwarze Exp $ | ||
2 | .\" full merge up to: | ||
3 | .\" OpenSSL SSL_SESSION_set1_id 17b60280 Dec 21 09:08:25 2017 +0100 | ||
4 | .\" | ||
5 | .\" This file was written by Remi Gacogne <rgacogne-github@coredump.fr> | ||
6 | .\" and Matt Caswell <matt@openssl.org>. | ||
7 | .\" Copyright (c) 2016, 2017 The OpenSSL Project. All rights reserved. | ||
8 | .\" | ||
9 | .\" Redistribution and use in source and binary forms, with or without | ||
10 | .\" modification, are permitted provided that the following conditions | ||
11 | .\" are met: | ||
12 | .\" | ||
13 | .\" 1. Redistributions of source code must retain the above copyright | ||
14 | .\" notice, this list of conditions and the following disclaimer. | ||
15 | .\" | ||
16 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
17 | .\" notice, this list of conditions and the following disclaimer in | ||
18 | .\" the documentation and/or other materials provided with the | ||
19 | .\" distribution. | ||
20 | .\" | ||
21 | .\" 3. All advertising materials mentioning features or use of this | ||
22 | .\" software must display the following acknowledgment: | ||
23 | .\" "This product includes software developed by the OpenSSL Project | ||
24 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
25 | .\" | ||
26 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
27 | .\" endorse or promote products derived from this software without | ||
28 | .\" prior written permission. For written permission, please contact | ||
29 | .\" openssl-core@openssl.org. | ||
30 | .\" | ||
31 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
32 | .\" nor may "OpenSSL" appear in their names without prior written | ||
33 | .\" permission of the OpenSSL Project. | ||
34 | .\" | ||
35 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
36 | .\" acknowledgment: | ||
37 | .\" "This product includes software developed by the OpenSSL Project | ||
38 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
39 | .\" | ||
40 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
41 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
42 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
43 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
44 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
45 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
46 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
47 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
48 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
49 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
50 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
51 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
52 | .\" | ||
53 | .Dd $Mdocdate: March 24 2018 $ | ||
54 | .Dt SSL_SESSION_GET_ID 3 | ||
55 | .Os | ||
56 | .Sh NAME | ||
57 | .Nm SSL_SESSION_get_id , | ||
58 | .Nm SSL_SESSION_set1_id | ||
59 | .Nd get and set the SSL session ID | ||
60 | .Sh SYNOPSIS | ||
61 | .In openssl/ssl.h | ||
62 | .Ft const unsigned char * | ||
63 | .Fo SSL_SESSION_get_id | ||
64 | .Fa "const SSL_SESSION *s" | ||
65 | .Fa "unsigned int *len" | ||
66 | .Fc | ||
67 | .Ft int | ||
68 | .Fo SSL_SESSION_set1_id | ||
69 | .Fa "SSL_SESSION *s" | ||
70 | .Fa "const unsigned char *sid" | ||
71 | .Fa "unsigned int sid_len" | ||
72 | .Fc | ||
73 | .Sh DESCRIPTION | ||
74 | .Fn SSL_SESSION_get_id | ||
75 | returns a pointer to the internal session ID value for the session | ||
76 | .Fa s . | ||
77 | The length of the ID in bytes is stored in | ||
78 | .Pf * Fa len . | ||
79 | The length may be 0. | ||
80 | The caller should not free the returned pointer directly. | ||
81 | .Pp | ||
82 | .Fn SSL_SESSION_set1_id | ||
83 | sets the session ID for | ||
84 | .Fa s | ||
85 | to a copy of the | ||
86 | .Fa sid | ||
87 | of length | ||
88 | .Fa sid_len . | ||
89 | .Sh RETURN VALUES | ||
90 | .Fn SSL_SESSION_get_id | ||
91 | returns a pointer to the session ID value. | ||
92 | .Pp | ||
93 | .Fn SSL_SESSION_set1_id | ||
94 | returns 1 for success and 0 for failure, | ||
95 | for example if the supplied session ID length exceeds | ||
96 | .Dv SSL_MAX_SSL_SESSION_ID_LENGTH . | ||
97 | .Sh SEE ALSO | ||
98 | .Xr ssl 3 , | ||
99 | .Xr SSL_copy_session_id 3 , | ||
100 | .Xr SSL_get_session 3 , | ||
101 | .Xr SSL_SESSION_get_compress_id 3 , | ||
102 | .Xr SSL_SESSION_get_protocol_version 3 , | ||
103 | .Xr SSL_SESSION_has_ticket 3 , | ||
104 | .Xr SSL_SESSION_new 3 | ||
105 | .Sh HISTORY | ||
106 | .Fn SSL_SESSION_get_id | ||
107 | first appeared in OpenSSL 0.9.8 and has been available since | ||
108 | .Ox 4.5 . | ||
109 | .Pp | ||
110 | .Fn SSL_SESSION_set1_id | ||
111 | first appeared in OpenSSL 1.1.0 and has been available since | ||
112 | .Ox 6.3 . | ||
diff --git a/src/lib/libssl/man/SSL_SESSION_get_protocol_version.3 b/src/lib/libssl/man/SSL_SESSION_get_protocol_version.3 deleted file mode 100644 index f14c0490e9..0000000000 --- a/src/lib/libssl/man/SSL_SESSION_get_protocol_version.3 +++ /dev/null | |||
@@ -1,84 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_SESSION_get_protocol_version.3,v 1.2 2018/03/24 00:55:37 schwarze Exp $ | ||
2 | .\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by TJ Saunders <tj@castaglia.org> | ||
5 | .\" Copyright (c) 2016 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 24 2018 $ | ||
52 | .Dt SSL_SESSION_GET_PROTOCOL_VERSION 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_SESSION_get_protocol_version | ||
56 | .Nd get the session protocol version | ||
57 | .Sh SYNOPSIS | ||
58 | .In openssl/ssl.h | ||
59 | .Ft int | ||
60 | .Fo SSL_SESSION_get_protocol_version | ||
61 | .Fa "const SSL_SESSION *s" | ||
62 | .Fc | ||
63 | .Sh DESCRIPTION | ||
64 | .Fn SSL_SESSION_get_protocol_version | ||
65 | returns the protocol version number used by the session | ||
66 | .Fa s . | ||
67 | .Sh RETURN VALUES | ||
68 | .Fn SSL_SESSION_get_protocol_version | ||
69 | returns a constant like | ||
70 | .Dv TLS1_VERSION | ||
71 | or | ||
72 | .Dv TLS1_2_VERSION . | ||
73 | .Sh SEE ALSO | ||
74 | .Xr ssl 3 , | ||
75 | .Xr SSL_get_session 3 , | ||
76 | .Xr SSL_SESSION_get0_peer 3 , | ||
77 | .Xr SSL_SESSION_get_compress_id 3 , | ||
78 | .Xr SSL_SESSION_get_id 3 , | ||
79 | .Xr SSL_SESSION_get_time 3 , | ||
80 | .Xr SSL_SESSION_new 3 | ||
81 | .Sh HISTORY | ||
82 | .Fn SSL_SESSION_get_protocol_version | ||
83 | first appeared in OpenSSL 1.1.0 and has been available since | ||
84 | .Ox 6.3 . | ||
diff --git a/src/lib/libssl/man/SSL_SESSION_get_time.3 b/src/lib/libssl/man/SSL_SESSION_get_time.3 deleted file mode 100644 index aaadec5137..0000000000 --- a/src/lib/libssl/man/SSL_SESSION_get_time.3 +++ /dev/null | |||
@@ -1,165 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_SESSION_get_time.3,v 1.8 2019/06/08 15:25:43 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001, 2005, 2006, 2016 The OpenSSL Project. | ||
6 | .\" All rights reserved. | ||
7 | .\" | ||
8 | .\" Redistribution and use in source and binary forms, with or without | ||
9 | .\" modification, are permitted provided that the following conditions | ||
10 | .\" are met: | ||
11 | .\" | ||
12 | .\" 1. Redistributions of source code must retain the above copyright | ||
13 | .\" notice, this list of conditions and the following disclaimer. | ||
14 | .\" | ||
15 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
16 | .\" notice, this list of conditions and the following disclaimer in | ||
17 | .\" the documentation and/or other materials provided with the | ||
18 | .\" distribution. | ||
19 | .\" | ||
20 | .\" 3. All advertising materials mentioning features or use of this | ||
21 | .\" software must display the following acknowledgment: | ||
22 | .\" "This product includes software developed by the OpenSSL Project | ||
23 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
24 | .\" | ||
25 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | .\" endorse or promote products derived from this software without | ||
27 | .\" prior written permission. For written permission, please contact | ||
28 | .\" openssl-core@openssl.org. | ||
29 | .\" | ||
30 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
31 | .\" nor may "OpenSSL" appear in their names without prior written | ||
32 | .\" permission of the OpenSSL Project. | ||
33 | .\" | ||
34 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
35 | .\" acknowledgment: | ||
36 | .\" "This product includes software developed by the OpenSSL Project | ||
37 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
38 | .\" | ||
39 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | .\" | ||
52 | .Dd $Mdocdate: June 8 2019 $ | ||
53 | .Dt SSL_SESSION_GET_TIME 3 | ||
54 | .Os | ||
55 | .Sh NAME | ||
56 | .Nm SSL_SESSION_get_time , | ||
57 | .Nm SSL_SESSION_set_time , | ||
58 | .Nm SSL_SESSION_get_timeout , | ||
59 | .Nm SSL_SESSION_set_timeout , | ||
60 | .Nm SSL_get_time , | ||
61 | .Nm SSL_set_time , | ||
62 | .Nm SSL_get_timeout , | ||
63 | .Nm SSL_set_timeout | ||
64 | .Nd retrieve and manipulate session time and timeout settings | ||
65 | .Sh SYNOPSIS | ||
66 | .In openssl/ssl.h | ||
67 | .Ft long | ||
68 | .Fn SSL_SESSION_get_time "const SSL_SESSION *s" | ||
69 | .Ft long | ||
70 | .Fn SSL_SESSION_set_time "SSL_SESSION *s" "long tm" | ||
71 | .Ft long | ||
72 | .Fn SSL_SESSION_get_timeout "const SSL_SESSION *s" | ||
73 | .Ft long | ||
74 | .Fn SSL_SESSION_set_timeout "SSL_SESSION *s" "long tm" | ||
75 | .Ft long | ||
76 | .Fn SSL_get_time "const SSL_SESSION *s" | ||
77 | .Ft long | ||
78 | .Fn SSL_set_time "SSL_SESSION *s" "long tm" | ||
79 | .Ft long | ||
80 | .Fn SSL_get_timeout "const SSL_SESSION *s" | ||
81 | .Ft long | ||
82 | .Fn SSL_set_timeout "SSL_SESSION *s" "long tm" | ||
83 | .Sh DESCRIPTION | ||
84 | .Fn SSL_SESSION_get_time | ||
85 | returns the time at which the session | ||
86 | .Fa s | ||
87 | was established. | ||
88 | The time is given in seconds since the Epoch and therefore compatible to the | ||
89 | time delivered by the | ||
90 | .Xr time 3 | ||
91 | call. | ||
92 | .Pp | ||
93 | .Fn SSL_SESSION_set_time | ||
94 | replaces the creation time of the session | ||
95 | .Fa s | ||
96 | with | ||
97 | the chosen value | ||
98 | .Fa tm . | ||
99 | .Pp | ||
100 | .Fn SSL_SESSION_get_timeout | ||
101 | returns the timeout value set for session | ||
102 | .Fa s | ||
103 | in seconds. | ||
104 | .Pp | ||
105 | .Fn SSL_SESSION_set_timeout | ||
106 | sets the timeout value for session | ||
107 | .Fa s | ||
108 | in seconds to | ||
109 | .Fa tm . | ||
110 | .Pp | ||
111 | The | ||
112 | .Fn SSL_get_time , | ||
113 | .Fn SSL_set_time , | ||
114 | .Fn SSL_get_timeout , | ||
115 | and | ||
116 | .Fn SSL_set_timeout | ||
117 | functions are synonyms for the | ||
118 | .Fn SSL_SESSION_* | ||
119 | counterparts. | ||
120 | .Pp | ||
121 | Sessions are expired by examining the creation time and the timeout value. | ||
122 | Both are set at creation time of the session to the actual time and the default | ||
123 | timeout value at creation, respectively, as set by | ||
124 | .Xr SSL_CTX_set_timeout 3 . | ||
125 | Using these functions it is possible to extend or shorten the lifetime of the | ||
126 | session. | ||
127 | .Sh RETURN VALUES | ||
128 | .Fn SSL_SESSION_get_time | ||
129 | and | ||
130 | .Fn SSL_SESSION_get_timeout | ||
131 | return the currently valid values. | ||
132 | .Pp | ||
133 | .Fn SSL_SESSION_set_time | ||
134 | and | ||
135 | .Fn SSL_SESSION_set_timeout | ||
136 | return 1 on success. | ||
137 | .Pp | ||
138 | If any of the function is passed the | ||
139 | .Dv NULL | ||
140 | pointer for the session | ||
141 | .Fa s , | ||
142 | 0 is returned. | ||
143 | .Sh SEE ALSO | ||
144 | .Xr ssl 3 , | ||
145 | .Xr SSL_CTX_set_timeout 3 , | ||
146 | .Xr SSL_get_default_timeout 3 , | ||
147 | .Xr SSL_get_session 3 , | ||
148 | .Xr SSL_SESSION_has_ticket 3 , | ||
149 | .Xr SSL_SESSION_new 3 | ||
150 | .Sh HISTORY | ||
151 | .Fn SSL_get_time , | ||
152 | .Fn SSL_get_timeout , | ||
153 | and | ||
154 | .Fn SSL_set_timeout | ||
155 | appeared in SSLeay 0.4 or earlier. | ||
156 | .Fn SSL_set_time | ||
157 | first appeared in SSLeay 0.5.2. | ||
158 | .Fn SSL_SESSION_get_time , | ||
159 | .Fn SSL_SESSION_set_time , | ||
160 | .Fn SSL_SESSION_get_timeout , | ||
161 | and | ||
162 | .Fn SSL_SESSION_set_timeout | ||
163 | first appeared in SSLeay 0.9.0. | ||
164 | All these functions have been available since | ||
165 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_SESSION_has_ticket.3 b/src/lib/libssl/man/SSL_SESSION_has_ticket.3 deleted file mode 100644 index 322b49feef..0000000000 --- a/src/lib/libssl/man/SSL_SESSION_has_ticket.3 +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_SESSION_has_ticket.3,v 1.2 2018/03/24 00:55:37 schwarze Exp $ | ||
2 | .\" full merge up to: OpenSSL f2baac27 Feb 8 15:43:16 2015 +0000 | ||
3 | .\" selective merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800 | ||
4 | .\" | ||
5 | .\" This file was written by Matt Caswell <matt@openssl.org>. | ||
6 | .\" Copyright (c) 2015 The OpenSSL Project. All rights reserved. | ||
7 | .\" | ||
8 | .\" Redistribution and use in source and binary forms, with or without | ||
9 | .\" modification, are permitted provided that the following conditions | ||
10 | .\" are met: | ||
11 | .\" | ||
12 | .\" 1. Redistributions of source code must retain the above copyright | ||
13 | .\" notice, this list of conditions and the following disclaimer. | ||
14 | .\" | ||
15 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
16 | .\" notice, this list of conditions and the following disclaimer in | ||
17 | .\" the documentation and/or other materials provided with the | ||
18 | .\" distribution. | ||
19 | .\" | ||
20 | .\" 3. All advertising materials mentioning features or use of this | ||
21 | .\" software must display the following acknowledgment: | ||
22 | .\" "This product includes software developed by the OpenSSL Project | ||
23 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
24 | .\" | ||
25 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | .\" endorse or promote products derived from this software without | ||
27 | .\" prior written permission. For written permission, please contact | ||
28 | .\" openssl-core@openssl.org. | ||
29 | .\" | ||
30 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
31 | .\" nor may "OpenSSL" appear in their names without prior written | ||
32 | .\" permission of the OpenSSL Project. | ||
33 | .\" | ||
34 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
35 | .\" acknowledgment: | ||
36 | .\" "This product includes software developed by the OpenSSL Project | ||
37 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
38 | .\" | ||
39 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | .\" | ||
52 | .Dd $Mdocdate: March 24 2018 $ | ||
53 | .Dt SSL_SESSION_HAS_TICKET 3 | ||
54 | .Os | ||
55 | .Sh NAME | ||
56 | .Nm SSL_SESSION_has_ticket , | ||
57 | .Nm SSL_SESSION_get_ticket_lifetime_hint | ||
58 | .Nd get details about the ticket associated with a session | ||
59 | .Sh SYNOPSIS | ||
60 | .In openssl/ssl.h | ||
61 | .Ft int | ||
62 | .Fo SSL_SESSION_has_ticket | ||
63 | .Fa "const SSL_SESSION *s" | ||
64 | .Fc | ||
65 | .Ft unsigned long | ||
66 | .Fo SSL_SESSION_get_ticket_lifetime_hint | ||
67 | .Fa "const SSL_SESSION *s" | ||
68 | .Fc | ||
69 | .Sh DESCRIPTION | ||
70 | .Fn SSL_SESSION_has_ticket | ||
71 | returns 1 if there is a Session Ticket associated with | ||
72 | .Fa s | ||
73 | or 0 otherwise. | ||
74 | .Pp | ||
75 | .Fn SSL_SESSION_get_ticket_lifetime_hint | ||
76 | returns the lifetime hint in seconds associated with the session ticket. | ||
77 | .Sh SEE ALSO | ||
78 | .Xr ssl 3 , | ||
79 | .Xr SSL_SESSION_get_id 3 , | ||
80 | .Xr SSL_SESSION_get_time 3 , | ||
81 | .Xr SSL_SESSION_new 3 | ||
82 | .Sh HISTORY | ||
83 | These functions first appeared in OpenSSL 1.1.0 | ||
84 | and have been available since | ||
85 | .Ox 6.3 . | ||
diff --git a/src/lib/libssl/man/SSL_SESSION_is_resumable.3 b/src/lib/libssl/man/SSL_SESSION_is_resumable.3 deleted file mode 100644 index 48d7d17889..0000000000 --- a/src/lib/libssl/man/SSL_SESSION_is_resumable.3 +++ /dev/null | |||
@@ -1,81 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_SESSION_is_resumable.3,v 1.1 2021/09/14 14:08:15 schwarze Exp $ | ||
2 | .\" full merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Matt Caswell <matt@openssl.org>. | ||
5 | .\" Copyright (c) 2017 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: September 14 2021 $ | ||
52 | .Dt SSL_SESSION_IS_RESUMABLE 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_SESSION_is_resumable | ||
56 | .Nd determine whether an SSL_SESSION object can be used for resumption | ||
57 | .Sh SYNOPSIS | ||
58 | .In openssl/ssl.h | ||
59 | .Ft int | ||
60 | .Fo SSL_SESSION_is_resumable | ||
61 | .Fa "const SSL_SESSION *session" | ||
62 | .Fc | ||
63 | .Sh DESCRIPTION | ||
64 | .Fn SSL_SESSION_is_resumable | ||
65 | determines whether the | ||
66 | .Fa session | ||
67 | object can be used to resume a session. | ||
68 | Note that attempting to resume with a non-resumable session | ||
69 | will result in a full handshake. | ||
70 | .Sh RETURN VALUES | ||
71 | .Fn SSL_SESSION_is_resumable | ||
72 | returns 1 if the session is resumable or 0 otherwise. | ||
73 | It always returns 0 with LibreSSL. | ||
74 | .Sh SEE ALSO | ||
75 | .Xr ssl 3 , | ||
76 | .Xr SSL_CTX_sess_set_new_cb 3 , | ||
77 | .Xr SSL_get_session 3 | ||
78 | .Sh HISTORY | ||
79 | .Fn SSL_SESSION_is_resumable | ||
80 | first appeared in OpenSSL 1.1.1 and has been available since | ||
81 | .Ox 7.0 . | ||
diff --git a/src/lib/libssl/man/SSL_SESSION_new.3 b/src/lib/libssl/man/SSL_SESSION_new.3 deleted file mode 100644 index 2dcdb264c1..0000000000 --- a/src/lib/libssl/man/SSL_SESSION_new.3 +++ /dev/null | |||
@@ -1,78 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_SESSION_new.3,v 1.9 2021/09/14 14:08:15 schwarze Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> | ||
4 | .\" | ||
5 | .\" Permission to use, copy, modify, and distribute this software for any | ||
6 | .\" purpose with or without fee is hereby granted, provided that the above | ||
7 | .\" copyright notice and this permission notice appear in all copies. | ||
8 | .\" | ||
9 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | .\" | ||
17 | .Dd $Mdocdate: September 14 2021 $ | ||
18 | .Dt SSL_SESSION_NEW 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm SSL_SESSION_new | ||
22 | .Nd construct a new SSL_SESSION object | ||
23 | .Sh SYNOPSIS | ||
24 | .In openssl/ssl.h | ||
25 | .Ft SSL_SESSION * | ||
26 | .Fn SSL_SESSION_new void | ||
27 | .Sh DESCRIPTION | ||
28 | .Fn SSL_SESSION_new | ||
29 | allocates and initializes a new | ||
30 | .Vt SSL_SESSION | ||
31 | object. | ||
32 | The reference count is set to 1, the time to the current time, and | ||
33 | the timeout to five minutes. | ||
34 | .Pp | ||
35 | When the object is no longer needed, it can be destructed with | ||
36 | .Xr SSL_SESSION_free 3 . | ||
37 | .Pp | ||
38 | .Fn SSL_SESSION_new | ||
39 | is used internally, for example by | ||
40 | .Xr SSL_connect 3 . | ||
41 | .Sh RETURN VALUES | ||
42 | .Fn SSL_SESSION_new | ||
43 | returns the new | ||
44 | .Vt SSL_SESSION | ||
45 | object or | ||
46 | .Dv NULL | ||
47 | if insufficient memory is available. | ||
48 | .Pp | ||
49 | After failure, | ||
50 | .Xr ERR_get_error 3 | ||
51 | returns | ||
52 | .Dv ERR_R_MALLOC_FAILURE . | ||
53 | .Sh SEE ALSO | ||
54 | .Xr d2i_SSL_SESSION 3 , | ||
55 | .Xr PEM_read_SSL_SESSION 3 , | ||
56 | .Xr ssl 3 , | ||
57 | .Xr SSL_connect 3 , | ||
58 | .Xr SSL_copy_session_id 3 , | ||
59 | .Xr SSL_CTX_add_session 3 , | ||
60 | .Xr SSL_CTX_sess_set_get_cb 3 , | ||
61 | .Xr SSL_get_session 3 , | ||
62 | .Xr SSL_SESSION_free 3 , | ||
63 | .Xr SSL_SESSION_get0_peer 3 , | ||
64 | .Xr SSL_SESSION_get_compress_id 3 , | ||
65 | .Xr SSL_SESSION_get_ex_new_index 3 , | ||
66 | .Xr SSL_SESSION_get_id 3 , | ||
67 | .Xr SSL_SESSION_get_master_key 3 , | ||
68 | .Xr SSL_SESSION_get_protocol_version 3 , | ||
69 | .Xr SSL_SESSION_get_time 3 , | ||
70 | .Xr SSL_SESSION_has_ticket 3 , | ||
71 | .Xr SSL_SESSION_is_resumable 3 , | ||
72 | .Xr SSL_SESSION_print 3 , | ||
73 | .Xr SSL_SESSION_set1_id_context 3 , | ||
74 | .Xr SSL_set_session 3 | ||
75 | .Sh HISTORY | ||
76 | .Fn SSL_SESSION_new | ||
77 | first appeared in SSLeay 0.5.2 and has been available since | ||
78 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_SESSION_print.3 b/src/lib/libssl/man/SSL_SESSION_print.3 deleted file mode 100644 index e92debde0e..0000000000 --- a/src/lib/libssl/man/SSL_SESSION_print.3 +++ /dev/null | |||
@@ -1,74 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_SESSION_print.3,v 1.4 2019/06/12 09:36:30 schwarze Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> | ||
4 | .\" | ||
5 | .\" Permission to use, copy, modify, and distribute this software for any | ||
6 | .\" purpose with or without fee is hereby granted, provided that the above | ||
7 | .\" copyright notice and this permission notice appear in all copies. | ||
8 | .\" | ||
9 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | .\" | ||
17 | .Dd $Mdocdate: June 12 2019 $ | ||
18 | .Dt SSL_SESSION_PRINT 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm SSL_SESSION_print , | ||
22 | .Nm SSL_SESSION_print_fp | ||
23 | .Nd print some properties of an SSL_SESSION object | ||
24 | .Sh SYNOPSIS | ||
25 | .In openssl/ssl.h | ||
26 | .Ft int | ||
27 | .Fo SSL_SESSION_print | ||
28 | .Fa "BIO *bp" | ||
29 | .Fa "const SSL_SESSION *session" | ||
30 | .Fc | ||
31 | .Ft int | ||
32 | .Fo SSL_SESSION_print_fp | ||
33 | .Fa "FILE *fp" | ||
34 | .Fa "const SSL_SESSION *session" | ||
35 | .Fc | ||
36 | .Sh DESCRIPTION | ||
37 | .Fn SSL_SESSION_print | ||
38 | prints some properties of | ||
39 | .Fa session | ||
40 | in a human-readable format to the | ||
41 | .Fa "BIO *bp" , | ||
42 | including protocol version, cipher name, session ID, | ||
43 | session ID context, master key, session ticket lifetime hint, | ||
44 | session ticket, start time, timeout, and verify return code. | ||
45 | .Pp | ||
46 | .Fn SSL_SESSION_print_fp | ||
47 | does the same as | ||
48 | .Fn SSL_SESSION_print | ||
49 | except that it prints to the | ||
50 | .Fa "FILE *fp" . | ||
51 | .Sh RETURN VALUES | ||
52 | .Fn SSL_SESSION_print | ||
53 | and | ||
54 | .Fn SSL_SESSION_print_fp | ||
55 | return 1 for success or 0 for failure. | ||
56 | .Pp | ||
57 | In some cases, the reason for failure can be determined with | ||
58 | .Xr ERR_get_error 3 . | ||
59 | .Sh SEE ALSO | ||
60 | .Xr d2i_SSL_SESSION 3 , | ||
61 | .Xr PEM_read_SSL_SESSION 3 , | ||
62 | .Xr ssl 3 , | ||
63 | .Xr SSL_get_session 3 , | ||
64 | .Xr SSL_SESSION_free 3 , | ||
65 | .Xr SSL_SESSION_get_ex_new_index 3 , | ||
66 | .Xr SSL_SESSION_get_time 3 , | ||
67 | .Xr SSL_SESSION_new 3 | ||
68 | .Sh HISTORY | ||
69 | .Fn SSL_SESSION_print | ||
70 | first appeared in SSLeay 0.5.2. | ||
71 | .Fn SSL_SESSION_print_fp | ||
72 | first appeared in SSLeay 0.6.0. | ||
73 | Both functions have been available since | ||
74 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_SESSION_set1_id_context.3 b/src/lib/libssl/man/SSL_SESSION_set1_id_context.3 deleted file mode 100644 index dd7595baca..0000000000 --- a/src/lib/libssl/man/SSL_SESSION_set1_id_context.3 +++ /dev/null | |||
@@ -1,113 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_SESSION_set1_id_context.3,v 1.4 2018/03/24 00:55:37 schwarze Exp $ | ||
2 | .\" full merge up to: | ||
3 | .\" OpenSSL SSL_SESSION_get0_id_context b31db505 Mar 24 16:01:50 2017 | ||
4 | .\" | ||
5 | .\" This file was written by Matt Caswell <matt@openssl.org> | ||
6 | .\" Copyright (c) 2017 The OpenSSL Project. All rights reserved. | ||
7 | .\" | ||
8 | .\" Redistribution and use in source and binary forms, with or without | ||
9 | .\" modification, are permitted provided that the following conditions | ||
10 | .\" are met: | ||
11 | .\" | ||
12 | .\" 1. Redistributions of source code must retain the above copyright | ||
13 | .\" notice, this list of conditions and the following disclaimer. | ||
14 | .\" | ||
15 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
16 | .\" notice, this list of conditions and the following disclaimer in | ||
17 | .\" the documentation and/or other materials provided with the | ||
18 | .\" distribution. | ||
19 | .\" | ||
20 | .\" 3. All advertising materials mentioning features or use of this | ||
21 | .\" software must display the following acknowledgment: | ||
22 | .\" "This product includes software developed by the OpenSSL Project | ||
23 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
24 | .\" | ||
25 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | .\" endorse or promote products derived from this software without | ||
27 | .\" prior written permission. For written permission, please contact | ||
28 | .\" openssl-core@openssl.org. | ||
29 | .\" | ||
30 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
31 | .\" nor may "OpenSSL" appear in their names without prior written | ||
32 | .\" permission of the OpenSSL Project. | ||
33 | .\" | ||
34 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
35 | .\" acknowledgment: | ||
36 | .\" "This product includes software developed by the OpenSSL Project | ||
37 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
38 | .\" | ||
39 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | .\" | ||
52 | .Dd $Mdocdate: March 24 2018 $ | ||
53 | .Dt SSL_SESSION_SET1_ID_CONTEXT 3 | ||
54 | .Os | ||
55 | .Sh NAME | ||
56 | .Nm SSL_SESSION_get0_id_context , | ||
57 | .Nm SSL_SESSION_set1_id_context | ||
58 | .Nd get and set the SSL ID context associated with a session | ||
59 | .Sh SYNOPSIS | ||
60 | .In openssl/ssl.h | ||
61 | .Ft const unsigned char * | ||
62 | .Fo SSL_SESSION_get0_id_context | ||
63 | .Fa "const SSL_SESSION *s" | ||
64 | .Fa "unsigned int *len" | ||
65 | .Fc | ||
66 | .Ft int | ||
67 | .Fo SSL_SESSION_set1_id_context | ||
68 | .Fa "SSL_SESSION *s" | ||
69 | .Fa "const unsigned char *sid_ctx" | ||
70 | .Fa "unsigned int sid_ctx_len" | ||
71 | .Fc | ||
72 | .Sh DESCRIPTION | ||
73 | .Fn SSL_SESSION_get0_id_context | ||
74 | returns the ID context associated with | ||
75 | .Fa s . | ||
76 | The length of the ID context in bytes is written to | ||
77 | .Pf * Fa len | ||
78 | if | ||
79 | .Fa len | ||
80 | is not | ||
81 | .Dv NULL . | ||
82 | .Pp | ||
83 | .Fn SSL_SESSION_set1_id_context | ||
84 | takes a copy of the provided ID context given in | ||
85 | .Fa sid_ctx | ||
86 | and associates it with the session | ||
87 | .Fa s . | ||
88 | The length of the ID context is given by | ||
89 | .Fa sid_ctx_len | ||
90 | which must not exceed | ||
91 | .Dv SSL_MAX_SID_CTX_LENGTH | ||
92 | bytes. | ||
93 | .Sh RETURN VALUES | ||
94 | .Fn SSL_SESSION_get0_id_context | ||
95 | returns an internal pointer to an object maintained within | ||
96 | .Fa s | ||
97 | that should not be freed by the caller. | ||
98 | .Pp | ||
99 | .Fn SSL_SESSION_set1_id_context | ||
100 | returns 1 on success or 0 on error. | ||
101 | .Sh SEE ALSO | ||
102 | .Xr ssl 3 , | ||
103 | .Xr SSL_CTX_set_session_id_context 3 , | ||
104 | .Xr SSL_get_session 3 , | ||
105 | .Xr SSL_SESSION_new 3 | ||
106 | .Sh HISTORY | ||
107 | .Fn SSL_SESSION_set1_id_context | ||
108 | first appeared in OpenSSL 1.0.1 and has been available since | ||
109 | .Ox 5.3 . | ||
110 | .Pp | ||
111 | .Fn SSL_SESSION_get0_id_context | ||
112 | first appeared in OpenSSL 1.1.0 and has been available since | ||
113 | .Ox 6.3 . | ||
diff --git a/src/lib/libssl/man/SSL_accept.3 b/src/lib/libssl/man/SSL_accept.3 deleted file mode 100644 index fb1d89eb57..0000000000 --- a/src/lib/libssl/man/SSL_accept.3 +++ /dev/null | |||
@@ -1,155 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_accept.3,v 1.6 2019/06/08 15:25:43 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2000, 2001, 2002, 2003 The OpenSSL Project. | ||
6 | .\" All rights reserved. | ||
7 | .\" | ||
8 | .\" Redistribution and use in source and binary forms, with or without | ||
9 | .\" modification, are permitted provided that the following conditions | ||
10 | .\" are met: | ||
11 | .\" | ||
12 | .\" 1. Redistributions of source code must retain the above copyright | ||
13 | .\" notice, this list of conditions and the following disclaimer. | ||
14 | .\" | ||
15 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
16 | .\" notice, this list of conditions and the following disclaimer in | ||
17 | .\" the documentation and/or other materials provided with the | ||
18 | .\" distribution. | ||
19 | .\" | ||
20 | .\" 3. All advertising materials mentioning features or use of this | ||
21 | .\" software must display the following acknowledgment: | ||
22 | .\" "This product includes software developed by the OpenSSL Project | ||
23 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
24 | .\" | ||
25 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | .\" endorse or promote products derived from this software without | ||
27 | .\" prior written permission. For written permission, please contact | ||
28 | .\" openssl-core@openssl.org. | ||
29 | .\" | ||
30 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
31 | .\" nor may "OpenSSL" appear in their names without prior written | ||
32 | .\" permission of the OpenSSL Project. | ||
33 | .\" | ||
34 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
35 | .\" acknowledgment: | ||
36 | .\" "This product includes software developed by the OpenSSL Project | ||
37 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
38 | .\" | ||
39 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | .\" | ||
52 | .Dd $Mdocdate: June 8 2019 $ | ||
53 | .Dt SSL_ACCEPT 3 | ||
54 | .Os | ||
55 | .Sh NAME | ||
56 | .Nm SSL_accept | ||
57 | .Nd wait for a TLS/SSL client to initiate a TLS/SSL handshake | ||
58 | .Sh SYNOPSIS | ||
59 | .In openssl/ssl.h | ||
60 | .Ft int | ||
61 | .Fn SSL_accept "SSL *ssl" | ||
62 | .Sh DESCRIPTION | ||
63 | .Fn SSL_accept | ||
64 | waits for a TLS/SSL client to initiate the TLS/SSL handshake. | ||
65 | The communication channel must already have been set and assigned to the | ||
66 | .Fa ssl | ||
67 | object by setting an underlying | ||
68 | .Vt BIO . | ||
69 | .Pp | ||
70 | The behaviour of | ||
71 | .Fn SSL_accept | ||
72 | depends on the underlying | ||
73 | .Vt BIO . | ||
74 | .Pp | ||
75 | If the underlying | ||
76 | .Vt BIO | ||
77 | is | ||
78 | .Em blocking , | ||
79 | .Fn SSL_accept | ||
80 | will only return once the handshake has been finished or an error occurred. | ||
81 | .Pp | ||
82 | If the underlying | ||
83 | .Vt BIO | ||
84 | is | ||
85 | .Em non-blocking , | ||
86 | .Fn SSL_accept | ||
87 | will also return when the underlying | ||
88 | .Vt BIO | ||
89 | could not satisfy the needs of | ||
90 | .Fn SSL_accept | ||
91 | to continue the handshake, indicating the problem by the return value \(mi1. | ||
92 | In this case a call to | ||
93 | .Xr SSL_get_error 3 | ||
94 | with the | ||
95 | return value of | ||
96 | .Fn SSL_accept | ||
97 | will yield | ||
98 | .Dv SSL_ERROR_WANT_READ | ||
99 | or | ||
100 | .Dv SSL_ERROR_WANT_WRITE . | ||
101 | The calling process then must repeat the call after taking appropriate action | ||
102 | to satisfy the needs of | ||
103 | .Fn SSL_accept . | ||
104 | The action depends on the underlying | ||
105 | .Dv BIO . | ||
106 | When using a non-blocking socket, nothing is to be done, but | ||
107 | .Xr select 2 | ||
108 | can be used to check for the required condition. | ||
109 | When using a buffering | ||
110 | .Vt BIO , | ||
111 | like a | ||
112 | .Vt BIO | ||
113 | pair, data must be written into or retrieved out of the | ||
114 | .Vt BIO | ||
115 | before being able to continue. | ||
116 | .Sh RETURN VALUES | ||
117 | The following return values can occur: | ||
118 | .Bl -tag -width Ds | ||
119 | .It 0 | ||
120 | The TLS/SSL handshake was not successful but was shut down controlled and by | ||
121 | the specifications of the TLS/SSL protocol. | ||
122 | Call | ||
123 | .Xr SSL_get_error 3 | ||
124 | with the return value | ||
125 | .Fa ret | ||
126 | to find out the reason. | ||
127 | .It 1 | ||
128 | The TLS/SSL handshake was successfully completed, | ||
129 | and a TLS/SSL connection has been established. | ||
130 | .It <0 | ||
131 | The TLS/SSL handshake was not successful because a fatal error occurred either | ||
132 | at the protocol level or a connection failure occurred. | ||
133 | The shutdown was not clean. | ||
134 | It can also occur of action is need to continue the operation for non-blocking | ||
135 | .Vt BIO Ns | ||
136 | s. | ||
137 | Call | ||
138 | .Xr SSL_get_error 3 | ||
139 | with the return value | ||
140 | .Fa ret | ||
141 | to find out the reason. | ||
142 | .El | ||
143 | .Sh SEE ALSO | ||
144 | .Xr BIO_new 3 , | ||
145 | .Xr ssl 3 , | ||
146 | .Xr SSL_connect 3 , | ||
147 | .Xr SSL_CTX_new 3 , | ||
148 | .Xr SSL_do_handshake 3 , | ||
149 | .Xr SSL_get_error 3 , | ||
150 | .Xr SSL_set_connect_state 3 , | ||
151 | .Xr SSL_shutdown 3 | ||
152 | .Sh HISTORY | ||
153 | .Fn SSL_accept | ||
154 | appeared in SSLeay 0.4 or earlier and has been available since | ||
155 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_alert_type_string.3 b/src/lib/libssl/man/SSL_alert_type_string.3 deleted file mode 100644 index 354865e546..0000000000 --- a/src/lib/libssl/man/SSL_alert_type_string.3 +++ /dev/null | |||
@@ -1,253 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_alert_type_string.3,v 1.7 2024/10/13 08:25:09 jsg Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001, 2011 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: October 13 2024 $ | ||
52 | .Dt SSL_ALERT_TYPE_STRING 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_alert_type_string , | ||
56 | .Nm SSL_alert_type_string_long , | ||
57 | .Nm SSL_alert_desc_string , | ||
58 | .Nm SSL_alert_desc_string_long | ||
59 | .Nd get textual description of alert information | ||
60 | .Sh SYNOPSIS | ||
61 | .In openssl/ssl.h | ||
62 | .Ft const char * | ||
63 | .Fn SSL_alert_type_string "int value" | ||
64 | .Ft const char * | ||
65 | .Fn SSL_alert_type_string_long "int value" | ||
66 | .Ft const char * | ||
67 | .Fn SSL_alert_desc_string "int value" | ||
68 | .Ft const char * | ||
69 | .Fn SSL_alert_desc_string_long "int value" | ||
70 | .Sh DESCRIPTION | ||
71 | .Fn SSL_alert_type_string | ||
72 | returns a one letter string indicating the type of the alert specified by | ||
73 | .Fa value . | ||
74 | .Pp | ||
75 | .Fn SSL_alert_type_string_long | ||
76 | returns a string indicating the type of the alert specified by | ||
77 | .Fa value . | ||
78 | .Pp | ||
79 | .Fn SSL_alert_desc_string | ||
80 | returns a two letter string as a short form describing the reason of the alert | ||
81 | specified by | ||
82 | .Fa value . | ||
83 | .Pp | ||
84 | .Fn SSL_alert_desc_string_long | ||
85 | returns a string describing the reason of the alert specified by | ||
86 | .Fa value . | ||
87 | .Pp | ||
88 | When one side of an SSL/TLS communication wants to inform the peer about | ||
89 | a special situation, it sends an alert. | ||
90 | The alert is sent as a special message and does not influence the normal data | ||
91 | stream (unless its contents results in the communication being canceled). | ||
92 | .Pp | ||
93 | A warning alert is sent, when a non-fatal error condition occurs. | ||
94 | The | ||
95 | .Dq close notify | ||
96 | alert is sent as a warning alert. | ||
97 | Other examples for non-fatal errors are certificate errors | ||
98 | .Po | ||
99 | .Dq certificate expired , | ||
100 | .Dq unsupported certificate | ||
101 | .Pc , | ||
102 | for which a warning alert may be sent. | ||
103 | (The sending party may, however, decide to send a fatal error.) | ||
104 | The receiving side may cancel the connection on reception of a warning alert at | ||
105 | its discretion. | ||
106 | .Pp | ||
107 | Several alert messages must be sent as fatal alert messages as specified | ||
108 | by the TLS RFC. | ||
109 | A fatal alert always leads to a connection abort. | ||
110 | .Sh RETURN VALUES | ||
111 | The following strings can occur for | ||
112 | .Fn SSL_alert_type_string | ||
113 | or | ||
114 | .Fn SSL_alert_type_string_long : | ||
115 | .Bl -tag -width Ds | ||
116 | .It \(dqW\(dq/\(dqwarning\(dq | ||
117 | .It \(dqF\(dq/\(dqfatal\(dq | ||
118 | .It \(dqU\(dq/\(dqunknown\(dq | ||
119 | This indicates that no support is available for this alert type. | ||
120 | Probably | ||
121 | .Fa value | ||
122 | does not contain a correct alert message. | ||
123 | .El | ||
124 | .Pp | ||
125 | The following strings can occur for | ||
126 | .Fn SSL_alert_desc_string | ||
127 | or | ||
128 | .Fn SSL_alert_desc_string_long : | ||
129 | .Bl -tag -width Ds | ||
130 | .It \(dqCN\(dq/\(dqclose notify\(dq | ||
131 | The connection shall be closed. | ||
132 | This is a warning alert. | ||
133 | .It \(dqUM\(dq/\(dqunexpected message\(dq | ||
134 | An inappropriate message was received. | ||
135 | This alert is always fatal and should never be observed in communication | ||
136 | between proper implementations. | ||
137 | .It \(dqBM\(dq/\(dqbad record mac\(dq | ||
138 | This alert is returned if a record is received with an incorrect MAC. | ||
139 | This message is always fatal. | ||
140 | .It \(dqDF\(dq/\(dqdecompression failure\(dq | ||
141 | The decompression function received improper input | ||
142 | (e.g., data that would expand to excessive length). | ||
143 | This message is always fatal. | ||
144 | .It \(dqHF\(dq/\(dqhandshake failure\(dq | ||
145 | Reception of a handshake_failure alert message indicates that the sender was | ||
146 | unable to negotiate an acceptable set of security parameters given the options | ||
147 | available. | ||
148 | This is a fatal error. | ||
149 | .It \(dqNC\(dq/\(dqno certificate\(dq | ||
150 | A client, that was asked to send a certificate, does not send a certificate | ||
151 | (SSLv3 only). | ||
152 | .It \(dqBC\(dq/\(dqbad certificate\(dq | ||
153 | A certificate was corrupt, contained signatures that did not verify correctly, | ||
154 | etc. | ||
155 | .It \(dqUC\(dq/\(dqunsupported certificate\(dq | ||
156 | A certificate was of an unsupported type. | ||
157 | .It \(dqCR\(dq/\(dqcertificate revoked\(dq | ||
158 | A certificate was revoked by its signer. | ||
159 | .It \(dqCE\(dq/\(dqcertificate expired\(dq | ||
160 | A certificate has expired or is not currently valid. | ||
161 | .It \(dqCU\(dq/\(dqcertificate unknown\(dq | ||
162 | Some other (unspecified) issue arose in processing the certificate, | ||
163 | rendering it unacceptable. | ||
164 | .It \(dqIP\(dq/\(dqillegal parameter\(dq | ||
165 | A field in the handshake was out of range or inconsistent with other fields. | ||
166 | This is always fatal. | ||
167 | .It \(dqDC\(dq/\(dqdecryption failed\(dq | ||
168 | A TLSCiphertext decrypted in an invalid way: either it wasn't an even multiple | ||
169 | of the block length or its padding values, when checked, weren't correct. | ||
170 | This message is always fatal. | ||
171 | .It \(dqRO\(dq/\(dqrecord overflow\(dq | ||
172 | A TLSCiphertext record was received which had a length more than | ||
173 | 2^14+2048 bytes, or a record decrypted to a TLSCompressed record with more than | ||
174 | 2^14+1024 bytes. | ||
175 | This message is always fatal. | ||
176 | .It \(dqCA\(dq/\(dqunknown CA\(dq | ||
177 | A valid certificate chain or partial chain was received, | ||
178 | but the certificate was not accepted because the CA certificate could not be | ||
179 | located or couldn't be matched with a known, trusted CA. | ||
180 | This message is always fatal. | ||
181 | .It \(dqAD\(dq/\(dqaccess denied\(dq | ||
182 | A valid certificate was received, but when access control was applied, | ||
183 | the sender decided not to proceed with negotiation. | ||
184 | This message is always fatal. | ||
185 | .It \(dqDE\(dq/\(dqdecode error\(dq | ||
186 | A message could not be decoded because some field was out of the specified | ||
187 | range or the length of the message was incorrect. | ||
188 | This message is always fatal. | ||
189 | .It \(dqCY\(dq/\(dqdecrypt error\(dq | ||
190 | A handshake cryptographic operation failed, including being unable to correctly | ||
191 | verify a signature, decrypt a key exchange, or validate a finished message. | ||
192 | .It \(dqER\(dq/\(dqexport restriction\(dq | ||
193 | A negotiation not in compliance with export restrictions was detected; | ||
194 | for example, attempting to transfer a 1024 bit ephemeral RSA key for the | ||
195 | RSA_EXPORT handshake method. | ||
196 | This message is always fatal. | ||
197 | .It \(dqPV\(dq/\(dqprotocol version\(dq | ||
198 | The protocol version the client has attempted to negotiate is recognized, | ||
199 | but not supported. | ||
200 | (For example, old protocol versions might be avoided for security reasons.) | ||
201 | This message is always fatal. | ||
202 | .It \(dqIS\(dq/\(dqinsufficient security\(dq | ||
203 | Returned instead of handshake_failure when a negotiation has failed | ||
204 | specifically because the server requires ciphers more secure than those | ||
205 | supported by the client. | ||
206 | This message is always fatal. | ||
207 | .It \(dqIE\(dq/\(dqinternal error\(dq | ||
208 | An internal error unrelated to the peer or the correctness of the protocol | ||
209 | makes it impossible to continue (such as a memory allocation failure). | ||
210 | This message is always fatal. | ||
211 | .It \(dqIF\(dq/\(dqinappropriate fallback\(dq | ||
212 | Sent by a server in response to an invalid connection retry attempt from | ||
213 | a client (see RFC 7507). | ||
214 | .It \(dqUS\(dq/\(dquser canceled\(dq | ||
215 | This handshake is being canceled for some reason unrelated to a protocol | ||
216 | failure. | ||
217 | If the user cancels an operation after the handshake is complete, | ||
218 | just closing the connection by sending a close_notify is more appropriate. | ||
219 | This alert should be followed by a close_notify. | ||
220 | This message is generally a warning. | ||
221 | .It \(dqNR\(dq/\(dqno renegotiation\(dq | ||
222 | Sent by the client in response to a hello request or by the server in response | ||
223 | to a client hello after initial handshaking. | ||
224 | Either of these would normally lead to renegotiation; when that is not | ||
225 | appropriate, the recipient should respond with this alert; at that point, | ||
226 | the original requester can decide whether to proceed with the connection. | ||
227 | One case where this would be appropriate would be where a server has spawned a | ||
228 | process to satisfy a request; the process might receive security parameters | ||
229 | (key length, authentication, etc.) at startup and it might be difficult to | ||
230 | communicate changes to these parameters after that point. | ||
231 | This message is always a warning. | ||
232 | .It \(dqUP\(dq/\(dqunknown PSK identity\(dq | ||
233 | Sent by the server to indicate that it does not recognize a PSK identity or an | ||
234 | SRP identity. | ||
235 | .It \(dqCQ\(dq/\(dqcertificate required\(dq | ||
236 | Sent by servers when a client certificate is desired but none was provided | ||
237 | by the client. | ||
238 | .It \(dqAP\(dq/\(dqno application protocol\(dq | ||
239 | Sent by servers when a client ALPN extension advertises only protocols that | ||
240 | the server does not support (see RFC 7301). | ||
241 | .It \(dqUK\(dq/\(dqunknown\(dq | ||
242 | This indicates that no description is available for this alert type. | ||
243 | Probably | ||
244 | .Fa value | ||
245 | does not contain a correct alert message. | ||
246 | .El | ||
247 | .Sh SEE ALSO | ||
248 | .Xr ssl 3 , | ||
249 | .Xr SSL_CTX_set_info_callback 3 | ||
250 | .Sh HISTORY | ||
251 | These functions first appeared in SSLeay 0.8.0 | ||
252 | and have been available since | ||
253 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_clear.3 b/src/lib/libssl/man/SSL_clear.3 deleted file mode 100644 index 809c3b20f4..0000000000 --- a/src/lib/libssl/man/SSL_clear.3 +++ /dev/null | |||
@@ -1,144 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_clear.3,v 1.5 2021/06/11 19:41:39 jmc Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2000, 2001, 2002, 2011, 2015 The OpenSSL Project. | ||
6 | .\" All rights reserved. | ||
7 | .\" | ||
8 | .\" Redistribution and use in source and binary forms, with or without | ||
9 | .\" modification, are permitted provided that the following conditions | ||
10 | .\" are met: | ||
11 | .\" | ||
12 | .\" 1. Redistributions of source code must retain the above copyright | ||
13 | .\" notice, this list of conditions and the following disclaimer. | ||
14 | .\" | ||
15 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
16 | .\" notice, this list of conditions and the following disclaimer in | ||
17 | .\" the documentation and/or other materials provided with the | ||
18 | .\" distribution. | ||
19 | .\" | ||
20 | .\" 3. All advertising materials mentioning features or use of this | ||
21 | .\" software must display the following acknowledgment: | ||
22 | .\" "This product includes software developed by the OpenSSL Project | ||
23 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
24 | .\" | ||
25 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | .\" endorse or promote products derived from this software without | ||
27 | .\" prior written permission. For written permission, please contact | ||
28 | .\" openssl-core@openssl.org. | ||
29 | .\" | ||
30 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
31 | .\" nor may "OpenSSL" appear in their names without prior written | ||
32 | .\" permission of the OpenSSL Project. | ||
33 | .\" | ||
34 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
35 | .\" acknowledgment: | ||
36 | .\" "This product includes software developed by the OpenSSL Project | ||
37 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
38 | .\" | ||
39 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | .\" | ||
52 | .Dd $Mdocdate: June 11 2021 $ | ||
53 | .Dt SSL_CLEAR 3 | ||
54 | .Os | ||
55 | .Sh NAME | ||
56 | .Nm SSL_clear | ||
57 | .Nd reset SSL object to allow another connection | ||
58 | .Sh SYNOPSIS | ||
59 | .In openssl/ssl.h | ||
60 | .Ft int | ||
61 | .Fn SSL_clear "SSL *ssl" | ||
62 | .Sh DESCRIPTION | ||
63 | Reset | ||
64 | .Fa ssl | ||
65 | to allow another connection. | ||
66 | All settings (method, ciphers, BIOs) are kept. | ||
67 | .Pp | ||
68 | .Fn SSL_clear | ||
69 | is used to prepare an | ||
70 | .Vt SSL | ||
71 | object for a new connection. | ||
72 | While all settings are kept, | ||
73 | a side effect is the handling of the current SSL session. | ||
74 | If a session is still | ||
75 | .Em open , | ||
76 | it is considered bad and will be removed from the session cache, | ||
77 | as required by RFC 2246. | ||
78 | A session is considered open if | ||
79 | .Xr SSL_shutdown 3 | ||
80 | was not called for the connection or at least | ||
81 | .Xr SSL_set_shutdown 3 | ||
82 | was used to | ||
83 | set the | ||
84 | .Dv SSL_SENT_SHUTDOWN | ||
85 | state. | ||
86 | .Pp | ||
87 | If a session was closed cleanly, | ||
88 | the session object will be kept and all settings corresponding. | ||
89 | This explicitly means that for example the special method used during the | ||
90 | session will be kept for the next handshake. | ||
91 | So if the session was a TLSv1 session, a | ||
92 | .Vt SSL | ||
93 | client object will use a TLSv1 client method for the next handshake and a | ||
94 | .Vt SSL | ||
95 | server object will use a TLSv1 server method, even if | ||
96 | .Fn TLS_*_method Ns s | ||
97 | were chosen on startup. | ||
98 | This might lead to connection failures (see | ||
99 | .Xr SSL_new 3 ) | ||
100 | for a description of the method's properties. | ||
101 | .Sh RETURN VALUES | ||
102 | The following return values can occur: | ||
103 | .Bl -tag -width Ds | ||
104 | .It 0 | ||
105 | The | ||
106 | .Fn SSL_clear | ||
107 | operation could not be performed. | ||
108 | Check the error stack to find out the reason. | ||
109 | .It 1 | ||
110 | The | ||
111 | .Fn SSL_clear | ||
112 | operation was successful. | ||
113 | .El | ||
114 | .Sh SEE ALSO | ||
115 | .Xr ssl 3 , | ||
116 | .Xr SSL_CTX_set_client_cert_cb 3 , | ||
117 | .Xr SSL_CTX_set_options 3 , | ||
118 | .Xr SSL_free 3 , | ||
119 | .Xr SSL_new 3 , | ||
120 | .Xr SSL_set_shutdown 3 , | ||
121 | .Xr SSL_shutdown 3 | ||
122 | .Sh HISTORY | ||
123 | .Fn SSL_clear | ||
124 | first appeared in SSLeay 0.4.5b and has been available since | ||
125 | .Ox 2.4 . | ||
126 | .Sh CAVEATS | ||
127 | .Fn SSL_clear | ||
128 | resets the | ||
129 | .Vt SSL | ||
130 | object to allow for another connection. | ||
131 | The reset operation however keeps several settings of the last sessions | ||
132 | (some of these settings were made automatically during the last handshake). | ||
133 | It only makes sense for a new connection with the exact same peer that shares | ||
134 | these settings, | ||
135 | and may fail if that peer changes its settings between connections. | ||
136 | Use the sequence | ||
137 | .Xr SSL_get_session 3 ; | ||
138 | .Xr SSL_new 3 ; | ||
139 | .Xr SSL_set_session 3 ; | ||
140 | .Xr SSL_free 3 | ||
141 | instead to avoid such failures (or simply | ||
142 | .Xr SSL_free 3 ; | ||
143 | .Xr SSL_new 3 | ||
144 | if session reuse is not desired). | ||
diff --git a/src/lib/libssl/man/SSL_connect.3 b/src/lib/libssl/man/SSL_connect.3 deleted file mode 100644 index d5b962a480..0000000000 --- a/src/lib/libssl/man/SSL_connect.3 +++ /dev/null | |||
@@ -1,154 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_connect.3,v 1.6 2018/03/27 17:35:50 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2000, 2001, 2002, 2003 The OpenSSL Project. | ||
6 | .\" All rights reserved. | ||
7 | .\" | ||
8 | .\" Redistribution and use in source and binary forms, with or without | ||
9 | .\" modification, are permitted provided that the following conditions | ||
10 | .\" are met: | ||
11 | .\" | ||
12 | .\" 1. Redistributions of source code must retain the above copyright | ||
13 | .\" notice, this list of conditions and the following disclaimer. | ||
14 | .\" | ||
15 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
16 | .\" notice, this list of conditions and the following disclaimer in | ||
17 | .\" the documentation and/or other materials provided with the | ||
18 | .\" distribution. | ||
19 | .\" | ||
20 | .\" 3. All advertising materials mentioning features or use of this | ||
21 | .\" software must display the following acknowledgment: | ||
22 | .\" "This product includes software developed by the OpenSSL Project | ||
23 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
24 | .\" | ||
25 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | .\" endorse or promote products derived from this software without | ||
27 | .\" prior written permission. For written permission, please contact | ||
28 | .\" openssl-core@openssl.org. | ||
29 | .\" | ||
30 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
31 | .\" nor may "OpenSSL" appear in their names without prior written | ||
32 | .\" permission of the OpenSSL Project. | ||
33 | .\" | ||
34 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
35 | .\" acknowledgment: | ||
36 | .\" "This product includes software developed by the OpenSSL Project | ||
37 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
38 | .\" | ||
39 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | .\" | ||
52 | .Dd $Mdocdate: March 27 2018 $ | ||
53 | .Dt SSL_CONNECT 3 | ||
54 | .Os | ||
55 | .Sh NAME | ||
56 | .Nm SSL_connect | ||
57 | .Nd initiate the TLS/SSL handshake with a TLS/SSL server | ||
58 | .Sh SYNOPSIS | ||
59 | .In openssl/ssl.h | ||
60 | .Ft int | ||
61 | .Fn SSL_connect "SSL *ssl" | ||
62 | .Sh DESCRIPTION | ||
63 | .Fn SSL_connect | ||
64 | initiates the TLS/SSL handshake with a server. | ||
65 | The communication channel must already have been set and assigned to the | ||
66 | .Fa ssl | ||
67 | by setting an underlying | ||
68 | .Vt BIO . | ||
69 | .Pp | ||
70 | The behaviour of | ||
71 | .Fn SSL_connect | ||
72 | depends on the underlying | ||
73 | .Vt BIO . | ||
74 | .Pp | ||
75 | If the underlying | ||
76 | .Vt BIO | ||
77 | is | ||
78 | .Em blocking , | ||
79 | .Fn SSL_connect | ||
80 | will only return once the handshake has been finished or an error occurred. | ||
81 | .Pp | ||
82 | If the underlying | ||
83 | .Vt BIO | ||
84 | is | ||
85 | .Em non-blocking , | ||
86 | .Fn SSL_connect | ||
87 | will also return when the underlying | ||
88 | .Vt BIO | ||
89 | could not satisfy the needs of | ||
90 | .Fn SSL_connect | ||
91 | to continue the handshake, indicating the problem with the return value \(mi1. | ||
92 | In this case a call to | ||
93 | .Xr SSL_get_error 3 | ||
94 | with the return value of | ||
95 | .Fn SSL_connect | ||
96 | will yield | ||
97 | .Dv SSL_ERROR_WANT_READ | ||
98 | or | ||
99 | .Dv SSL_ERROR_WANT_WRITE . | ||
100 | The calling process then must repeat the call after taking appropriate action | ||
101 | to satisfy the needs of | ||
102 | .Fn SSL_connect . | ||
103 | The action depends on the underlying | ||
104 | .Vt BIO . | ||
105 | When using a non-blocking socket, nothing is to be done, but | ||
106 | .Xr select 2 | ||
107 | can be used to check for the required condition. | ||
108 | When using a buffering | ||
109 | .Vt BIO , | ||
110 | like a | ||
111 | .Vt BIO | ||
112 | pair, data must be written into or retrieved out of the | ||
113 | .Vt BIO | ||
114 | before being able to continue. | ||
115 | .Sh RETURN VALUES | ||
116 | The following return values can occur: | ||
117 | .Bl -tag -width Ds | ||
118 | .It 0 | ||
119 | The TLS/SSL handshake was not successful but was shut down controlled and | ||
120 | by the specifications of the TLS/SSL protocol. | ||
121 | Call | ||
122 | .Xr SSL_get_error 3 | ||
123 | with the return value | ||
124 | .Fa ret | ||
125 | to find out the reason. | ||
126 | .It 1 | ||
127 | The TLS/SSL handshake was successfully completed, | ||
128 | and a TLS/SSL connection has been established. | ||
129 | .It <0 | ||
130 | The TLS/SSL handshake was not successful, because either a fatal error occurred | ||
131 | at the protocol level or a connection failure occurred. | ||
132 | The shutdown was not clean. | ||
133 | It can also occur if action is needed to continue the operation for | ||
134 | non-blocking | ||
135 | .Vt BIO Ns s . | ||
136 | Call | ||
137 | .Xr SSL_get_error 3 | ||
138 | with the return value | ||
139 | .Fa ret | ||
140 | to find out the reason. | ||
141 | .El | ||
142 | .Sh SEE ALSO | ||
143 | .Xr BIO_new 3 , | ||
144 | .Xr ssl 3 , | ||
145 | .Xr SSL_accept 3 , | ||
146 | .Xr SSL_CTX_new 3 , | ||
147 | .Xr SSL_do_handshake 3 , | ||
148 | .Xr SSL_get_error 3 , | ||
149 | .Xr SSL_set_connect_state 3 , | ||
150 | .Xr SSL_shutdown 3 | ||
151 | .Sh HISTORY | ||
152 | .Fn SSL_connect | ||
153 | appeared in SSLeay 0.4 or earlier and has been available since | ||
154 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_copy_session_id.3 b/src/lib/libssl/man/SSL_copy_session_id.3 deleted file mode 100644 index a7a7a8aa99..0000000000 --- a/src/lib/libssl/man/SSL_copy_session_id.3 +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_copy_session_id.3,v 1.7 2019/06/12 09:36:30 schwarze Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> | ||
4 | .\" | ||
5 | .\" Permission to use, copy, modify, and distribute this software for any | ||
6 | .\" purpose with or without fee is hereby granted, provided that the above | ||
7 | .\" copyright notice and this permission notice appear in all copies. | ||
8 | .\" | ||
9 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | .\" | ||
17 | .Dd $Mdocdate: June 12 2019 $ | ||
18 | .Dt SSL_COPY_SESSION_ID 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm SSL_copy_session_id | ||
22 | .Nd copy session details between SSL objects | ||
23 | .Sh SYNOPSIS | ||
24 | .In openssl/ssl.h | ||
25 | .Ft int | ||
26 | .Fo SSL_copy_session_id | ||
27 | .Fa "SSL *to" | ||
28 | .Fa "const SSL *from" | ||
29 | .Fc | ||
30 | .Sh DESCRIPTION | ||
31 | .Fn SSL_copy_session_id | ||
32 | copies the following data from | ||
33 | .Fa from | ||
34 | to | ||
35 | .Fa to : | ||
36 | .Bl -dash | ||
37 | .It | ||
38 | the pointer to the | ||
39 | .Vt SSL_SESSION | ||
40 | object, incrementing its reference count by 1 | ||
41 | .It | ||
42 | the pointer to the | ||
43 | .Vt SSL_METHOD | ||
44 | object; if that changes the method, protocol-specific data is | ||
45 | reinitialized | ||
46 | .It | ||
47 | the pointer to the | ||
48 | .Vt CERT | ||
49 | object, incrementing its reference count by 1 | ||
50 | .It | ||
51 | the session ID context | ||
52 | .El | ||
53 | .Pp | ||
54 | This function is used internally by | ||
55 | .Xr SSL_dup 3 | ||
56 | and by | ||
57 | .Xr BIO_ssl_copy_session_id 3 . | ||
58 | .Sh RETURN VALUES | ||
59 | .Fn SSL_copy_session_id | ||
60 | returns 1 on success and 0 on error. | ||
61 | .Sh SEE ALSO | ||
62 | .Xr BIO_ssl_copy_session_id 3 , | ||
63 | .Xr ssl 3 , | ||
64 | .Xr SSL_dup 3 , | ||
65 | .Xr SSL_get_session 3 , | ||
66 | .Xr SSL_SESSION_get_id 3 , | ||
67 | .Xr SSL_SESSION_new 3 , | ||
68 | .Xr SSL_set_session 3 , | ||
69 | .Xr SSL_set_session_id_context 3 | ||
70 | .Sh HISTORY | ||
71 | .Fn SSL_copy_session_id | ||
72 | appeared in SSLeay 0.4 or earlier and has been available since | ||
73 | .Ox 2.4 . | ||
74 | .Sh BUGS | ||
75 | Failures of | ||
76 | .Xr CRYPTO_add 3 | ||
77 | are silently ignored and may leave | ||
78 | .Fa to | ||
79 | in an invalid or inconsistent state. | ||
diff --git a/src/lib/libssl/man/SSL_do_handshake.3 b/src/lib/libssl/man/SSL_do_handshake.3 deleted file mode 100644 index e9327b4229..0000000000 --- a/src/lib/libssl/man/SSL_do_handshake.3 +++ /dev/null | |||
@@ -1,152 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_do_handshake.3,v 1.6 2018/03/27 17:35:50 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Martin Sjoegren <martin@strakt.com>. | ||
5 | .\" Copyright (c) 2002 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 27 2018 $ | ||
52 | .Dt SSL_DO_HANDSHAKE 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_do_handshake | ||
56 | .Nd perform a TLS/SSL handshake | ||
57 | .Sh SYNOPSIS | ||
58 | .In openssl/ssl.h | ||
59 | .Ft int | ||
60 | .Fn SSL_do_handshake "SSL *ssl" | ||
61 | .Sh DESCRIPTION | ||
62 | .Fn SSL_do_handshake | ||
63 | will wait for a SSL/TLS handshake to take place. | ||
64 | If the connection is in client mode, the handshake will be started. | ||
65 | The handshake routines may have to be explicitly set in advance using either | ||
66 | .Xr SSL_set_connect_state 3 | ||
67 | or | ||
68 | .Xr SSL_set_accept_state 3 . | ||
69 | .Pp | ||
70 | The behaviour of | ||
71 | .Fn SSL_do_handshake | ||
72 | depends on the underlying | ||
73 | .Vt BIO . | ||
74 | .Pp | ||
75 | If the underlying | ||
76 | .Vt BIO | ||
77 | is | ||
78 | .Em blocking , | ||
79 | .Fn SSL_do_handshake | ||
80 | will only return once the handshake has been finished or an error occurred. | ||
81 | .Pp | ||
82 | If the underlying | ||
83 | .Vt BIO | ||
84 | is | ||
85 | .Em non-blocking , | ||
86 | .Fn SSL_do_handshake | ||
87 | will also return when the underlying | ||
88 | .Vt BIO | ||
89 | could not satisfy the needs of | ||
90 | .Fn SSL_do_handshake | ||
91 | to continue the handshake. | ||
92 | In this case a call to | ||
93 | .Xr SSL_get_error 3 | ||
94 | with the return value of | ||
95 | .Fn SSL_do_handshake | ||
96 | will yield | ||
97 | .Dv SSL_ERROR_WANT_READ | ||
98 | or | ||
99 | .Dv SSL_ERROR_WANT_WRITE . | ||
100 | The calling process then must repeat the call after taking appropriate action | ||
101 | to satisfy the needs of | ||
102 | .Fn SSL_do_handshake . | ||
103 | The action depends on the underlying | ||
104 | .Vt BIO . | ||
105 | When using a non-blocking socket, nothing is to be done, but | ||
106 | .Xr select 2 | ||
107 | can be used to check for the required condition. | ||
108 | When using a buffering | ||
109 | .Vt BIO , | ||
110 | like a | ||
111 | .Vt BIO | ||
112 | pair, data must be written into or retrieved out of the | ||
113 | .Vt BIO | ||
114 | before being able to continue. | ||
115 | .Sh RETURN VALUES | ||
116 | The following return values can occur: | ||
117 | .Bl -tag -width Ds | ||
118 | .It 0 | ||
119 | The TLS/SSL handshake was not successful but was shut down controlled and | ||
120 | by the specifications of the TLS/SSL protocol. | ||
121 | Call | ||
122 | .Xr SSL_get_error 3 | ||
123 | with the return value | ||
124 | .Fa ret | ||
125 | to find out the reason. | ||
126 | .It 1 | ||
127 | The TLS/SSL handshake was successfully completed, | ||
128 | and a TLS/SSL connection has been established. | ||
129 | .It <0 | ||
130 | The TLS/SSL handshake was not successful because either a fatal error occurred | ||
131 | at the protocol level or a connection failure occurred. | ||
132 | The shutdown was not clean. | ||
133 | It can also occur if action is needed to continue the operation for | ||
134 | non-blocking | ||
135 | .Vt BIO Ns s . | ||
136 | Call | ||
137 | .Xr SSL_get_error 3 | ||
138 | with the return value | ||
139 | .Fa ret | ||
140 | to find out the reason. | ||
141 | .El | ||
142 | .Sh SEE ALSO | ||
143 | .Xr BIO_new 3 , | ||
144 | .Xr ssl 3 , | ||
145 | .Xr SSL_accept 3 , | ||
146 | .Xr SSL_connect 3 , | ||
147 | .Xr SSL_get_error 3 , | ||
148 | .Xr SSL_set_connect_state 3 | ||
149 | .Sh HISTORY | ||
150 | .Fn SSL_do_handshake | ||
151 | first appeared in SSLeay 0.8.0 and has been available since | ||
152 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_dup.3 b/src/lib/libssl/man/SSL_dup.3 deleted file mode 100644 index a83440b431..0000000000 --- a/src/lib/libssl/man/SSL_dup.3 +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_dup.3,v 1.5 2022/07/13 22:05:53 schwarze Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> | ||
4 | .\" | ||
5 | .\" Permission to use, copy, modify, and distribute this software for any | ||
6 | .\" purpose with or without fee is hereby granted, provided that the above | ||
7 | .\" copyright notice and this permission notice appear in all copies. | ||
8 | .\" | ||
9 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | .\" | ||
17 | .Dd $Mdocdate: July 13 2022 $ | ||
18 | .Dt SSL_DUP 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm SSL_dup | ||
22 | .Nd deep copy of an SSL object | ||
23 | .Sh SYNOPSIS | ||
24 | .In openssl/ssl.h | ||
25 | .Ft SSL * | ||
26 | .Fo SSL_dup | ||
27 | .Fa "SSL *ssl" | ||
28 | .Fc | ||
29 | .Sh DESCRIPTION | ||
30 | .Fn SSL_dup | ||
31 | constructs a new | ||
32 | .Vt SSL | ||
33 | object in the same context as | ||
34 | .Fa ssl | ||
35 | and copies much of the contained data from | ||
36 | .Fa ssl | ||
37 | to the new | ||
38 | .Vt SSL | ||
39 | object, but many fields, for example tlsext data, are not copied. | ||
40 | .Pp | ||
41 | As an exception from deep copying, if a session is already established, | ||
42 | the new object shares | ||
43 | .Fa ssl->cert | ||
44 | with the original object. | ||
45 | .Sh RETURN VALUES | ||
46 | .Fn SSL_dup | ||
47 | returns the new | ||
48 | .Vt SSL | ||
49 | object or | ||
50 | .Dv NULL | ||
51 | on failure. | ||
52 | .Sh SEE ALSO | ||
53 | .Xr ssl 3 , | ||
54 | .Xr SSL_clear 3 , | ||
55 | .Xr SSL_copy_session_id 3 , | ||
56 | .Xr SSL_free 3 , | ||
57 | .Xr SSL_new 3 , | ||
58 | .Xr SSL_set_security_level 3 | ||
59 | .Sh HISTORY | ||
60 | .Fn SSL_dup | ||
61 | first appeared in SSLeay 0.8.0 and has been available since | ||
62 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_dup_CA_list.3 b/src/lib/libssl/man/SSL_dup_CA_list.3 deleted file mode 100644 index d073b07176..0000000000 --- a/src/lib/libssl/man/SSL_dup_CA_list.3 +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_dup_CA_list.3,v 1.6 2019/06/12 09:36:30 schwarze Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> | ||
4 | .\" | ||
5 | .\" Permission to use, copy, modify, and distribute this software for any | ||
6 | .\" purpose with or without fee is hereby granted, provided that the above | ||
7 | .\" copyright notice and this permission notice appear in all copies. | ||
8 | .\" | ||
9 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | .\" | ||
17 | .Dd $Mdocdate: June 12 2019 $ | ||
18 | .Dt SSL_DUP_CA_LIST 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm SSL_dup_CA_list | ||
22 | .Nd deep copy of a stack of X.509 Name objects | ||
23 | .\" The capital "N" in "Name" is intentional (X.509 syntax). | ||
24 | .Sh SYNOPSIS | ||
25 | .Ft STACK_OF(X509_NAME) * | ||
26 | .Fo SSL_dup_CA_list | ||
27 | .Fa "const STACK_OF(X509_NAME) *sk" | ||
28 | .Fc | ||
29 | .Sh DESCRIPTION | ||
30 | .Fn SSL_dup_CA_list | ||
31 | constructs a new | ||
32 | .Vt STACK_OF(X509_NAME) | ||
33 | object and places copies of all the | ||
34 | .Vt X509_NAME | ||
35 | objects found on | ||
36 | .Fa sk | ||
37 | on it. | ||
38 | .Sh RETURN VALUES | ||
39 | .Fn SSL_dup_CA_list | ||
40 | returns the new | ||
41 | .Vt STACK_OF(X509_NAME) | ||
42 | or | ||
43 | .Dv NULL | ||
44 | on failure. | ||
45 | .Sh SEE ALSO | ||
46 | .Xr ssl 3 , | ||
47 | .Xr SSL_CTX_set_client_CA_list 3 , | ||
48 | .Xr SSL_get_client_CA_list 3 , | ||
49 | .Xr SSL_load_client_CA_file 3 , | ||
50 | .Xr X509_NAME_new 3 | ||
51 | .Sh HISTORY | ||
52 | .Fn SSL_dup_CA_list | ||
53 | first appeared in SSLeay 0.8.0 and has been available since | ||
54 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_export_keying_material.3 b/src/lib/libssl/man/SSL_export_keying_material.3 deleted file mode 100644 index e32a5c5d61..0000000000 --- a/src/lib/libssl/man/SSL_export_keying_material.3 +++ /dev/null | |||
@@ -1,133 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_export_keying_material.3,v 1.3 2019/06/12 09:36:30 schwarze Exp $ | ||
2 | .\" OpenSSL a599574b Jun 28 17:18:27 2017 +0100 | ||
3 | .\" OpenSSL 23cec1f4 Jun 21 13:55:02 2017 +0100 | ||
4 | .\" | ||
5 | .\" This file was written by Matt Caswell <matt@openssl.org>. | ||
6 | .\" Copyright (c) 2017 The OpenSSL Project. All rights reserved. | ||
7 | .\" | ||
8 | .\" Redistribution and use in source and binary forms, with or without | ||
9 | .\" modification, are permitted provided that the following conditions | ||
10 | .\" are met: | ||
11 | .\" | ||
12 | .\" 1. Redistributions of source code must retain the above copyright | ||
13 | .\" notice, this list of conditions and the following disclaimer. | ||
14 | .\" | ||
15 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
16 | .\" notice, this list of conditions and the following disclaimer in | ||
17 | .\" the documentation and/or other materials provided with the | ||
18 | .\" distribution. | ||
19 | .\" | ||
20 | .\" 3. All advertising materials mentioning features or use of this | ||
21 | .\" software must display the following acknowledgment: | ||
22 | .\" "This product includes software developed by the OpenSSL Project | ||
23 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
24 | .\" | ||
25 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | .\" endorse or promote products derived from this software without | ||
27 | .\" prior written permission. For written permission, please contact | ||
28 | .\" openssl-core@openssl.org. | ||
29 | .\" | ||
30 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
31 | .\" nor may "OpenSSL" appear in their names without prior written | ||
32 | .\" permission of the OpenSSL Project. | ||
33 | .\" | ||
34 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
35 | .\" acknowledgment: | ||
36 | .\" "This product includes software developed by the OpenSSL Project | ||
37 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
38 | .\" | ||
39 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | .\" | ||
52 | .Dd $Mdocdate: June 12 2019 $ | ||
53 | .Dt SSL_EXPORT_KEYING_MATERIAL 3 | ||
54 | .Os | ||
55 | .Sh NAME | ||
56 | .Nm SSL_export_keying_material | ||
57 | .Nd obtain keying material for application use | ||
58 | .Sh SYNOPSIS | ||
59 | .In openssl/ssl.h | ||
60 | .Ft int | ||
61 | .Fo SSL_export_keying_material | ||
62 | .Fa "SSL *s" | ||
63 | .Fa "unsigned char *out" | ||
64 | .Fa "size_t olen" | ||
65 | .Fa "const char *label" | ||
66 | .Fa "size_t llen" | ||
67 | .Fa "const unsigned char *context" | ||
68 | .Fa "size_t contextlen" | ||
69 | .Fa "int use_context" | ||
70 | .Fc | ||
71 | .Sh DESCRIPTION | ||
72 | During the creation of a TLS or DTLS connection, | ||
73 | shared keying material is established between the two endpoints. | ||
74 | The function | ||
75 | .Fn SSL_export_keying_material | ||
76 | enables an application to use some of this keying material | ||
77 | for its own purposes in accordance with RFC 5705. | ||
78 | .Pp | ||
79 | An application may need to securely establish the context | ||
80 | within which this keying material will be used. | ||
81 | For example, this may include identifiers for the application session, | ||
82 | application algorithms or parameters, or the lifetime of the context. | ||
83 | The context value is left to the application but must be the same on | ||
84 | both sides of the communication. | ||
85 | .Pp | ||
86 | For a given SSL connection | ||
87 | .Fa s , | ||
88 | .Fa olen | ||
89 | bytes of data will be written to | ||
90 | .Fa out . | ||
91 | The application specific context should be supplied | ||
92 | in the location pointed to by | ||
93 | .Fa context | ||
94 | and should be | ||
95 | .Fa contextlen | ||
96 | bytes long. | ||
97 | Provision of a context is optional. | ||
98 | If the context should be omitted entirely, then | ||
99 | .Fa use_context | ||
100 | should be set to 0. | ||
101 | Otherwise it should be any other value. | ||
102 | If | ||
103 | .Fa use_context | ||
104 | is 0, then the values of | ||
105 | .Fa context | ||
106 | and | ||
107 | .Fa contextlen | ||
108 | are ignored. | ||
109 | .Pp | ||
110 | In TLSv1.2 and below, a zero length context is treated differently | ||
111 | from no context at all, and will result in different keying material | ||
112 | being returned. | ||
113 | .Pp | ||
114 | An application specific label should be provided in the location pointed | ||
115 | to by | ||
116 | .Fa label | ||
117 | and should be | ||
118 | .Fa llen | ||
119 | bytes long. | ||
120 | Typically this will be a value from the | ||
121 | .Lk https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#exporter-labels "IANA Exporter Label Registry" . | ||
122 | .Pp | ||
123 | Alternatively, labels beginning with "EXPERIMENTAL" are permitted by the | ||
124 | standard to be used without registration. | ||
125 | .Sh RETURN VALUES | ||
126 | .Fn SSL_export_keying_material | ||
127 | returns 1 on success or 0 or -1 on failure. | ||
128 | .Sh SEE ALSO | ||
129 | .Xr ssl 3 | ||
130 | .Sh HISTORY | ||
131 | .Fn SSL_export_keying_material | ||
132 | first appeared in OpenSSL 1.0.1 and has been available since | ||
133 | .Ox 5.3 . | ||
diff --git a/src/lib/libssl/man/SSL_free.3 b/src/lib/libssl/man/SSL_free.3 deleted file mode 100644 index c713ded121..0000000000 --- a/src/lib/libssl/man/SSL_free.3 +++ /dev/null | |||
@@ -1,115 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_free.3,v 1.6 2021/06/11 19:41:39 jmc Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2000, 2001 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: June 11 2021 $ | ||
52 | .Dt SSL_FREE 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_free | ||
56 | .Nd free an allocated SSL structure | ||
57 | .Sh SYNOPSIS | ||
58 | .In openssl/ssl.h | ||
59 | .Ft void | ||
60 | .Fn SSL_free "SSL *ssl" | ||
61 | .Sh DESCRIPTION | ||
62 | .Fn SSL_free | ||
63 | decrements the reference count of | ||
64 | .Fa ssl , | ||
65 | and removes the | ||
66 | .Vt SSL | ||
67 | structure pointed to by | ||
68 | .Fa ssl | ||
69 | and frees up the allocated memory if the reference count has reached 0. | ||
70 | If | ||
71 | .Fa ssl | ||
72 | is a | ||
73 | .Dv NULL | ||
74 | pointer, no action occurs. | ||
75 | .Pp | ||
76 | .Fn SSL_free | ||
77 | also calls the | ||
78 | .Xr free 3 Ns | ||
79 | ing procedures for indirectly affected items, if applicable: the buffering | ||
80 | .Vt BIO , | ||
81 | the read and write | ||
82 | .Vt BIOs , | ||
83 | cipher lists specially created for this | ||
84 | .Fa ssl , | ||
85 | the | ||
86 | .Sy SSL_SESSION . | ||
87 | Do not explicitly free these indirectly freed up items before or after calling | ||
88 | .Fn SSL_free , | ||
89 | as trying to free things twice may lead to program failure. | ||
90 | .Pp | ||
91 | The | ||
92 | .Fa ssl | ||
93 | session has reference counts from two users: the | ||
94 | .Vt SSL | ||
95 | object, for which the reference count is removed by | ||
96 | .Fn SSL_free | ||
97 | and the internal session cache. | ||
98 | If the session is considered bad, because | ||
99 | .Xr SSL_shutdown 3 | ||
100 | was not called for the connection and | ||
101 | .Xr SSL_set_shutdown 3 | ||
102 | was not used to set the | ||
103 | .Vt SSL_SENT_SHUTDOWN | ||
104 | state, the session will also be removed from the session cache as required by | ||
105 | RFC 2246. | ||
106 | .Sh SEE ALSO | ||
107 | .Xr ssl 3 , | ||
108 | .Xr SSL_clear 3 , | ||
109 | .Xr SSL_new 3 , | ||
110 | .Xr SSL_set_shutdown 3 , | ||
111 | .Xr SSL_shutdown 3 | ||
112 | .Sh HISTORY | ||
113 | .Fn SSL_free | ||
114 | appeared in SSLeay 0.4 or earlier and has been available since | ||
115 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_get_SSL_CTX.3 b/src/lib/libssl/man/SSL_get_SSL_CTX.3 deleted file mode 100644 index 60fda555bc..0000000000 --- a/src/lib/libssl/man/SSL_get_SSL_CTX.3 +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_get_SSL_CTX.3,v 1.4 2018/03/27 17:35:50 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001, 2005 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 27 2018 $ | ||
52 | .Dt SSL_GET_SSL_CTX 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_get_SSL_CTX | ||
56 | .Nd get the SSL_CTX from which an SSL is created | ||
57 | .Sh SYNOPSIS | ||
58 | .In openssl/ssl.h | ||
59 | .Ft SSL_CTX * | ||
60 | .Fn SSL_get_SSL_CTX "const SSL *ssl" | ||
61 | .Sh DESCRIPTION | ||
62 | .Fn SSL_get_SSL_CTX | ||
63 | returns a pointer to the | ||
64 | .Vt SSL_CTX | ||
65 | object from which | ||
66 | .Fa ssl | ||
67 | was created with | ||
68 | .Xr SSL_new 3 . | ||
69 | .Sh RETURN VALUES | ||
70 | The pointer to the | ||
71 | .Vt SSL_CTX | ||
72 | object is returned. | ||
73 | .Sh SEE ALSO | ||
74 | .Xr ssl 3 , | ||
75 | .Xr SSL_new 3 | ||
76 | .Sh HISTORY | ||
77 | .Fn SSL_get_SSL_CTX | ||
78 | first appeared in SSLeay 0.5.1 and has been available since | ||
79 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_get_certificate.3 b/src/lib/libssl/man/SSL_get_certificate.3 deleted file mode 100644 index eb53ea49bf..0000000000 --- a/src/lib/libssl/man/SSL_get_certificate.3 +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_get_certificate.3,v 1.5 2019/06/12 09:36:30 schwarze Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> | ||
4 | .\" | ||
5 | .\" Permission to use, copy, modify, and distribute this software for any | ||
6 | .\" purpose with or without fee is hereby granted, provided that the above | ||
7 | .\" copyright notice and this permission notice appear in all copies. | ||
8 | .\" | ||
9 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | .\" | ||
17 | .Dd $Mdocdate: June 12 2019 $ | ||
18 | .Dt SSL_GET_CERTIFICATE 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm SSL_get_certificate , | ||
22 | .Nm SSL_get_privatekey | ||
23 | .Nd get SSL certificate and private key | ||
24 | .Sh SYNOPSIS | ||
25 | .In openssl/ssl.h | ||
26 | .Ft X509 * | ||
27 | .Fo SSL_get_certificate | ||
28 | .Fa "const SSL *ssl" | ||
29 | .Fc | ||
30 | .Ft EVP_PKEY * | ||
31 | .Fo SSL_get_privatekey | ||
32 | .Fa "const SSL *ssl" | ||
33 | .Fc | ||
34 | .Sh DESCRIPTION | ||
35 | These functions retrieve certificate and key data from an | ||
36 | .Vt SSL | ||
37 | object. | ||
38 | They return internal pointers that must not be freed by the application | ||
39 | program. | ||
40 | .Sh RETURN VALUES | ||
41 | .Fn SSL_get_certificate | ||
42 | returns the active X.509 certificate currently used by | ||
43 | .Fa ssl | ||
44 | or | ||
45 | .Dv NULL | ||
46 | if none is active. | ||
47 | .Pp | ||
48 | .Fn SSL_get_privatekey | ||
49 | returns the active private key currently used by | ||
50 | .Fa ssl | ||
51 | or | ||
52 | .Dv NULL | ||
53 | if none is active. | ||
54 | .Sh SEE ALSO | ||
55 | .Xr ssl 3 , | ||
56 | .Xr SSL_check_private_key 3 , | ||
57 | .Xr SSL_use_certificate 3 | ||
58 | .Sh HISTORY | ||
59 | .Fn SSL_get_certificate | ||
60 | first appeared in SSLeay 0.5.2a. | ||
61 | .Fn SSL_get_privatekey | ||
62 | first appeared in SSLeay 0.8.0. | ||
63 | Both functions have been available since | ||
64 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_get_ciphers.3 b/src/lib/libssl/man/SSL_get_ciphers.3 deleted file mode 100644 index 8030f0bbb1..0000000000 --- a/src/lib/libssl/man/SSL_get_ciphers.3 +++ /dev/null | |||
@@ -1,249 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_get_ciphers.3,v 1.11 2020/09/16 07:25:15 schwarze Exp $ | ||
2 | .\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" selective merge up to: OpenSSL 83cf7abf May 29 13:07:08 2018 +0100 | ||
4 | .\" | ||
5 | .\" This file is a derived work. | ||
6 | .\" The changes are covered by the following Copyright and license: | ||
7 | .\" | ||
8 | .\" Copyright (c) 2020 Ingo Schwarze <schwarze@openbsd.org> | ||
9 | .\" | ||
10 | .\" Permission to use, copy, modify, and distribute this software for any | ||
11 | .\" purpose with or without fee is hereby granted, provided that the above | ||
12 | .\" copyright notice and this permission notice appear in all copies. | ||
13 | .\" | ||
14 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
15 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
16 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
17 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
18 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
19 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
20 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
21 | .\" | ||
22 | .\" The original file was written by Lutz Jaenicke <jaenicke@openssl.org>, | ||
23 | .\" Nick Mathewson <nickm@torproject.org>, Kurt Roeckx <kurt@roeckx.be>, | ||
24 | .\" Kazuki Yamaguchi <k@rhe.jp>, and Benjamin Kaduk <bkaduk@akamai.com>. | ||
25 | .\" Copyright (c) 2000, 2005, 2015, 2016, 2017 The OpenSSL Project. | ||
26 | .\" All rights reserved. | ||
27 | .\" | ||
28 | .\" Redistribution and use in source and binary forms, with or without | ||
29 | .\" modification, are permitted provided that the following conditions | ||
30 | .\" are met: | ||
31 | .\" | ||
32 | .\" 1. Redistributions of source code must retain the above copyright | ||
33 | .\" notice, this list of conditions and the following disclaimer. | ||
34 | .\" | ||
35 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
36 | .\" notice, this list of conditions and the following disclaimer in | ||
37 | .\" the documentation and/or other materials provided with the | ||
38 | .\" distribution. | ||
39 | .\" | ||
40 | .\" 3. All advertising materials mentioning features or use of this | ||
41 | .\" software must display the following acknowledgment: | ||
42 | .\" "This product includes software developed by the OpenSSL Project | ||
43 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
44 | .\" | ||
45 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
46 | .\" endorse or promote products derived from this software without | ||
47 | .\" prior written permission. For written permission, please contact | ||
48 | .\" openssl-core@openssl.org. | ||
49 | .\" | ||
50 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
51 | .\" nor may "OpenSSL" appear in their names without prior written | ||
52 | .\" permission of the OpenSSL Project. | ||
53 | .\" | ||
54 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
55 | .\" acknowledgment: | ||
56 | .\" "This product includes software developed by the OpenSSL Project | ||
57 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
58 | .\" | ||
59 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
60 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
61 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
62 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
63 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
64 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
65 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
66 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
67 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
68 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
69 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
70 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
71 | .\" | ||
72 | .Dd $Mdocdate: September 16 2020 $ | ||
73 | .Dt SSL_GET_CIPHERS 3 | ||
74 | .Os | ||
75 | .Sh NAME | ||
76 | .Nm SSL_get_ciphers , | ||
77 | .Nm SSL_CTX_get_ciphers , | ||
78 | .Nm SSL_get1_supported_ciphers , | ||
79 | .Nm SSL_get_client_ciphers , | ||
80 | .Nm SSL_get_cipher_list | ||
81 | .Nd get lists of available SSL_CIPHERs | ||
82 | .Sh SYNOPSIS | ||
83 | .In openssl/ssl.h | ||
84 | .Ft STACK_OF(SSL_CIPHER) * | ||
85 | .Fn SSL_get_ciphers "const SSL *ssl" | ||
86 | .Ft STACK_OF(SSL_CIPHER) * | ||
87 | .Fn SSL_CTX_get_ciphers "const SSL_CTX *ctx" | ||
88 | .Ft STACK_OF(SSL_CIPHER) * | ||
89 | .Fn SSL_get1_supported_ciphers "SSL *ssl" | ||
90 | .Ft STACK_OF(SSL_CIPHER) * | ||
91 | .Fn SSL_get_client_ciphers "const SSL *ssl" | ||
92 | .Ft const char * | ||
93 | .Fn SSL_get_cipher_list "const SSL *ssl" "int priority" | ||
94 | .Sh DESCRIPTION | ||
95 | .Fn SSL_get_ciphers | ||
96 | returns the stack of available | ||
97 | .Vt SSL_CIPHER Ns s | ||
98 | for | ||
99 | .Fa ssl , | ||
100 | sorted by preference. | ||
101 | .Pp | ||
102 | .Fn SSL_CTX_get_ciphers | ||
103 | returns the stack of available | ||
104 | .Vt SSL_CIPHER Ns s | ||
105 | for | ||
106 | .Fa ctx . | ||
107 | .Pp | ||
108 | .Fn SSL_get1_supported_ciphers | ||
109 | returns a stack of enabled | ||
110 | .Vt SSL_CIPHER Ns s | ||
111 | for | ||
112 | .Fa ssl | ||
113 | as it would be sent in a ClientHello, sorted by preference. | ||
114 | The list depends on settings like the cipher list, the supported | ||
115 | protocol versions, the security level, and the enabled signature | ||
116 | algorithms. | ||
117 | The list of ciphers that would be sent in a ClientHello can differ | ||
118 | from the list of ciphers that would be acceptable when acting as a | ||
119 | server. | ||
120 | For example, | ||
121 | additional ciphers may be usable by a server if there is a gap in the | ||
122 | list of supported protocols, and some ciphers may not be usable by a | ||
123 | server if there is not a suitable certificate configured. | ||
124 | .Pp | ||
125 | .Fn SSL_get_client_ciphers | ||
126 | returns the stack of available | ||
127 | .Vt SSL_CIPHER Ns s | ||
128 | matching the list received from the client on | ||
129 | .Fa ssl . | ||
130 | .Pp | ||
131 | The details of the ciphers obtained by | ||
132 | .Fn SSL_get_ciphers , | ||
133 | .Fn SSL_CTX_get_ciphers , | ||
134 | .Fn SSL_get1_supported_ciphers , | ||
135 | and | ||
136 | .Fn SSL_get_client_ciphers | ||
137 | can be obtained using the | ||
138 | .Xr SSL_CIPHER_get_name 3 | ||
139 | family of functions. | ||
140 | .Pp | ||
141 | .Fn SSL_get_cipher_list | ||
142 | is deprecated \(em use | ||
143 | .Fn SSL_get_ciphers | ||
144 | instead \(em and badly misnamed; it does not return a list | ||
145 | but the name of one element of the return value of | ||
146 | .Fn SSL_get_ciphers , | ||
147 | with the index given by the | ||
148 | .Fa priority | ||
149 | argument. | ||
150 | Passing 0 selects the cipher with the highest priority. | ||
151 | To iterate over all available ciphers in decreasing priority, | ||
152 | repeatedly increment the argument by 1 until | ||
153 | .Dv NULL | ||
154 | is returned. | ||
155 | .Sh RETURN VALUES | ||
156 | .Fn SSL_get_ciphers | ||
157 | returns an internal pointer to a list of ciphers or | ||
158 | .Dv NULL | ||
159 | if | ||
160 | .Fa ssl | ||
161 | is | ||
162 | .Dv NULL | ||
163 | or if no ciphers are available. | ||
164 | The returned pointer may not only become invalid when | ||
165 | .Fa ssl | ||
166 | is destroyed or when | ||
167 | .Xr SSL_set_cipher_list 3 | ||
168 | is called on it, but also when the | ||
169 | .Vt SSL_CTX | ||
170 | object in use by | ||
171 | .Fa ssl | ||
172 | at the time of the call is freed or when | ||
173 | .Xr SSL_CTX_set_cipher_list 3 | ||
174 | is called on that context object. | ||
175 | .Pp | ||
176 | .Fn SSL_CTX_get_ciphers | ||
177 | returns an internal pointer to a list of ciphers or | ||
178 | .Dv NULL | ||
179 | if | ||
180 | .Fa ctx | ||
181 | is | ||
182 | .Dv NULL | ||
183 | or if no ciphers are available. | ||
184 | The returned pointer becomes invalid when | ||
185 | .Fa ctx | ||
186 | is destroyed or when | ||
187 | .Xr SSL_CTX_set_cipher_list 3 | ||
188 | is called on it. | ||
189 | .Pp | ||
190 | .Fn SSL_get1_supported_ciphers | ||
191 | returns a newly allocated list of ciphers or | ||
192 | .Dv NULL | ||
193 | if | ||
194 | .Fa ssl | ||
195 | is | ||
196 | .Dv NULL , | ||
197 | if no ciphers are available, or if an error occurs. | ||
198 | When the returned pointer is no longer needed, the caller is | ||
199 | responsible for freeing it using | ||
200 | .Fn sk_SSL_CIPHER_free . | ||
201 | .Pp | ||
202 | .Fn SSL_get_client_ciphers | ||
203 | returns an internal pointer to a list of ciphers or | ||
204 | .Dv NULL | ||
205 | if | ||
206 | .Fa ssl | ||
207 | is | ||
208 | .Dv NULL , | ||
209 | has no active session, | ||
210 | or is not operating in server mode. | ||
211 | The returned pointer becomes invalid when the | ||
212 | .Vt SSL_SESSION | ||
213 | object is destroyed, even if the | ||
214 | .Fa ssl | ||
215 | object remains valid. | ||
216 | It may also become invalid in other circumstances, | ||
217 | for example when processing a new ClientHello. | ||
218 | .Pp | ||
219 | .Fn SSL_get_cipher_list | ||
220 | returns an internal pointer to a string or | ||
221 | .Dv NULL | ||
222 | if | ||
223 | .Fa ssl | ||
224 | is | ||
225 | .Dv NULL , | ||
226 | if no ciphers are available, or if | ||
227 | .Fa priority | ||
228 | is greater than or equal to the number of available ciphers. | ||
229 | .Sh SEE ALSO | ||
230 | .Xr ssl 3 , | ||
231 | .Xr SSL_CIPHER_get_name 3 , | ||
232 | .Xr SSL_CTX_set_cipher_list 3 | ||
233 | .Sh HISTORY | ||
234 | .Fn SSL_get_cipher_list | ||
235 | first appeared in SSLeay 0.5.2. | ||
236 | .Fn SSL_get_ciphers | ||
237 | first appeared in SSLeay 0.8.0. | ||
238 | Both functions have been available since | ||
239 | .Ox 2.4 . | ||
240 | .Pp | ||
241 | .Fn SSL_CTX_get_ciphers | ||
242 | first appeared in OpenSSL 1.1.0 and has been available since | ||
243 | .Ox 6.3 . | ||
244 | .Pp | ||
245 | .Fn SSL_get1_supported_ciphers | ||
246 | and | ||
247 | .Fn SSL_get_client_ciphers | ||
248 | first appeared in OpenSSL 1.1.0 and has been available since | ||
249 | .Ox 6.5 . | ||
diff --git a/src/lib/libssl/man/SSL_get_client_CA_list.3 b/src/lib/libssl/man/SSL_get_client_CA_list.3 deleted file mode 100644 index e80e5cb6f5..0000000000 --- a/src/lib/libssl/man/SSL_get_client_CA_list.3 +++ /dev/null | |||
@@ -1,96 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_get_client_CA_list.3,v 1.5 2018/03/27 17:35:50 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2000, 2001, 2002, 2005 The OpenSSL Project. | ||
6 | .\" All rights reserved. | ||
7 | .\" | ||
8 | .\" Redistribution and use in source and binary forms, with or without | ||
9 | .\" modification, are permitted provided that the following conditions | ||
10 | .\" are met: | ||
11 | .\" | ||
12 | .\" 1. Redistributions of source code must retain the above copyright | ||
13 | .\" notice, this list of conditions and the following disclaimer. | ||
14 | .\" | ||
15 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
16 | .\" notice, this list of conditions and the following disclaimer in | ||
17 | .\" the documentation and/or other materials provided with the | ||
18 | .\" distribution. | ||
19 | .\" | ||
20 | .\" 3. All advertising materials mentioning features or use of this | ||
21 | .\" software must display the following acknowledgment: | ||
22 | .\" "This product includes software developed by the OpenSSL Project | ||
23 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
24 | .\" | ||
25 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | .\" endorse or promote products derived from this software without | ||
27 | .\" prior written permission. For written permission, please contact | ||
28 | .\" openssl-core@openssl.org. | ||
29 | .\" | ||
30 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
31 | .\" nor may "OpenSSL" appear in their names without prior written | ||
32 | .\" permission of the OpenSSL Project. | ||
33 | .\" | ||
34 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
35 | .\" acknowledgment: | ||
36 | .\" "This product includes software developed by the OpenSSL Project | ||
37 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
38 | .\" | ||
39 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | .\" | ||
52 | .Dd $Mdocdate: March 27 2018 $ | ||
53 | .Dt SSL_GET_CLIENT_CA_LIST 3 | ||
54 | .Os | ||
55 | .Sh NAME | ||
56 | .Nm SSL_get_client_CA_list , | ||
57 | .Nm SSL_CTX_get_client_CA_list | ||
58 | .Nd get list of client CAs | ||
59 | .Sh SYNOPSIS | ||
60 | .In openssl/ssl.h | ||
61 | .Ft STACK_OF(X509_NAME) * | ||
62 | .Fn SSL_get_client_CA_list "const SSL *s" | ||
63 | .Ft STACK_OF(X509_NAME) * | ||
64 | .Fn SSL_CTX_get_client_CA_list "const SSL_CTX *ctx" | ||
65 | .Sh DESCRIPTION | ||
66 | .Fn SSL_CTX_get_client_CA_list | ||
67 | returns the list of client CAs explicitly set for | ||
68 | .Fa ctx | ||
69 | using | ||
70 | .Xr SSL_CTX_set_client_CA_list 3 . | ||
71 | .Pp | ||
72 | .Fn SSL_get_client_CA_list | ||
73 | returns the list of client CAs explicitly set for | ||
74 | .Fa ssl | ||
75 | using | ||
76 | .Fn SSL_set_client_CA_list | ||
77 | or | ||
78 | .Fa ssl Ns 's | ||
79 | .Vt SSL_CTX | ||
80 | object with | ||
81 | .Xr SSL_CTX_set_client_CA_list 3 , | ||
82 | when in server mode. | ||
83 | In client mode, | ||
84 | .Fn SSL_get_client_CA_list | ||
85 | returns the list of client CAs sent from the server, if any. | ||
86 | .Sh SEE ALSO | ||
87 | .Xr ssl 3 , | ||
88 | .Xr SSL_CTX_set_client_CA_list 3 , | ||
89 | .Xr SSL_CTX_set_client_cert_cb 3 , | ||
90 | .Xr X509_NAME_new 3 | ||
91 | .Sh HISTORY | ||
92 | .Fn SSL_get_client_CA_list | ||
93 | and | ||
94 | .Fn SSL_CTX_get_client_CA_list | ||
95 | first appeared in SSLeay 0.8.0 and have been available since | ||
96 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_get_client_random.3 b/src/lib/libssl/man/SSL_get_client_random.3 deleted file mode 100644 index eda74db355..0000000000 --- a/src/lib/libssl/man/SSL_get_client_random.3 +++ /dev/null | |||
@@ -1,150 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_get_client_random.3,v 1.2 2018/03/24 00:55:37 schwarze Exp $ | ||
2 | .\" full merge up to: OpenSSL e9b77246 Jan 20 19:58:49 2017 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Nick Mathewson <nickm@torproject.org> | ||
5 | .\" Copyright (c) 2015 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 24 2018 $ | ||
52 | .Dt SSL_GET_CLIENT_RANDOM 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_get_client_random , | ||
56 | .Nm SSL_get_server_random , | ||
57 | .Nm SSL_SESSION_get_master_key | ||
58 | .Nd get internal TLS handshake random values and master key | ||
59 | .Sh SYNOPSIS | ||
60 | .In openssl/ssl.h | ||
61 | .Ft size_t | ||
62 | .Fo SSL_get_client_random | ||
63 | .Fa "const SSL *ssl" | ||
64 | .Fa "unsigned char *out" | ||
65 | .Fa "size_t outlen" | ||
66 | .Fc | ||
67 | .Ft size_t | ||
68 | .Fo SSL_get_server_random | ||
69 | .Fa "const SSL *ssl" | ||
70 | .Fa "unsigned char *out" | ||
71 | .Fa "size_t outlen" | ||
72 | .Fc | ||
73 | .Ft size_t | ||
74 | .Fo SSL_SESSION_get_master_key | ||
75 | .Fa "const SSL_SESSION *session" | ||
76 | .Fa "unsigned char *out" | ||
77 | .Fa "size_t outlen" | ||
78 | .Fc | ||
79 | .Sh DESCRIPTION | ||
80 | .Fn SSL_get_client_random | ||
81 | extracts the random value that was sent from the client to the server | ||
82 | during the initial TLS handshake. | ||
83 | It copies at most | ||
84 | .Fa outlen | ||
85 | bytes of this value into the buffer | ||
86 | .Fa out . | ||
87 | If | ||
88 | .Fa outlen | ||
89 | is zero, nothing is copied. | ||
90 | .Pp | ||
91 | .Fn SSL_get_server_random | ||
92 | behaves the same, but extracts the random value that was sent | ||
93 | from the server to the client during the initial TLS handshake. | ||
94 | .Pp | ||
95 | .Fn SSL_SESSION_get_master_key | ||
96 | behaves the same, but extracts the master secret used to guarantee the | ||
97 | security of the TLS session. | ||
98 | The security of the TLS session depends on keeping the master key | ||
99 | secret: do not expose it, or any information about it, to anybody. | ||
100 | To calculate another secret value that depends on the master secret, | ||
101 | use | ||
102 | .Xr SSL_export_keying_material 3 | ||
103 | instead. | ||
104 | .Pp | ||
105 | All these functions expose internal values from the TLS handshake, | ||
106 | for use in low-level protocols. | ||
107 | Avoid using them unless implementing a feature | ||
108 | that requires access to the internal protocol details. | ||
109 | .Pp | ||
110 | Despite the names of | ||
111 | .Fn SSL_get_client_random | ||
112 | and | ||
113 | .Fn SSL_get_server_random , | ||
114 | they are not random number generators. | ||
115 | Instead, they return the mostly-random values that were already | ||
116 | generated and used in the TLS protocol. | ||
117 | .Pp | ||
118 | In current versions of the TLS protocols, | ||
119 | the length of client_random and server_random is always | ||
120 | .Dv SSL3_RANDOM_SIZE | ||
121 | bytes. | ||
122 | Support for other | ||
123 | .Fa outlen | ||
124 | arguments is provided for the unlikely event that a future | ||
125 | version or variant of TLS uses some other length. | ||
126 | .Pp | ||
127 | Finally, though the client_random and server_random values are called | ||
128 | .Dq random , | ||
129 | many TLS implementations generate four bytes of those values | ||
130 | based on their view of the current time. | ||
131 | .Sh RETURN VALUES | ||
132 | If | ||
133 | .Fa outlen | ||
134 | is greater than 0, these functions return the number of bytes | ||
135 | actually copied, which is less than or equal to | ||
136 | .Fa outlen . | ||
137 | If | ||
138 | .Fa outlen | ||
139 | is 0, these functions return the maximum number of bytes they would | ||
140 | copy \(em that is, the length of the underlying field. | ||
141 | .Sh SEE ALSO | ||
142 | .Xr ssl 3 , | ||
143 | .Xr SSL_export_keying_material 3 , | ||
144 | .Xr SSL_SESSION_get_id 3 , | ||
145 | .Xr SSL_SESSION_get_time 3 , | ||
146 | .Xr SSL_SESSION_new 3 | ||
147 | .Sh HISTORY | ||
148 | These functions first appeared in OpenSSL 1.1.0 | ||
149 | and have been available since | ||
150 | .Ox 6.3 . | ||
diff --git a/src/lib/libssl/man/SSL_get_current_cipher.3 b/src/lib/libssl/man/SSL_get_current_cipher.3 deleted file mode 100644 index 6b951d03ca..0000000000 --- a/src/lib/libssl/man/SSL_get_current_cipher.3 +++ /dev/null | |||
@@ -1,122 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_get_current_cipher.3,v 1.4 2018/03/27 17:35:50 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2000, 2005, 2016 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 27 2018 $ | ||
52 | .Dt SSL_GET_CURRENT_CIPHER 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_get_current_cipher , | ||
56 | .Nm SSL_get_cipher , | ||
57 | .Nm SSL_get_cipher_name , | ||
58 | .Nm SSL_get_cipher_bits , | ||
59 | .Nm SSL_get_cipher_version | ||
60 | .Nd get SSL_CIPHER of a connection | ||
61 | .Sh SYNOPSIS | ||
62 | .In openssl/ssl.h | ||
63 | .Ft const SSL_CIPHER * | ||
64 | .Fn SSL_get_current_cipher "const SSL *ssl" | ||
65 | .Ft const char * | ||
66 | .Fn SSL_get_cipher "const SSL *ssl" | ||
67 | .Ft const char * | ||
68 | .Fn SSL_get_cipher_name "const SSL *ssl" | ||
69 | .Ft int | ||
70 | .Fn SSL_get_cipher_bits "const SSL *ssl" "int *np" | ||
71 | .Ft char * | ||
72 | .Fn SSL_get_cipher_version "const SSL *ssl" | ||
73 | .Sh DESCRIPTION | ||
74 | .Fn SSL_get_current_cipher | ||
75 | returns a pointer to an | ||
76 | .Vt SSL_CIPHER | ||
77 | object containing the description of the actually used cipher of a connection | ||
78 | established with the | ||
79 | .Fa ssl | ||
80 | object. | ||
81 | See | ||
82 | .Xr SSL_CIPHER_get_name 3 | ||
83 | for more details. | ||
84 | .Pp | ||
85 | .Fn SSL_get_cipher_name | ||
86 | obtains the name of the currently used cipher. | ||
87 | .Fn SSL_get_cipher | ||
88 | is identical to | ||
89 | .Fn SSL_get_cipher_name . | ||
90 | .Pp | ||
91 | .Fn SSL_get_cipher_bits | ||
92 | obtains the number of secret/algorithm bits used and | ||
93 | .Fn SSL_get_cipher_version | ||
94 | returns the protocol name. | ||
95 | .Pp | ||
96 | .Fn SSL_get_cipher , | ||
97 | .Fn SSL_get_cipher_name , | ||
98 | .Fn SSL_get_cipher_bits , | ||
99 | and | ||
100 | .Fn SSL_get_cipher_version | ||
101 | are implemented as macros. | ||
102 | .Sh RETURN VALUES | ||
103 | .Fn SSL_get_current_cipher | ||
104 | returns the cipher actually used, or | ||
105 | .Dv NULL | ||
106 | if no session has been established. | ||
107 | .Sh SEE ALSO | ||
108 | .Xr ssl 3 , | ||
109 | .Xr SSL_CIPHER_get_name 3 | ||
110 | .Sh HISTORY | ||
111 | .Fn SSL_get_cipher | ||
112 | appeared in SSLeay 0.4 or earlier. | ||
113 | .Fn SSL_get_cipher_bits | ||
114 | first appeared in SSLeay 0.6.4. | ||
115 | .Fn SSL_get_cipher_name | ||
116 | and | ||
117 | .Fn SSL_get_cipher_version | ||
118 | first appeared in SSLeay 0.8.0. | ||
119 | .Fn SSL_get_current_cipher | ||
120 | first appeared in SSLeay 0.8.1. | ||
121 | These functions have been available since | ||
122 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_get_default_timeout.3 b/src/lib/libssl/man/SSL_get_default_timeout.3 deleted file mode 100644 index 47737d8ee0..0000000000 --- a/src/lib/libssl/man/SSL_get_default_timeout.3 +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_get_default_timeout.3,v 1.4 2018/03/27 17:35:50 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001, 2005 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 27 2018 $ | ||
52 | .Dt SSL_GET_DEFAULT_TIMEOUT 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_get_default_timeout | ||
56 | .Nd get default session timeout value | ||
57 | .Sh SYNOPSIS | ||
58 | .In openssl/ssl.h | ||
59 | .Ft long | ||
60 | .Fn SSL_get_default_timeout "const SSL *ssl" | ||
61 | .Sh DESCRIPTION | ||
62 | .Fn SSL_get_default_timeout | ||
63 | returns the default timeout value assigned to | ||
64 | .Vt SSL_SESSION | ||
65 | objects negotiated for the protocol valid for | ||
66 | .Fa ssl . | ||
67 | .Pp | ||
68 | Whenever a new session is negotiated, it is assigned a timeout value, | ||
69 | after which it will not be accepted for session reuse. | ||
70 | If the timeout value was not explicitly set using | ||
71 | .Xr SSL_CTX_set_timeout 3 , | ||
72 | the hardcoded default timeout for the protocol will be used. | ||
73 | .Pp | ||
74 | .Fn SSL_get_default_timeout | ||
75 | return this hardcoded value, which is 300 seconds for all currently supported | ||
76 | protocols (SSLv2, SSLv3, and TLSv1). | ||
77 | .Sh SEE ALSO | ||
78 | .Xr ssl 3 , | ||
79 | .Xr SSL_CTX_flush_sessions 3 , | ||
80 | .Xr SSL_CTX_set_session_cache_mode 3 , | ||
81 | .Xr SSL_SESSION_get_time 3 | ||
82 | .Sh HISTORY | ||
83 | .Fn SSL_get_default_timeout | ||
84 | first appeared in SSLeay 0.8.0 and has been available since | ||
85 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_get_error.3 b/src/lib/libssl/man/SSL_get_error.3 deleted file mode 100644 index 5d325b3f56..0000000000 --- a/src/lib/libssl/man/SSL_get_error.3 +++ /dev/null | |||
@@ -1,217 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_get_error.3,v 1.5 2018/04/29 07:37:01 guenther Exp $ | ||
2 | .\" OpenSSL a528d4f0 Oct 27 13:40:11 2015 -0400 | ||
3 | .\" | ||
4 | .\" This file was written by Bodo Moeller <bodo@openssl.org>. | ||
5 | .\" Copyright (c) 2000, 2001, 2002, 2005 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: April 29 2018 $ | ||
52 | .Dt SSL_GET_ERROR 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_get_error | ||
56 | .Nd obtain result code for TLS/SSL I/O operation | ||
57 | .Sh SYNOPSIS | ||
58 | .In openssl/ssl.h | ||
59 | .Ft int | ||
60 | .Fn SSL_get_error "const SSL *ssl" "int ret" | ||
61 | .Sh DESCRIPTION | ||
62 | .Fn SSL_get_error | ||
63 | returns a result code (suitable for the C | ||
64 | .Dq switch | ||
65 | statement) for a preceding call to | ||
66 | .Xr SSL_connect 3 , | ||
67 | .Xr SSL_accept 3 , | ||
68 | .Xr SSL_do_handshake 3 , | ||
69 | .Xr SSL_read 3 , | ||
70 | .Xr SSL_peek 3 , | ||
71 | or | ||
72 | .Xr SSL_write 3 | ||
73 | on | ||
74 | .Fa ssl . | ||
75 | The value returned by that TLS/SSL I/O function must be passed to | ||
76 | .Fn SSL_get_error | ||
77 | in parameter | ||
78 | .Fa ret . | ||
79 | .Pp | ||
80 | In addition to | ||
81 | .Fa ssl | ||
82 | and | ||
83 | .Fa ret , | ||
84 | .Fn SSL_get_error | ||
85 | inspects the current thread's OpenSSL error queue. | ||
86 | Thus, | ||
87 | .Fn SSL_get_error | ||
88 | must be used in the same thread that performed the TLS/SSL I/O operation, | ||
89 | and no other OpenSSL function calls should appear in between. | ||
90 | The current thread's error queue must be empty before the TLS/SSL I/O operation | ||
91 | is attempted, or | ||
92 | .Fn SSL_get_error | ||
93 | will not work reliably. | ||
94 | .Sh RETURN VALUES | ||
95 | The following return values can currently occur: | ||
96 | .Bl -tag -width Ds | ||
97 | .It Dv SSL_ERROR_NONE | ||
98 | The TLS/SSL I/O operation completed. | ||
99 | This result code is returned if and only if | ||
100 | .Fa ret | ||
101 | > 0. | ||
102 | .It Dv SSL_ERROR_ZERO_RETURN | ||
103 | The TLS/SSL connection has been closed. | ||
104 | If the protocol version is SSL 3.0 or TLS 1.0, this result code is returned | ||
105 | only if a closure alert has occurred in the protocol, i.e., if the connection | ||
106 | has been closed cleanly. | ||
107 | Note that in this case | ||
108 | .Dv SSL_ERROR_ZERO_RETURN | ||
109 | does not necessarily indicate that the underlying transport has been closed. | ||
110 | .It Dv SSL_ERROR_WANT_READ , Dv SSL_ERROR_WANT_WRITE | ||
111 | The operation did not complete; | ||
112 | the same TLS/SSL I/O function should be called again later. | ||
113 | If, by then, the underlying | ||
114 | .Vt BIO | ||
115 | has data available for reading (if the result code is | ||
116 | .Dv SSL_ERROR_WANT_READ ) | ||
117 | or allows writing data | ||
118 | .Pq Dv SSL_ERROR_WANT_WRITE , | ||
119 | then some TLS/SSL protocol progress will take place, | ||
120 | i.e., at least part of a TLS/SSL record will be read or written. | ||
121 | Note that the retry may again lead to a | ||
122 | .Dv SSL_ERROR_WANT_READ | ||
123 | or | ||
124 | .Dv SSL_ERROR_WANT_WRITE | ||
125 | condition. | ||
126 | There is no fixed upper limit for the number of iterations that may be | ||
127 | necessary until progress becomes visible at application protocol level. | ||
128 | .Pp | ||
129 | For socket | ||
130 | .Fa BIO Ns | ||
131 | s (e.g., when | ||
132 | .Fn SSL_set_fd | ||
133 | was used), | ||
134 | .Xr select 2 | ||
135 | or | ||
136 | .Xr poll 2 | ||
137 | on the underlying socket can be used to find out when the TLS/SSL I/O function | ||
138 | should be retried. | ||
139 | .Pp | ||
140 | Caveat: Any TLS/SSL I/O function can lead to either of | ||
141 | .Dv SSL_ERROR_WANT_READ | ||
142 | and | ||
143 | .Dv SSL_ERROR_WANT_WRITE . | ||
144 | In particular, | ||
145 | .Xr SSL_read 3 | ||
146 | or | ||
147 | .Xr SSL_peek 3 | ||
148 | may want to write data and | ||
149 | .Xr SSL_write 3 | ||
150 | may want | ||
151 | to read data. | ||
152 | This is mainly because TLS/SSL handshakes may occur at any time during the | ||
153 | protocol (initiated by either the client or the server); | ||
154 | .Xr SSL_read 3 , | ||
155 | .Xr SSL_peek 3 , | ||
156 | and | ||
157 | .Xr SSL_write 3 | ||
158 | will handle any pending handshakes. | ||
159 | .It Dv SSL_ERROR_WANT_CONNECT , Dv SSL_ERROR_WANT_ACCEPT | ||
160 | The operation did not complete; the same TLS/SSL I/O function should be | ||
161 | called again later. | ||
162 | The underlying BIO was not connected yet to the peer and the call would block | ||
163 | in | ||
164 | .Xr connect 2 Ns / Ns | ||
165 | .Xr accept 2 . | ||
166 | The SSL function should be | ||
167 | called again when the connection is established. | ||
168 | These messages can only appear with a | ||
169 | .Xr BIO_s_connect 3 | ||
170 | or | ||
171 | .Xr BIO_s_accept 3 | ||
172 | .Vt BIO , | ||
173 | respectively. | ||
174 | In order to find out when the connection has been successfully established, | ||
175 | on many platforms | ||
176 | .Xr select 2 | ||
177 | or | ||
178 | .Xr poll 2 | ||
179 | for writing on the socket file descriptor can be used. | ||
180 | .It Dv SSL_ERROR_WANT_X509_LOOKUP | ||
181 | The operation did not complete because an application callback set by | ||
182 | .Xr SSL_CTX_set_client_cert_cb 3 | ||
183 | has asked to be called again. | ||
184 | The TLS/SSL I/O function should be called again later. | ||
185 | Details depend on the application. | ||
186 | .It Dv SSL_ERROR_SYSCALL | ||
187 | Some I/O error occurred. | ||
188 | The OpenSSL error queue may contain more information on the error. | ||
189 | If the error queue is empty (i.e., | ||
190 | .Fn ERR_get_error | ||
191 | returns 0), | ||
192 | .Fa ret | ||
193 | can be used to find out more about the error: | ||
194 | If | ||
195 | .Fa ret | ||
196 | == 0, an | ||
197 | .Dv EOF | ||
198 | was observed that violates the protocol. | ||
199 | If | ||
200 | .Fa ret | ||
201 | == \(mi1, the underlying | ||
202 | .Vt BIO | ||
203 | reported an | ||
204 | I/O error (for socket I/O on Unix systems, consult | ||
205 | .Dv errno | ||
206 | for details). | ||
207 | .It Dv SSL_ERROR_SSL | ||
208 | A failure in the SSL library occurred, usually a protocol error. | ||
209 | The OpenSSL error queue contains more information on the error. | ||
210 | .El | ||
211 | .Sh SEE ALSO | ||
212 | .Xr err 3 , | ||
213 | .Xr ssl 3 | ||
214 | .Sh HISTORY | ||
215 | .Fn SSL_get_error | ||
216 | first appeared in SSLeay 0.8.0 and have been available since | ||
217 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 b/src/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 deleted file mode 100644 index a249cda6ac..0000000000 --- a/src/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 +++ /dev/null | |||
@@ -1,116 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_get_ex_data_X509_STORE_CTX_idx.3,v 1.5 2022/02/06 00:29:02 jsg Exp $ | ||
2 | .\" OpenSSL 9b86974e Aug 17 15:21:33 2015 -0400 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: February 6 2022 $ | ||
52 | .Dt SSL_GET_EX_DATA_X509_STORE_CTX_IDX 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_get_ex_data_X509_STORE_CTX_idx | ||
56 | .Nd get ex_data index to access SSL structure from X509_STORE_CTX | ||
57 | .Sh SYNOPSIS | ||
58 | .In openssl/ssl.h | ||
59 | .Ft int | ||
60 | .Fn SSL_get_ex_data_X509_STORE_CTX_idx void | ||
61 | .Sh DESCRIPTION | ||
62 | .Fn SSL_get_ex_data_X509_STORE_CTX_idx | ||
63 | returns the index number under which the pointer to the | ||
64 | .Vt SSL | ||
65 | object is stored into the | ||
66 | .Vt X509_STORE_CTX | ||
67 | object. | ||
68 | .Pp | ||
69 | Whenever a | ||
70 | .Vt X509_STORE_CTX | ||
71 | object is created for the verification of the peer's certificate during a | ||
72 | handshake, a pointer to the | ||
73 | .Vt SSL | ||
74 | object is stored into the | ||
75 | .Vt X509_STORE_CTX | ||
76 | object to identify the connection affected. | ||
77 | To retrieve this pointer the | ||
78 | .Xr X509_STORE_CTX_get_ex_data 3 | ||
79 | function can be used with the correct index. | ||
80 | This index is globally the same for all | ||
81 | .Vt X509_STORE_CTX | ||
82 | objects and can be retrieved using | ||
83 | .Fn SSL_get_ex_data_X509_STORE_CTX_idx . | ||
84 | The index value is set when | ||
85 | .Fn SSL_get_ex_data_X509_STORE_CTX_idx | ||
86 | is first called either by the application program directly or indirectly during | ||
87 | other SSL setup functions or during the handshake. | ||
88 | .Pp | ||
89 | The value depends on other index values defined for | ||
90 | .Vt X509_STORE_CTX | ||
91 | objects before the SSL index is created. | ||
92 | .Sh RETURN VALUES | ||
93 | .Bl -tag -width Ds | ||
94 | .It \(>=0 | ||
95 | The index value to access the pointer. | ||
96 | .It <0 | ||
97 | An error occurred, check the error stack for a detailed error message. | ||
98 | .El | ||
99 | .Sh EXAMPLES | ||
100 | The index returned from | ||
101 | .Fn SSL_get_ex_data_X509_STORE_CTX_idx | ||
102 | provides access to | ||
103 | .Vt SSL | ||
104 | object for the connection during the | ||
105 | .Fn verify_callback | ||
106 | when checking the peer's certificate. | ||
107 | Check the example in | ||
108 | .Xr SSL_CTX_set_verify 3 . | ||
109 | .Sh SEE ALSO | ||
110 | .Xr CRYPTO_set_ex_data 3 , | ||
111 | .Xr ssl 3 , | ||
112 | .Xr SSL_CTX_set_verify 3 | ||
113 | .Sh HISTORY | ||
114 | .Fn SSL_get_ex_data_X509_STORE_CTX_idx | ||
115 | first appeared in SSLeay 0.9.1 and has been available since | ||
116 | .Ox 2.6 . | ||
diff --git a/src/lib/libssl/man/SSL_get_ex_new_index.3 b/src/lib/libssl/man/SSL_get_ex_new_index.3 deleted file mode 100644 index cecd25fa44..0000000000 --- a/src/lib/libssl/man/SSL_get_ex_new_index.3 +++ /dev/null | |||
@@ -1,136 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_get_ex_new_index.3,v 1.4 2018/03/27 17:35:50 schwarze Exp $ | ||
2 | .\" OpenSSL 9b86974e Aug 17 15:21:33 2015 -0400 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001, 2005 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 27 2018 $ | ||
52 | .Dt SSL_GET_EX_NEW_INDEX 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_get_ex_new_index , | ||
56 | .Nm SSL_set_ex_data , | ||
57 | .Nm SSL_get_ex_data | ||
58 | .Nd internal application specific data functions | ||
59 | .Sh SYNOPSIS | ||
60 | .In openssl/ssl.h | ||
61 | .Ft int | ||
62 | .Fo SSL_get_ex_new_index | ||
63 | .Fa "long argl" | ||
64 | .Fa "void *argp" | ||
65 | .Fa "CRYPTO_EX_new *new_func" | ||
66 | .Fa "CRYPTO_EX_dup *dup_func" | ||
67 | .Fa "CRYPTO_EX_free *free_func" | ||
68 | .Fc | ||
69 | .Ft int | ||
70 | .Fn SSL_set_ex_data "SSL *ssl" "int idx" "void *arg" | ||
71 | .Ft void * | ||
72 | .Fn SSL_get_ex_data "const SSL *ssl" "int idx" | ||
73 | .Bd -literal | ||
74 | typedef int new_func(void *parent, void *ptr, CRYPTO_EX_DATA *ad, | ||
75 | int idx, long argl, void *argp); | ||
76 | typedef void free_func(void *parent, void *ptr, CRYPTO_EX_DATA *ad, | ||
77 | int idx, long argl, void *argp); | ||
78 | typedef int dup_func(CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from, void *from_d, | ||
79 | int idx, long argl, void *argp); | ||
80 | .Ed | ||
81 | .Sh DESCRIPTION | ||
82 | Several OpenSSL structures can have application specific data attached to them. | ||
83 | These functions are used internally by OpenSSL to manipulate application | ||
84 | specific data attached to a specific structure. | ||
85 | .Pp | ||
86 | .Fn SSL_get_ex_new_index | ||
87 | is used to register a new index for application specific data. | ||
88 | .Pp | ||
89 | .Fn SSL_set_ex_data | ||
90 | is used to store application data at | ||
91 | .Fa arg | ||
92 | for | ||
93 | .Fa idx | ||
94 | into the | ||
95 | .Fa ssl | ||
96 | object. | ||
97 | .Pp | ||
98 | .Fn SSL_get_ex_data | ||
99 | is used to retrieve the information for | ||
100 | .Fa idx | ||
101 | from | ||
102 | .Fa ssl . | ||
103 | .Pp | ||
104 | A detailed description for the | ||
105 | .Fn *_get_ex_new_index | ||
106 | functionality can be found in | ||
107 | .Xr RSA_get_ex_new_index 3 . | ||
108 | The | ||
109 | .Fn *_get_ex_data | ||
110 | and | ||
111 | .Fn *_set_ex_data | ||
112 | functionality is described in | ||
113 | .Xr CRYPTO_set_ex_data 3 . | ||
114 | .Sh EXAMPLES | ||
115 | An example of how to use the functionality is included in the example | ||
116 | .Fn verify_callback | ||
117 | in | ||
118 | .Xr SSL_CTX_set_verify 3 . | ||
119 | .Sh SEE ALSO | ||
120 | .Xr CRYPTO_set_ex_data 3 , | ||
121 | .Xr RSA_get_ex_new_index 3 , | ||
122 | .Xr ssl 3 , | ||
123 | .Xr SSL_CTX_set_verify 3 | ||
124 | .Sh HISTORY | ||
125 | Precursor functions | ||
126 | .Fn SSL_set_app_data | ||
127 | and | ||
128 | .Fn SSL_get_app_data | ||
129 | first appeared in SSLeay 0.6.1. | ||
130 | .Pp | ||
131 | .Fn SSL_get_ex_new_index , | ||
132 | .Fn SSL_set_ex_data , | ||
133 | and | ||
134 | .Fn SSL_get_ex_data | ||
135 | first appeared in SSLeay 0.9.0 and have been available since | ||
136 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_get_fd.3 b/src/lib/libssl/man/SSL_get_fd.3 deleted file mode 100644 index 1e093424cb..0000000000 --- a/src/lib/libssl/man/SSL_get_fd.3 +++ /dev/null | |||
@@ -1,103 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_get_fd.3,v 1.6 2018/03/27 17:35:50 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2000, 2005, 2013 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 27 2018 $ | ||
52 | .Dt SSL_GET_FD 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_get_fd , | ||
56 | .Nm SSL_get_rfd , | ||
57 | .Nm SSL_get_wfd | ||
58 | .Nd get file descriptor linked to an SSL object | ||
59 | .Sh SYNOPSIS | ||
60 | .In openssl/ssl.h | ||
61 | .Ft int | ||
62 | .Fn SSL_get_fd "const SSL *ssl" | ||
63 | .Ft int | ||
64 | .Fn SSL_get_rfd "const SSL *ssl" | ||
65 | .Ft int | ||
66 | .Fn SSL_get_wfd "const SSL *ssl" | ||
67 | .Sh DESCRIPTION | ||
68 | .Fn SSL_get_fd | ||
69 | returns the file descriptor which is linked to | ||
70 | .Fa ssl . | ||
71 | .Fn SSL_get_rfd | ||
72 | and | ||
73 | .Fn SSL_get_wfd | ||
74 | return the file descriptors for the read or the write channel, | ||
75 | which can be different. | ||
76 | If the read and the write channel are different, | ||
77 | .Fn SSL_get_fd | ||
78 | will return the file descriptor of the read channel. | ||
79 | .Sh RETURN VALUES | ||
80 | The following return values can occur: | ||
81 | .Bl -tag -width Ds | ||
82 | .It \(mi1 | ||
83 | The operation failed, because the underlying | ||
84 | .Vt BIO | ||
85 | is not of the correct type (suitable for file descriptors). | ||
86 | .It \(>=0 | ||
87 | The file descriptor linked to | ||
88 | .Fa ssl . | ||
89 | .El | ||
90 | .Sh SEE ALSO | ||
91 | .Xr BIO_new 3 , | ||
92 | .Xr ssl 3 , | ||
93 | .Xr SSL_set_fd 3 | ||
94 | .Sh HISTORY | ||
95 | .Fn SSL_get_fd | ||
96 | appeared in SSLeay 0.4 or earlier and has been available since | ||
97 | .Ox 2.4 . | ||
98 | .Pp | ||
99 | .Fn SSL_get_rfd | ||
100 | and | ||
101 | .Fn SSL_get_wfd | ||
102 | first appeared in OpenSSL 0.9.6c and have been available since | ||
103 | .Ox 3.2 . | ||
diff --git a/src/lib/libssl/man/SSL_get_finished.3 b/src/lib/libssl/man/SSL_get_finished.3 deleted file mode 100644 index 3cfb655ea0..0000000000 --- a/src/lib/libssl/man/SSL_get_finished.3 +++ /dev/null | |||
@@ -1,77 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_get_finished.3,v 1.2 2021/01/30 10:48:15 tb Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 2020 Theo Buehler <tb@openbsd.org> | ||
4 | .\" | ||
5 | .\" Permission to use, copy, modify, and distribute this software for any | ||
6 | .\" purpose with or without fee is hereby granted, provided that the above | ||
7 | .\" copyright notice and this permission notice appear in all copies. | ||
8 | .\" | ||
9 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | .\" | ||
17 | .Dd $Mdocdate: January 30 2021 $ | ||
18 | .Dt SSL_GET_FINISHED 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm SSL_get_finished , | ||
22 | .Nm SSL_get_peer_finished | ||
23 | .Nd get last sent or last expected finished message | ||
24 | .Sh SYNOPSIS | ||
25 | .In openssl/ssl.h | ||
26 | .Ft size_t | ||
27 | .Fn SSL_get_finished "const SSL *ssl" "void *buf" "size_t count" | ||
28 | .Ft size_t | ||
29 | .Fn SSL_get_peer_finished "const SSL *ssl" "void *buf" "size_t count" | ||
30 | .Sh DESCRIPTION | ||
31 | .Fn SSL_get_finished | ||
32 | and | ||
33 | .Fn SSL_get_peer_finished | ||
34 | copy | ||
35 | .Fa count | ||
36 | bytes from the last finished message sent to the peer | ||
37 | or expected from the peer into the | ||
38 | caller-provided buffer | ||
39 | .Fa buf . | ||
40 | .Pp | ||
41 | The finished message is computed from a checksum of the handshake records | ||
42 | exchanged with the peer. | ||
43 | Its length depends on the ciphersuite in use and is at most | ||
44 | .Dv EVP_MAX_MD_SIZE , | ||
45 | i.e., 64 bytes. | ||
46 | .\" In TLSv1.3 the length is equal to the length of the hash algorithm | ||
47 | .\" used by the hash-based message authentication code (HMAC), | ||
48 | .\" which is currently either 32 bytes for SHA-256 or 48 bytes for SHA-384. | ||
49 | .\" In TLSv1.2 the length defaults to 12 bytes, but it can explicitly be | ||
50 | .\" specified by the ciphersuite to be longer. | ||
51 | .\" In TLS versions 1.1 and 1.0, the finished message has a fixed length | ||
52 | .\" of 12 bytes. | ||
53 | .Sh RETURN VALUES | ||
54 | .Fn SSL_get_finished | ||
55 | and | ||
56 | .Fn SSL_get_peer_finished | ||
57 | return the number of bytes copied into | ||
58 | .Fa buf . | ||
59 | The return value is zero if the handshake has not reached the | ||
60 | finished message. | ||
61 | .Sh SEE ALSO | ||
62 | .Xr ssl 3 , | ||
63 | .Xr SSL_get_session 3 , | ||
64 | .Xr SSL_set_session 3 | ||
65 | .Sh STANDARDS | ||
66 | RFC 8446: The Transport Layer Security (TLS) Protocol Version 1.3, | ||
67 | section 4.4.4: Finished. | ||
68 | .Pp | ||
69 | RFC 5246: The Transport Layer Security (TLS) Protocol Version 1.2, | ||
70 | section 7.4.9: Finished. | ||
71 | .Sh HISTORY | ||
72 | .Fn SSL_get_finished | ||
73 | and | ||
74 | .Fn SSL_get_peer_finished | ||
75 | first appeared in SSLeay 0.9.5 | ||
76 | and have been available since | ||
77 | .Ox 2.7 . | ||
diff --git a/src/lib/libssl/man/SSL_get_peer_cert_chain.3 b/src/lib/libssl/man/SSL_get_peer_cert_chain.3 deleted file mode 100644 index eb2ae53dc4..0000000000 --- a/src/lib/libssl/man/SSL_get_peer_cert_chain.3 +++ /dev/null | |||
@@ -1,107 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_get_peer_cert_chain.3,v 1.5 2018/03/27 17:35:50 schwarze Exp $ | ||
2 | .\" OpenSSL SSL_get_peer_cert_chain.pod 1f164c6f Jan 18 01:40:36 2017 +0100 | ||
3 | .\" OpenSSL SSL_get_peer_cert_chain.pod 9b86974e Aug 17 15:21:33 2015 -0400 | ||
4 | .\" | ||
5 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
6 | .\" Copyright (c) 2000, 2005, 2014, 2016 The OpenSSL Project. | ||
7 | .\" All rights reserved. | ||
8 | .\" | ||
9 | .\" Redistribution and use in source and binary forms, with or without | ||
10 | .\" modification, are permitted provided that the following conditions | ||
11 | .\" are met: | ||
12 | .\" | ||
13 | .\" 1. Redistributions of source code must retain the above copyright | ||
14 | .\" notice, this list of conditions and the following disclaimer. | ||
15 | .\" | ||
16 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
17 | .\" notice, this list of conditions and the following disclaimer in | ||
18 | .\" the documentation and/or other materials provided with the | ||
19 | .\" distribution. | ||
20 | .\" | ||
21 | .\" 3. All advertising materials mentioning features or use of this | ||
22 | .\" software must display the following acknowledgment: | ||
23 | .\" "This product includes software developed by the OpenSSL Project | ||
24 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
25 | .\" | ||
26 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
27 | .\" endorse or promote products derived from this software without | ||
28 | .\" prior written permission. For written permission, please contact | ||
29 | .\" openssl-core@openssl.org. | ||
30 | .\" | ||
31 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
32 | .\" nor may "OpenSSL" appear in their names without prior written | ||
33 | .\" permission of the OpenSSL Project. | ||
34 | .\" | ||
35 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
36 | .\" acknowledgment: | ||
37 | .\" "This product includes software developed by the OpenSSL Project | ||
38 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
39 | .\" | ||
40 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
41 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
42 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
43 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
44 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
45 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
46 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
47 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
48 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
49 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
50 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
51 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
52 | .\" | ||
53 | .Dd $Mdocdate: March 27 2018 $ | ||
54 | .Dt SSL_GET_PEER_CERT_CHAIN 3 | ||
55 | .Os | ||
56 | .Sh NAME | ||
57 | .Nm SSL_get_peer_cert_chain | ||
58 | .Nd get the X509 certificate chain sent by the peer | ||
59 | .Sh SYNOPSIS | ||
60 | .In openssl/ssl.h | ||
61 | .Ft STACK_OF(X509) * | ||
62 | .Fn SSL_get_peer_cert_chain "const SSL *ssl" | ||
63 | .Sh DESCRIPTION | ||
64 | .Fn SSL_get_peer_cert_chain | ||
65 | returns a pointer to | ||
66 | .Dv STACK_OF Ns Po Vt X509 Pc | ||
67 | certificates forming the certificate chain of the peer. | ||
68 | If called on the client side, the stack also contains the peer's certificate; | ||
69 | if called on the server side, the peer's certificate must be obtained | ||
70 | separately using | ||
71 | .Xr SSL_get_peer_certificate 3 . | ||
72 | If the peer did not present a certificate, | ||
73 | .Dv NULL | ||
74 | is returned. | ||
75 | .Pp | ||
76 | .Fn SSL_get_peer_cert_chain | ||
77 | returns the peer chain as sent by the peer: it only consists of | ||
78 | certificates the peer has sent (in the order the peer has sent them) | ||
79 | and it is not a verified chain. | ||
80 | .Pp | ||
81 | If the session is resumed, peers do not send certificates, so a | ||
82 | .Dv NULL | ||
83 | pointer is returned. | ||
84 | Applications can call | ||
85 | .Fn SSL_session_reused | ||
86 | to determine whether a session is resumed. | ||
87 | .Pp | ||
88 | The reference count of the | ||
89 | .Dv STACK_OF Ns Po Vt X509 Pc | ||
90 | object is not incremented. | ||
91 | If the corresponding session is freed, the pointer must not be used any longer. | ||
92 | .Sh RETURN VALUES | ||
93 | The following return values can occur: | ||
94 | .Bl -tag -width Ds | ||
95 | .It Dv NULL | ||
96 | No certificate was presented by the peer or no connection was established or | ||
97 | the certificate chain is no longer available when a session is reused. | ||
98 | .It Pointer to a Dv STACK_OF Ns Po X509 Pc | ||
99 | The return value points to the certificate chain presented by the peer. | ||
100 | .El | ||
101 | .Sh SEE ALSO | ||
102 | .Xr ssl 3 , | ||
103 | .Xr SSL_get_peer_certificate 3 | ||
104 | .Sh HISTORY | ||
105 | .Fn SSL_get_peer_cert_chain | ||
106 | first appeared in SSLeay 0.8.0 and has been available since | ||
107 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_get_peer_certificate.3 b/src/lib/libssl/man/SSL_get_peer_certificate.3 deleted file mode 100644 index 99f9330288..0000000000 --- a/src/lib/libssl/man/SSL_get_peer_certificate.3 +++ /dev/null | |||
@@ -1,105 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_get_peer_certificate.3,v 1.6 2021/06/26 17:36:28 tb Exp $ | ||
2 | .\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2000, 2001, 2005 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: June 26 2021 $ | ||
52 | .Dt SSL_GET_PEER_CERTIFICATE 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_get_peer_certificate | ||
56 | .Nd get the X509 certificate of the peer | ||
57 | .Sh SYNOPSIS | ||
58 | .In openssl/ssl.h | ||
59 | .Ft X509 * | ||
60 | .Fn SSL_get_peer_certificate "const SSL *ssl" | ||
61 | .Sh DESCRIPTION | ||
62 | .Fn SSL_get_peer_certificate | ||
63 | returns a pointer to the X509 certificate the peer presented. | ||
64 | If the peer did not present a certificate, | ||
65 | .Dv NULL | ||
66 | is returned. | ||
67 | .Pp | ||
68 | Due to the protocol definition, a TLS/SSL server will always send a | ||
69 | certificate, if present. | ||
70 | A client will only send a certificate when explicitly requested to do so by the | ||
71 | server (see | ||
72 | .Xr SSL_CTX_set_verify 3 ) . | ||
73 | If an anonymous cipher is used, no certificates are sent. | ||
74 | .Pp | ||
75 | That a certificate is returned does not indicate information about the | ||
76 | verification state. | ||
77 | Use | ||
78 | .Xr SSL_get_verify_result 3 | ||
79 | to check the verification state. | ||
80 | .Pp | ||
81 | The reference count of the | ||
82 | .Vt X509 | ||
83 | object is incremented by one, so that it will not be destroyed when the session | ||
84 | containing the peer certificate is freed. | ||
85 | The | ||
86 | .Vt X509 | ||
87 | object must be explicitly freed using | ||
88 | .Xr X509_free 3 . | ||
89 | .Sh RETURN VALUES | ||
90 | The following return values can occur: | ||
91 | .Bl -tag -width Ds | ||
92 | .It Dv NULL | ||
93 | No certificate was presented by the peer or no connection was established. | ||
94 | .It Pointer to an X509 certificate | ||
95 | The return value points to the certificate presented by the peer. | ||
96 | .El | ||
97 | .Sh SEE ALSO | ||
98 | .Xr ssl 3 , | ||
99 | .Xr SSL_CTX_set_verify 3 , | ||
100 | .Xr SSL_get0_peername 3 , | ||
101 | .Xr SSL_get_verify_result 3 | ||
102 | .Sh HISTORY | ||
103 | .Fn SSL_get_peer_certificate | ||
104 | appeared in SSLeay 0.4 or earlier and has been available since | ||
105 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_get_rbio.3 b/src/lib/libssl/man/SSL_get_rbio.3 deleted file mode 100644 index 38096fbecf..0000000000 --- a/src/lib/libssl/man/SSL_get_rbio.3 +++ /dev/null | |||
@@ -1,98 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_get_rbio.3,v 1.5 2018/03/27 17:35:50 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2000, 2013 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 27 2018 $ | ||
52 | .Dt SSL_GET_RBIO 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_get_rbio , | ||
56 | .Nm SSL_get_wbio | ||
57 | .Nd get BIO linked to an SSL object | ||
58 | .Sh SYNOPSIS | ||
59 | .In openssl/ssl.h | ||
60 | .Ft BIO * | ||
61 | .Fn SSL_get_rbio "SSL *ssl" | ||
62 | .Ft BIO * | ||
63 | .Fn SSL_get_wbio "SSL *ssl" | ||
64 | .Sh DESCRIPTION | ||
65 | .Fn SSL_get_rbio | ||
66 | and | ||
67 | .Fn SSL_get_wbio | ||
68 | return pointers to the | ||
69 | .Vt BIO Ns s | ||
70 | for the read or the write channel, which can be different. | ||
71 | The reference count of the | ||
72 | .Vt BIO | ||
73 | is not incremented. | ||
74 | .Sh RETURN VALUES | ||
75 | The following return values can occur: | ||
76 | .Bl -tag -width Ds | ||
77 | .It Dv NULL | ||
78 | No | ||
79 | .Vt BIO | ||
80 | was connected to the | ||
81 | .Vt SSL | ||
82 | object. | ||
83 | .It Any other pointer | ||
84 | The | ||
85 | .Vt BIO | ||
86 | linked to | ||
87 | .Fa ssl . | ||
88 | .El | ||
89 | .Sh SEE ALSO | ||
90 | .Xr BIO_new 3 , | ||
91 | .Xr ssl 3 , | ||
92 | .Xr SSL_set_bio 3 | ||
93 | .Sh HISTORY | ||
94 | .Fn SSL_get_rbio | ||
95 | and | ||
96 | .Fn SSL_get_wbio | ||
97 | first appeared in SSLeay 0.6.0 and have been available since | ||
98 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_get_server_tmp_key.3 b/src/lib/libssl/man/SSL_get_server_tmp_key.3 deleted file mode 100644 index aeeb358240..0000000000 --- a/src/lib/libssl/man/SSL_get_server_tmp_key.3 +++ /dev/null | |||
@@ -1,89 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_get_server_tmp_key.3,v 1.4 2019/06/12 09:36:30 schwarze Exp $ | ||
2 | .\" OpenSSL SSL_get_server_tmp_key.pod 508fafd8 Apr 3 15:41:21 2017 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Matt Caswell <matt@openssl.org> | ||
5 | .\" Copyright (c) 2017 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: June 12 2019 $ | ||
52 | .Dt SSL_GET_SERVER_TMP_KEY 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_get_server_tmp_key | ||
56 | .Nd temporary server key during a handshake | ||
57 | .Sh SYNOPSIS | ||
58 | .In openssl/ssl.h | ||
59 | .Ft long | ||
60 | .Fo SSL_get_server_tmp_key | ||
61 | .Fa "SSL *ssl" | ||
62 | .Fa "EVP_PKEY **key" | ||
63 | .Fc | ||
64 | .Sh DESCRIPTION | ||
65 | .Fn SSL_get_server_tmp_key | ||
66 | retrieves the temporary key provided by the server | ||
67 | and used during key exchange. | ||
68 | For example, if ECDHE is in use, | ||
69 | this represents the server's public ECDHE key. | ||
70 | .Pp | ||
71 | In case of success, a copy of the key is stored in | ||
72 | .Pf * Fa key . | ||
73 | It is the caller's responsibility to free this key after use using | ||
74 | .Xr EVP_PKEY_free 3 . | ||
75 | .Pp | ||
76 | This function may only be called by the client. | ||
77 | .Pp | ||
78 | This function is implemented as a macro. | ||
79 | .Sh RETURN VALUES | ||
80 | .Fn SSL_get_server_tmp_key | ||
81 | returns 1 on success or 0 on failure. | ||
82 | .Sh SEE ALSO | ||
83 | .Xr EVP_PKEY_free 3 , | ||
84 | .Xr ssl 3 , | ||
85 | .Xr SSL_ctrl 3 | ||
86 | .Sh HISTORY | ||
87 | .Fn SSL_get_server_tmp_key | ||
88 | first appeared in OpenSSL 1.0.2 and has been available since | ||
89 | .Ox 6.1 . | ||
diff --git a/src/lib/libssl/man/SSL_get_session.3 b/src/lib/libssl/man/SSL_get_session.3 deleted file mode 100644 index 2ab43fdd3e..0000000000 --- a/src/lib/libssl/man/SSL_get_session.3 +++ /dev/null | |||
@@ -1,163 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_get_session.3,v 1.8 2022/03/31 17:27:18 naddy Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2000, 2001, 2005, 2013, 2016 The OpenSSL Project. | ||
6 | .\" All rights reserved. | ||
7 | .\" | ||
8 | .\" Redistribution and use in source and binary forms, with or without | ||
9 | .\" modification, are permitted provided that the following conditions | ||
10 | .\" are met: | ||
11 | .\" | ||
12 | .\" 1. Redistributions of source code must retain the above copyright | ||
13 | .\" notice, this list of conditions and the following disclaimer. | ||
14 | .\" | ||
15 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
16 | .\" notice, this list of conditions and the following disclaimer in | ||
17 | .\" the documentation and/or other materials provided with the | ||
18 | .\" distribution. | ||
19 | .\" | ||
20 | .\" 3. All advertising materials mentioning features or use of this | ||
21 | .\" software must display the following acknowledgment: | ||
22 | .\" "This product includes software developed by the OpenSSL Project | ||
23 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
24 | .\" | ||
25 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | .\" endorse or promote products derived from this software without | ||
27 | .\" prior written permission. For written permission, please contact | ||
28 | .\" openssl-core@openssl.org. | ||
29 | .\" | ||
30 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
31 | .\" nor may "OpenSSL" appear in their names without prior written | ||
32 | .\" permission of the OpenSSL Project. | ||
33 | .\" | ||
34 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
35 | .\" acknowledgment: | ||
36 | .\" "This product includes software developed by the OpenSSL Project | ||
37 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
38 | .\" | ||
39 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | .\" | ||
52 | .Dd $Mdocdate: March 31 2022 $ | ||
53 | .Dt SSL_GET_SESSION 3 | ||
54 | .Os | ||
55 | .Sh NAME | ||
56 | .Nm SSL_get_session , | ||
57 | .Nm SSL_get0_session , | ||
58 | .Nm SSL_get1_session | ||
59 | .Nd retrieve TLS/SSL session data | ||
60 | .Sh SYNOPSIS | ||
61 | .In openssl/ssl.h | ||
62 | .Ft SSL_SESSION * | ||
63 | .Fn SSL_get_session "const SSL *ssl" | ||
64 | .Ft SSL_SESSION * | ||
65 | .Fn SSL_get0_session "const SSL *ssl" | ||
66 | .Ft SSL_SESSION * | ||
67 | .Fn SSL_get1_session "SSL *ssl" | ||
68 | .Sh DESCRIPTION | ||
69 | .Fn SSL_get_session | ||
70 | returns a pointer to the | ||
71 | .Vt SSL_SESSION | ||
72 | actually used in | ||
73 | .Fa ssl . | ||
74 | The reference count of the | ||
75 | .Vt SSL_SESSION | ||
76 | is not incremented, so that the pointer can become invalid by other operations. | ||
77 | .Pp | ||
78 | .Fn SSL_get0_session | ||
79 | is the same as | ||
80 | .Fn SSL_get_session . | ||
81 | .Pp | ||
82 | .Fn SSL_get1_session | ||
83 | is the same as | ||
84 | .Fn SSL_get_session , | ||
85 | but the reference count of the | ||
86 | .Vt SSL_SESSION | ||
87 | is incremented by one. | ||
88 | .Pp | ||
89 | The | ||
90 | .Fa ssl | ||
91 | session contains all information required to re-establish the connection | ||
92 | without a new handshake. | ||
93 | .Pp | ||
94 | .Fn SSL_get0_session | ||
95 | returns a pointer to the actual session. | ||
96 | As the reference counter is not incremented, | ||
97 | the pointer is only valid while the connection is in use. | ||
98 | If | ||
99 | .Xr SSL_clear 3 | ||
100 | or | ||
101 | .Xr SSL_free 3 | ||
102 | is called, the session may be removed completely (if considered bad), | ||
103 | and the pointer obtained will become invalid. | ||
104 | Even if the session is valid, | ||
105 | it can be removed at any time due to timeout during | ||
106 | .Xr SSL_CTX_flush_sessions 3 . | ||
107 | .Pp | ||
108 | If the data is to be kept, | ||
109 | .Fn SSL_get1_session | ||
110 | will increment the reference count, so that the session will not be implicitly | ||
111 | removed by other operations but stays in memory. | ||
112 | In order to remove the session, | ||
113 | .Xr SSL_SESSION_free 3 | ||
114 | must be explicitly called once to decrement the reference count again. | ||
115 | .Pp | ||
116 | .Vt SSL_SESSION | ||
117 | objects keep internal link information about the session cache list when being | ||
118 | inserted into one | ||
119 | .Vt SSL_CTX | ||
120 | object's session cache. | ||
121 | One | ||
122 | .Vt SSL_SESSION | ||
123 | object, regardless of its reference count, must therefore only be used with one | ||
124 | .Vt SSL_CTX | ||
125 | object (and the | ||
126 | .Vt SSL | ||
127 | objects created from this | ||
128 | .Vt SSL_CTX | ||
129 | object). | ||
130 | .Sh RETURN VALUES | ||
131 | The following return values can occur: | ||
132 | .Bl -tag -width Ds | ||
133 | .It Dv NULL | ||
134 | There is no session available in | ||
135 | .Fa ssl . | ||
136 | .It Pointer to an Vt SSL_SESSION | ||
137 | The return value points to the data of an | ||
138 | .Vt SSL | ||
139 | session. | ||
140 | .El | ||
141 | .Sh SEE ALSO | ||
142 | .Xr ssl 3 , | ||
143 | .Xr SSL_clear 3 , | ||
144 | .Xr SSL_free 3 , | ||
145 | .Xr SSL_SESSION_free 3 , | ||
146 | .Xr SSL_SESSION_get0_peer 3 , | ||
147 | .Xr SSL_SESSION_get_compress_id 3 , | ||
148 | .Xr SSL_SESSION_get_id 3 , | ||
149 | .Xr SSL_SESSION_get_protocol_version 3 , | ||
150 | .Xr SSL_SESSION_get_time 3 , | ||
151 | .Xr SSL_SESSION_new 3 , | ||
152 | .Xr SSL_SESSION_print 3 , | ||
153 | .Xr SSL_set_session 3 | ||
154 | .Sh HISTORY | ||
155 | .Fn SSL_get_session | ||
156 | first appeared in SSLeay 0.5.2 and has been available since | ||
157 | .Ox 2.4 . | ||
158 | .Pp | ||
159 | .Fn SSL_get0_session | ||
160 | and | ||
161 | .Fn SSL_get1_session | ||
162 | first appeared in OpenSSL 0.9.5 and have been available since | ||
163 | .Ox 2.7 . | ||
diff --git a/src/lib/libssl/man/SSL_get_shared_ciphers.3 b/src/lib/libssl/man/SSL_get_shared_ciphers.3 deleted file mode 100644 index 207e8c42eb..0000000000 --- a/src/lib/libssl/man/SSL_get_shared_ciphers.3 +++ /dev/null | |||
@@ -1,103 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_get_shared_ciphers.3,v 1.5 2021/01/09 10:50:02 tb Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> | ||
4 | .\" | ||
5 | .\" Permission to use, copy, modify, and distribute this software for any | ||
6 | .\" purpose with or without fee is hereby granted, provided that the above | ||
7 | .\" copyright notice and this permission notice appear in all copies. | ||
8 | .\" | ||
9 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | .\" | ||
17 | .Dd $Mdocdate: January 9 2021 $ | ||
18 | .Dt SSL_GET_SHARED_CIPHERS 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm SSL_get_shared_ciphers | ||
22 | .Nd ciphers supported by both client and server | ||
23 | .Sh SYNOPSIS | ||
24 | .In openssl/ssl.h | ||
25 | .Ft char * | ||
26 | .Fo SSL_get_shared_ciphers | ||
27 | .Fa "const SSL *ssl" | ||
28 | .Fa "char *buf" | ||
29 | .Fa "int len" | ||
30 | .Fc | ||
31 | .Sh DESCRIPTION | ||
32 | If | ||
33 | .Fa ssl | ||
34 | contains a session in server mode, | ||
35 | .Fn SSL_get_shared_ciphers | ||
36 | puts as many names of ciphers that are supported by both the client | ||
37 | and the server into the buffer | ||
38 | .Fa buf | ||
39 | as the buffer is long enough to contain. | ||
40 | Names are separated by colons. | ||
41 | At most | ||
42 | .Fa len | ||
43 | bytes are written to | ||
44 | .Fa buf | ||
45 | including the terminating NUL character. | ||
46 | .Sh RETURN VALUES | ||
47 | .Fn SSL_get_shared_ciphers | ||
48 | returns | ||
49 | .Fa buf | ||
50 | on success or | ||
51 | .Dv NULL | ||
52 | on failure. | ||
53 | The following situations cause failure: | ||
54 | .Bl -bullet | ||
55 | .It | ||
56 | .Xr SSL_is_server 3 | ||
57 | is false, i.e., | ||
58 | .Ar ssl | ||
59 | is not set to server mode. | ||
60 | .It | ||
61 | .Xr SSL_get_ciphers 3 | ||
62 | is | ||
63 | .Dv NULL | ||
64 | or empty, i.e., no ciphers are available for use by the server. | ||
65 | .It | ||
66 | .Xr SSL_get_session 3 | ||
67 | is | ||
68 | .Dv NULL , | ||
69 | i.e., | ||
70 | .Ar ssl | ||
71 | contains no session. | ||
72 | .It | ||
73 | .Xr SSL_get_client_ciphers 3 | ||
74 | is | ||
75 | .Dv NULL | ||
76 | or empty, i.e., | ||
77 | .Ar ssl | ||
78 | contains no information about ciphers supported by the client, | ||
79 | or the client does not support any ciphers. | ||
80 | .It | ||
81 | The | ||
82 | .Fa len | ||
83 | argument is less than 2. | ||
84 | .El | ||
85 | .Sh SEE ALSO | ||
86 | .Xr ssl 3 , | ||
87 | .Xr SSL_get_ciphers 3 | ||
88 | .Sh HISTORY | ||
89 | .Fn SSL_get_shared_ciphers | ||
90 | first appeared in SSLeay 0.4.5b and has been available since | ||
91 | .Ox 2.4 . | ||
92 | .Sh BUGS | ||
93 | If the list is too long to fit into | ||
94 | .Fa len | ||
95 | bytes, it is silently truncated after the last cipher name that fits, | ||
96 | and all following ciphers are skipped. | ||
97 | If the buffer is very short such that even the first cipher name | ||
98 | does not fit, an empty string is returned even when some shared | ||
99 | ciphers are actually available. | ||
100 | .Pp | ||
101 | There is no easy way to find out how much space is required for | ||
102 | .Fa buf | ||
103 | or whether the supplied space was sufficient. | ||
diff --git a/src/lib/libssl/man/SSL_get_state.3 b/src/lib/libssl/man/SSL_get_state.3 deleted file mode 100644 index 297bbce876..0000000000 --- a/src/lib/libssl/man/SSL_get_state.3 +++ /dev/null | |||
@@ -1,161 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_get_state.3,v 1.5 2019/06/12 09:36:30 schwarze Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> | ||
4 | .\" | ||
5 | .\" Permission to use, copy, modify, and distribute this software for any | ||
6 | .\" purpose with or without fee is hereby granted, provided that the above | ||
7 | .\" copyright notice and this permission notice appear in all copies. | ||
8 | .\" | ||
9 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | .\" | ||
17 | .Dd $Mdocdate: June 12 2019 $ | ||
18 | .Dt SSL_GET_STATE 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm SSL_get_state , | ||
22 | .Nm SSL_state , | ||
23 | .Nm SSL_in_accept_init , | ||
24 | .Nm SSL_in_before , | ||
25 | .Nm SSL_in_connect_init , | ||
26 | .Nm SSL_in_init , | ||
27 | .Nm SSL_is_init_finished | ||
28 | .Nd inspect the state of the SSL state machine | ||
29 | .Sh SYNOPSIS | ||
30 | .In openssl/ssl.h | ||
31 | .Ft int | ||
32 | .Fo SSL_get_state | ||
33 | .Fa "const SSL *ssl" | ||
34 | .Fc | ||
35 | .Ft int | ||
36 | .Fo SSL_state | ||
37 | .Fa "const SSL *ssl" | ||
38 | .Fc | ||
39 | .Ft int | ||
40 | .Fo SSL_in_accept_init | ||
41 | .Fa "const SSL *ssl" | ||
42 | .Fc | ||
43 | .Ft int | ||
44 | .Fo SSL_in_before | ||
45 | .Fa "const SSL *ssl" | ||
46 | .Fc | ||
47 | .Ft int | ||
48 | .Fo SSL_in_connect_init | ||
49 | .Fa "const SSL *ssl" | ||
50 | .Fc | ||
51 | .Ft int | ||
52 | .Fo SSL_in_init | ||
53 | .Fa "const SSL *ssl" | ||
54 | .Fc | ||
55 | .Ft int | ||
56 | .Fo SSL_is_init_finished | ||
57 | .Fa "const SSL *ssl" | ||
58 | .Fc | ||
59 | .Sh DESCRIPTION | ||
60 | .Fn SSL_get_state | ||
61 | returns an encoded representation of the current state of the SSL | ||
62 | state machine. | ||
63 | .Fn SSL_state | ||
64 | is a deprecated alias for | ||
65 | .Fn SSL_get_state . | ||
66 | .Pp | ||
67 | The following bits may be set: | ||
68 | .Bl -tag -width Ds | ||
69 | .It Dv SSL_ST_ACCEPT | ||
70 | This bit is set by | ||
71 | .Xr SSL_accept 3 | ||
72 | and by | ||
73 | .Xr SSL_set_accept_state 3 . | ||
74 | It indicates that | ||
75 | .Fa ssl | ||
76 | is set up for server mode and no client initiated the TLS handshake yet. | ||
77 | The function | ||
78 | .Fn SSL_in_accept_init | ||
79 | returns non-zero if this bit is set or 0 otherwise. | ||
80 | .It Dv SSL_ST_BEFORE | ||
81 | This bit is set by the | ||
82 | .Xr SSL_accept 3 , | ||
83 | .Xr SSL_connect 3 , | ||
84 | .Xr SSL_set_accept_state 3 , | ||
85 | and | ||
86 | .Xr SSL_set_connect_state 3 | ||
87 | functions. | ||
88 | It indicates that the TLS handshake was not initiated yet. | ||
89 | The function | ||
90 | .Fn SSL_in_before | ||
91 | returns non-zero if this bit is set or 0 otherwise. | ||
92 | .It Dv SSL_ST_CONNECT | ||
93 | This bit is set by | ||
94 | .Xr SSL_connect 3 | ||
95 | and by | ||
96 | .Xr SSL_set_connect_state 3 . | ||
97 | It indicates that | ||
98 | .Fa ssl | ||
99 | is set up for client mode and no TLS handshake was initiated yet. | ||
100 | The function | ||
101 | .Fn SSL_in_connect_init | ||
102 | returns non-zero if this bit is set or 0 otherwise. | ||
103 | .El | ||
104 | .Pp | ||
105 | The following masks can be used: | ||
106 | .Bl -tag -width Ds | ||
107 | .It Dv SSL_ST_INIT | ||
108 | Set if | ||
109 | .Dv SSL_ST_ACCEPT | ||
110 | or | ||
111 | .Dv SSL_ST_CONNECT | ||
112 | is set. | ||
113 | The function | ||
114 | .Fn SSL_in_init | ||
115 | returns a non-zero value if one of these is set or 0 otherwise. | ||
116 | .It Dv SSL_ST_MASK | ||
117 | This mask includes all bits except | ||
118 | .Dv SSL_ST_ACCEPT , | ||
119 | .Dv SSL_ST_BEFORE , | ||
120 | and | ||
121 | .Dv SSL_ST_CONNECT . | ||
122 | .It Dv SSL_ST_OK | ||
123 | The state is set to this value when a connection is established. | ||
124 | The function | ||
125 | .Fn SSL_is_init_finished | ||
126 | returns a non-zero value if the state equals this constant, or 0 otherwise. | ||
127 | .It Dv SSL_ST_RENEGOTIATE | ||
128 | The program is about to renegotiate, for example when entering | ||
129 | .Xr SSL_read 3 | ||
130 | or | ||
131 | .Xr SSL_write 3 | ||
132 | right after | ||
133 | .Xr SSL_renegotiate 3 | ||
134 | was called. | ||
135 | .El | ||
136 | .Pp | ||
137 | The meaning of other bits is protocol-dependent. | ||
138 | Application programs usually do not need to inspect any of those | ||
139 | other bits. | ||
140 | .Pp | ||
141 | All these functions may be implemented as macros. | ||
142 | .Sh SEE ALSO | ||
143 | .Xr ssl 3 , | ||
144 | .Xr SSL_renegotiate 3 , | ||
145 | .Xr SSL_set_connect_state 3 | ||
146 | .Sh HISTORY | ||
147 | .Fn SSL_is_init_finished | ||
148 | first appeared in SSLeay 0.4.5b. | ||
149 | .Fn SSL_state | ||
150 | first appeared in SSLeay 0.5.2. | ||
151 | .Fn SSL_in_accept_init , | ||
152 | .Fn SSL_in_connect_init , | ||
153 | and | ||
154 | .Fn SSL_in_init | ||
155 | first appeared in SSLeay 0.6.0. | ||
156 | .Fn SSL_in_before | ||
157 | first appeared in SSLeay 0.8.0. | ||
158 | .Fn SSL_get_state | ||
159 | first appeared in SSLeay 0.9.0. | ||
160 | All these functions have been available since | ||
161 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_get_verify_result.3 b/src/lib/libssl/man/SSL_get_verify_result.3 deleted file mode 100644 index 180cf1bb73..0000000000 --- a/src/lib/libssl/man/SSL_get_verify_result.3 +++ /dev/null | |||
@@ -1,102 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_get_verify_result.3,v 1.6 2021/06/26 17:36:28 tb Exp $ | ||
2 | .\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2000, 2001, 2005 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: June 26 2021 $ | ||
52 | .Dt SSL_GET_VERIFY_RESULT 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_get_verify_result | ||
56 | .Nd get result of peer certificate verification | ||
57 | .Sh SYNOPSIS | ||
58 | .In openssl/ssl.h | ||
59 | .Ft long | ||
60 | .Fn SSL_get_verify_result "const SSL *ssl" | ||
61 | .Sh DESCRIPTION | ||
62 | .Fn SSL_get_verify_result | ||
63 | returns the result of the verification of the X509 certificate presented by the | ||
64 | peer, if any. | ||
65 | .Pp | ||
66 | .Fn SSL_get_verify_result | ||
67 | can only return one error code while the verification of a certificate can fail | ||
68 | because of many reasons at the same time. | ||
69 | Only the last verification error that occurred during the processing is | ||
70 | available from | ||
71 | .Fn SSL_get_verify_result . | ||
72 | .Pp | ||
73 | The verification result is part of the established session and is restored when | ||
74 | a session is reused. | ||
75 | .Sh RETURN VALUES | ||
76 | The following return values can currently occur: | ||
77 | .Bl -tag -width Ds | ||
78 | .It Dv X509_V_OK | ||
79 | The verification succeeded or no peer certificate was presented. | ||
80 | .It Any other value | ||
81 | Documented in | ||
82 | .Xr openssl 1 . | ||
83 | .El | ||
84 | .Sh SEE ALSO | ||
85 | .Xr openssl 1 , | ||
86 | .Xr ssl 3 , | ||
87 | .Xr SSL_CTX_set_verify 3 , | ||
88 | .Xr SSL_get0_peername 3 , | ||
89 | .Xr SSL_get_peer_certificate 3 , | ||
90 | .Xr SSL_set_verify_result 3 | ||
91 | .Sh HISTORY | ||
92 | .Fn SSL_get_verify_result | ||
93 | first appeared in SSLeay 0.6.1 and has been available since | ||
94 | .Ox 2.4 . | ||
95 | .Sh BUGS | ||
96 | If no peer certificate was presented, the returned result code is | ||
97 | .Dv X509_V_OK . | ||
98 | This is because no verification error occurred; | ||
99 | however, it does not indicate success. | ||
100 | .Fn SSL_get_verify_result | ||
101 | is only useful in connection with | ||
102 | .Xr SSL_get_peer_certificate 3 . | ||
diff --git a/src/lib/libssl/man/SSL_get_version.3 b/src/lib/libssl/man/SSL_get_version.3 deleted file mode 100644 index a6cefb055b..0000000000 --- a/src/lib/libssl/man/SSL_get_version.3 +++ /dev/null | |||
@@ -1,123 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_get_version.3,v 1.9 2021/04/15 16:13:22 tb Exp $ | ||
2 | .\" full merge up to: OpenSSL e417070c Jun 8 11:37:06 2016 -0400 | ||
3 | .\" selective merge up to: OpenSSL df75c2bf Dec 9 01:02:36 2018 +0100 | ||
4 | .\" | ||
5 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
6 | .\" Copyright (c) 2001, 2005, 2014 The OpenSSL Project. All rights reserved. | ||
7 | .\" | ||
8 | .\" Redistribution and use in source and binary forms, with or without | ||
9 | .\" modification, are permitted provided that the following conditions | ||
10 | .\" are met: | ||
11 | .\" | ||
12 | .\" 1. Redistributions of source code must retain the above copyright | ||
13 | .\" notice, this list of conditions and the following disclaimer. | ||
14 | .\" | ||
15 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
16 | .\" notice, this list of conditions and the following disclaimer in | ||
17 | .\" the documentation and/or other materials provided with the | ||
18 | .\" distribution. | ||
19 | .\" | ||
20 | .\" 3. All advertising materials mentioning features or use of this | ||
21 | .\" software must display the following acknowledgment: | ||
22 | .\" "This product includes software developed by the OpenSSL Project | ||
23 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
24 | .\" | ||
25 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | .\" endorse or promote products derived from this software without | ||
27 | .\" prior written permission. For written permission, please contact | ||
28 | .\" openssl-core@openssl.org. | ||
29 | .\" | ||
30 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
31 | .\" nor may "OpenSSL" appear in their names without prior written | ||
32 | .\" permission of the OpenSSL Project. | ||
33 | .\" | ||
34 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
35 | .\" acknowledgment: | ||
36 | .\" "This product includes software developed by the OpenSSL Project | ||
37 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
38 | .\" | ||
39 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | .\" | ||
52 | .Dd $Mdocdate: April 15 2021 $ | ||
53 | .Dt SSL_GET_VERSION 3 | ||
54 | .Os | ||
55 | .Sh NAME | ||
56 | .Nm SSL_get_version , | ||
57 | .Nm SSL_is_dtls , | ||
58 | .Nm SSL_version | ||
59 | .\" The following are intentionally undocumented because | ||
60 | .\" - the longer term plan is to remove them | ||
61 | .\" - nothing appears to be using them in the wild | ||
62 | .\" - and they have the wrong namespace prefix | ||
63 | .\" Nm TLS1_get_version | ||
64 | .\" Nm TLS1_get_client_version | ||
65 | .Nd get the protocol information of a connection | ||
66 | .Sh SYNOPSIS | ||
67 | .In openssl/ssl.h | ||
68 | .Ft const char * | ||
69 | .Fn SSL_get_version "const SSL *ssl" | ||
70 | .Ft int | ||
71 | .Fn SSL_is_dtls "const SSL *ssl" | ||
72 | .Ft int | ||
73 | .Fn SSL_version "const SSL *ssl" | ||
74 | .Sh DESCRIPTION | ||
75 | .Fn SSL_get_version | ||
76 | returns the name of the protocol used for the connection | ||
77 | .Fa ssl . | ||
78 | .Pp | ||
79 | .Fn SSL_is_dtls | ||
80 | returns 1 if the connection is using DTLS, 0 if not. | ||
81 | .Pp | ||
82 | .Fn SSL_version | ||
83 | returns an integer constant representing that protocol. | ||
84 | .Pp | ||
85 | These functions only return reliable results | ||
86 | after the initial handshake has been completed. | ||
87 | .Sh RETURN VALUES | ||
88 | The following strings or integers can be returned by | ||
89 | .Fn SSL_get_version | ||
90 | and | ||
91 | .Fn SSL_version : | ||
92 | .Bl -tag -width Ds | ||
93 | .It Qo TLSv1 Qc No or Dv TLS1_VERSION | ||
94 | The connection uses the TLSv1.0 protocol. | ||
95 | .It Qo TLSv1.1 Qc No or Dv TLS1_1_VERSION | ||
96 | The connection uses the TLSv1.1 protocol. | ||
97 | .It Qo TLSv1.2 Qc No or Dv TLS1_2_VERSION | ||
98 | The connection uses the TLSv1.2 protocol. | ||
99 | .It Qo TLSv1.3 Qc No or Dv TLS1_3_VERSION | ||
100 | The connection uses the TLSv1.3 protocol. | ||
101 | .It Qo DTLSv1 Qc No or Dv DTLS1_VERSION | ||
102 | The connection uses the Datagram Transport Layer Security 1.0 protocol. | ||
103 | .It Qo DTLSv1.2 Qc No or Dv DTLS1_2_VERSION | ||
104 | The connection uses the Datagram Transport Layer Security 1.2 protocol. | ||
105 | .It Qq unknown | ||
106 | This indicates an unknown protocol version; | ||
107 | it cannot currently happen with LibreSSL. | ||
108 | .El | ||
109 | .Pp | ||
110 | .Fn SSL_is_dtls | ||
111 | returns 1 if the connection uses DTLS, 0 if not. | ||
112 | .Sh SEE ALSO | ||
113 | .Xr ssl 3 | ||
114 | .Sh HISTORY | ||
115 | .Fn SSL_get_version | ||
116 | and | ||
117 | .Fn SSL_version | ||
118 | first appeared in SSLeay 0.8.0 and have been available since | ||
119 | .Ox 2.4 . | ||
120 | .Pp | ||
121 | .Fn SSL_is_dtls | ||
122 | first appeared in OpenSSL 1.1.0 and has been available since | ||
123 | .Ox 6.9 . | ||
diff --git a/src/lib/libssl/man/SSL_library_init.3 b/src/lib/libssl/man/SSL_library_init.3 deleted file mode 100644 index 053c1e6fcb..0000000000 --- a/src/lib/libssl/man/SSL_library_init.3 +++ /dev/null | |||
@@ -1,98 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_library_init.3,v 1.7 2019/06/14 13:41:31 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2000, 2006, 2010 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: June 14 2019 $ | ||
52 | .Dt SSL_LIBRARY_INIT 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_library_init , | ||
56 | .Nm OpenSSL_add_ssl_algorithms , | ||
57 | .Nm SSLeay_add_ssl_algorithms | ||
58 | .Nd initialize SSL library by registering algorithms | ||
59 | .Sh SYNOPSIS | ||
60 | .In openssl/ssl.h | ||
61 | .Ft int | ||
62 | .Fn SSL_library_init void | ||
63 | .Ft int | ||
64 | .Fn OpenSSL_add_ssl_algorithms void | ||
65 | .Ft int | ||
66 | .Fn SSLeay_add_ssl_algorithms void | ||
67 | .Sh DESCRIPTION | ||
68 | These functions are deprecated. | ||
69 | It is never useful for any application program to call any of them explicitly. | ||
70 | The library automatically calls them internally whenever needed. | ||
71 | .Pp | ||
72 | .Fn SSL_library_init | ||
73 | registers the available ciphers and digests | ||
74 | which are used directly or indirectly by TLS. | ||
75 | .Pp | ||
76 | .Fn OpenSSL_add_ssl_algorithms | ||
77 | and | ||
78 | .Fn SSLeay_add_ssl_algorithms | ||
79 | are synonyms for | ||
80 | .Fn SSL_library_init | ||
81 | and are implemented as macros. | ||
82 | .Sh RETURN VALUES | ||
83 | .Fn SSL_library_init | ||
84 | always returns 1. | ||
85 | .Sh SEE ALSO | ||
86 | .Xr ssl 3 | ||
87 | .Sh HISTORY | ||
88 | .Fn SSLeay_add_ssl_algorithms | ||
89 | first appeared in SSLeay 0.8.0 and has been available since | ||
90 | .Ox 2.4 . | ||
91 | .Pp | ||
92 | .Fn SSL_library_init | ||
93 | first appeared in OpenSSL 0.9.2b and has been available since | ||
94 | .Ox 2.6 . | ||
95 | .Pp | ||
96 | .Fn OpenSSL_add_ssl_algorithms | ||
97 | first appeared in OpenSSL 0.9.5 and has been available since | ||
98 | .Ox 2.7 . | ||
diff --git a/src/lib/libssl/man/SSL_load_client_CA_file.3 b/src/lib/libssl/man/SSL_load_client_CA_file.3 deleted file mode 100644 index f782d96dce..0000000000 --- a/src/lib/libssl/man/SSL_load_client_CA_file.3 +++ /dev/null | |||
@@ -1,185 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_load_client_CA_file.3,v 1.9 2019/06/12 09:36:30 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file is a derived work. | ||
5 | .\" The changes are covered by the following Copyright and license: | ||
6 | .\" | ||
7 | .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> | ||
8 | .\" | ||
9 | .\" Permission to use, copy, modify, and distribute this software for any | ||
10 | .\" purpose with or without fee is hereby granted, provided that the above | ||
11 | .\" copyright notice and this permission notice appear in all copies. | ||
12 | .\" | ||
13 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
14 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
15 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
16 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
17 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
18 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
19 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
20 | .\" | ||
21 | .\" The original file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
22 | .\" Copyright (c) 2000 The OpenSSL Project. All rights reserved. | ||
23 | .\" | ||
24 | .\" Redistribution and use in source and binary forms, with or without | ||
25 | .\" modification, are permitted provided that the following conditions | ||
26 | .\" are met: | ||
27 | .\" | ||
28 | .\" 1. Redistributions of source code must retain the above copyright | ||
29 | .\" notice, this list of conditions and the following disclaimer. | ||
30 | .\" | ||
31 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
32 | .\" notice, this list of conditions and the following disclaimer in | ||
33 | .\" the documentation and/or other materials provided with the | ||
34 | .\" distribution. | ||
35 | .\" | ||
36 | .\" 3. All advertising materials mentioning features or use of this | ||
37 | .\" software must display the following acknowledgment: | ||
38 | .\" "This product includes software developed by the OpenSSL Project | ||
39 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
40 | .\" | ||
41 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
42 | .\" endorse or promote products derived from this software without | ||
43 | .\" prior written permission. For written permission, please contact | ||
44 | .\" openssl-core@openssl.org. | ||
45 | .\" | ||
46 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
47 | .\" nor may "OpenSSL" appear in their names without prior written | ||
48 | .\" permission of the OpenSSL Project. | ||
49 | .\" | ||
50 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
51 | .\" acknowledgment: | ||
52 | .\" "This product includes software developed by the OpenSSL Project | ||
53 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
54 | .\" | ||
55 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
56 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
57 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
58 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
59 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
60 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
61 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
62 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
63 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
64 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
65 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
66 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
67 | .\" | ||
68 | .Dd $Mdocdate: June 12 2019 $ | ||
69 | .Dt SSL_LOAD_CLIENT_CA_FILE 3 | ||
70 | .Os | ||
71 | .Sh NAME | ||
72 | .Nm SSL_load_client_CA_file , | ||
73 | .Nm SSL_add_file_cert_subjects_to_stack , | ||
74 | .Nm SSL_add_dir_cert_subjects_to_stack | ||
75 | .Nd load certificate names from files | ||
76 | .Sh SYNOPSIS | ||
77 | .In openssl/ssl.h | ||
78 | .Ft STACK_OF(X509_NAME) * | ||
79 | .Fn SSL_load_client_CA_file "const char *file" | ||
80 | .Ft int | ||
81 | .Fo SSL_add_file_cert_subjects_to_stack | ||
82 | .Fa "STACK_OF(X509_NAME) *stack" | ||
83 | .Fa "const char *file" | ||
84 | .Fc | ||
85 | .Ft int | ||
86 | .Fo SSL_add_dir_cert_subjects_to_stack | ||
87 | .Fa "STACK_OF(X509_NAME) *stack" | ||
88 | .Fa "const char *dir" | ||
89 | .Fc | ||
90 | .Sh DESCRIPTION | ||
91 | .Fn SSL_load_client_CA_file | ||
92 | reads PEM formatted certificates from | ||
93 | .Fa file | ||
94 | and returns a new | ||
95 | .Vt STACK_OF(X509_NAME) | ||
96 | with the subject names found. | ||
97 | While the name suggests the specific usage as a support function for | ||
98 | .Xr SSL_CTX_set_client_CA_list 3 , | ||
99 | it is not limited to CA certificates. | ||
100 | .Pp | ||
101 | .Fn SSL_add_file_cert_subjects_to_stack | ||
102 | is similar except that the names are added to the existing | ||
103 | .Fa stack . | ||
104 | .Pp | ||
105 | .Fn SSL_add_dir_cert_subjects_to_stack | ||
106 | calls | ||
107 | .Fn SSL_add_file_cert_subjects_to_stack | ||
108 | on every file in the directory | ||
109 | .Fa dir . | ||
110 | .Pp | ||
111 | If a name is already on the stack, all these functions skip it and | ||
112 | do not add it again. | ||
113 | .Sh RETURN VALUES | ||
114 | .Fn SSL_load_client_CA_file | ||
115 | returns a pointer to the new | ||
116 | .Vt STACK_OF(X509_NAME) | ||
117 | or | ||
118 | .Dv NULL on failure . | ||
119 | .Pp | ||
120 | .Fn SSL_add_file_cert_subjects_to_stack | ||
121 | and | ||
122 | .Fn SSL_add_dir_cert_subjects_to_stack | ||
123 | return 1 for success or 0 for failure. | ||
124 | .Pp | ||
125 | All these functions treat empty files and directories as failures. | ||
126 | .Pp | ||
127 | In some cases of failure, the reason can be determined with | ||
128 | .Xr ERR_get_error 3 . | ||
129 | .Sh EXAMPLES | ||
130 | Load names of CAs from a file and use it as a client CA list: | ||
131 | .Bd -literal | ||
132 | SSL_CTX *ctx; | ||
133 | STACK_OF(X509_NAME) *cert_names; | ||
134 | \&... | ||
135 | cert_names = SSL_load_client_CA_file("/path/to/CAfile.pem"); | ||
136 | if (cert_names != NULL) | ||
137 | SSL_CTX_set_client_CA_list(ctx, cert_names); | ||
138 | else | ||
139 | error_handling(); | ||
140 | \&... | ||
141 | .Ed | ||
142 | .Sh SEE ALSO | ||
143 | .Xr PEM_read_bio_X509 3 , | ||
144 | .Xr ssl 3 , | ||
145 | .Xr SSL_CTX_set_client_CA_list 3 , | ||
146 | .Xr X509_get_subject_name 3 , | ||
147 | .Xr X509_NAME_new 3 | ||
148 | .Sh HISTORY | ||
149 | .Fn SSL_load_client_CA_file | ||
150 | first appeared in SSLeay 0.8.0 and has been available since | ||
151 | .Ox 2.4 . | ||
152 | .Pp | ||
153 | .Fn SSL_add_file_cert_subjects_to_stack | ||
154 | and | ||
155 | .Fn SSL_add_dir_cert_subjects_to_stack | ||
156 | first appeared in OpenSSL 0.9.2b and have been available since | ||
157 | .Ox 2.6 . | ||
158 | .Sh AUTHORS | ||
159 | .Fn SSL_add_file_cert_subjects_to_stack | ||
160 | and | ||
161 | .Fn SSL_add_dir_cert_subjects_to_stack | ||
162 | were written by | ||
163 | .An Ben Laurie Aq Mt ben@openssl.org | ||
164 | in 1999. | ||
165 | .Sh BUGS | ||
166 | In some cases of failure, for example for empty files and directories, | ||
167 | these functions fail to report an error, in the sense that | ||
168 | .Xr ERR_get_error 3 | ||
169 | does not work. | ||
170 | .Pp | ||
171 | Even in case of failure, for example when parsing one of the | ||
172 | files or certificates fails, | ||
173 | .Fn SSL_add_file_cert_subjects_to_stack | ||
174 | and | ||
175 | .Fn SSL_add_dir_cert_subjects_to_stack | ||
176 | may still have added some certificates to the stack. | ||
177 | .Pp | ||
178 | The behaviour of | ||
179 | .Fn SSL_add_dir_cert_subjects_to_stack | ||
180 | is non-deterministic. | ||
181 | If parsing one file fails, parsing of the whole directory is aborted. | ||
182 | Files in the directory are not parsed in any specific order. | ||
183 | For example, adding an empty file to | ||
184 | .Fa dir | ||
185 | may or may not cause some of the other files to be ignored. | ||
diff --git a/src/lib/libssl/man/SSL_new.3 b/src/lib/libssl/man/SSL_new.3 deleted file mode 100644 index 22c5dbf2db..0000000000 --- a/src/lib/libssl/man/SSL_new.3 +++ /dev/null | |||
@@ -1,110 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_new.3,v 1.7 2022/07/13 22:05:53 schwarze Exp $ | ||
2 | .\" full merge up to: OpenSSL 1c7ae3dd Mar 29 19:17:55 2017 +1000 | ||
3 | .\" | ||
4 | .\" This file was written by Richard Levitte <levitte@openssl.org> | ||
5 | .\" and Matt Caswell <matt@openssl.org>. | ||
6 | .\" Copyright (c) 2000, 2016 The OpenSSL Project. All rights reserved. | ||
7 | .\" | ||
8 | .\" Redistribution and use in source and binary forms, with or without | ||
9 | .\" modification, are permitted provided that the following conditions | ||
10 | .\" are met: | ||
11 | .\" | ||
12 | .\" 1. Redistributions of source code must retain the above copyright | ||
13 | .\" notice, this list of conditions and the following disclaimer. | ||
14 | .\" | ||
15 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
16 | .\" notice, this list of conditions and the following disclaimer in | ||
17 | .\" the documentation and/or other materials provided with the | ||
18 | .\" distribution. | ||
19 | .\" | ||
20 | .\" 3. All advertising materials mentioning features or use of this | ||
21 | .\" software must display the following acknowledgment: | ||
22 | .\" "This product includes software developed by the OpenSSL Project | ||
23 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
24 | .\" | ||
25 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | .\" endorse or promote products derived from this software without | ||
27 | .\" prior written permission. For written permission, please contact | ||
28 | .\" openssl-core@openssl.org. | ||
29 | .\" | ||
30 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
31 | .\" nor may "OpenSSL" appear in their names without prior written | ||
32 | .\" permission of the OpenSSL Project. | ||
33 | .\" | ||
34 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
35 | .\" acknowledgment: | ||
36 | .\" "This product includes software developed by the OpenSSL Project | ||
37 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
38 | .\" | ||
39 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | .\" | ||
52 | .Dd $Mdocdate: July 13 2022 $ | ||
53 | .Dt SSL_NEW 3 | ||
54 | .Os | ||
55 | .Sh NAME | ||
56 | .Nm SSL_new , | ||
57 | .Nm SSL_up_ref | ||
58 | .Nd create a new SSL structure for a connection | ||
59 | .Sh SYNOPSIS | ||
60 | .In openssl/ssl.h | ||
61 | .Ft SSL * | ||
62 | .Fn SSL_new "SSL_CTX *ctx" | ||
63 | .Ft int | ||
64 | .Fn SSL_up_ref "SSL *ssl" | ||
65 | .Sh DESCRIPTION | ||
66 | .Fn SSL_new | ||
67 | creates a new | ||
68 | .Vt SSL | ||
69 | structure which is needed to hold the data for a TLS/SSL connection. | ||
70 | The new structure inherits the settings of the underlying context | ||
71 | .Fa ctx : | ||
72 | connection method, options, verification settings, | ||
73 | timeout settings, security level. | ||
74 | The reference count of the new structure is set to 1. | ||
75 | .Pp | ||
76 | .Fn SSL_up_ref | ||
77 | increments the reference count of | ||
78 | .Fa ssl | ||
79 | by 1. | ||
80 | .Sh RETURN VALUES | ||
81 | The following return values can occur: | ||
82 | .Bl -tag -width Ds | ||
83 | .It Dv NULL | ||
84 | The creation of a new | ||
85 | .Vt SSL | ||
86 | structure failed. | ||
87 | Check the error stack to find out the reason. | ||
88 | .It Pointer to an Vt SSL No structure | ||
89 | The return value points to an allocated | ||
90 | .Vt SSL | ||
91 | structure. | ||
92 | .El | ||
93 | .Pp | ||
94 | .Fn SSL_up_ref | ||
95 | returns 1 for success or 0 for failure. | ||
96 | .Sh SEE ALSO | ||
97 | .Xr ssl 3 , | ||
98 | .Xr SSL_clear 3 , | ||
99 | .Xr SSL_CTX_set_options 3 , | ||
100 | .Xr SSL_CTX_set_security_level 3 , | ||
101 | .Xr SSL_free 3 , | ||
102 | .Xr SSL_get_SSL_CTX 3 | ||
103 | .Sh HISTORY | ||
104 | .Fn SSL_new | ||
105 | appeared in SSLeay 0.4 or earlier and has been available since | ||
106 | .Ox 2.4 . | ||
107 | .Pp | ||
108 | .Fn SSL_up_ref | ||
109 | first appeared in OpenSSL 1.1.0 and has been available since | ||
110 | .Ox 6.3 . | ||
diff --git a/src/lib/libssl/man/SSL_num_renegotiations.3 b/src/lib/libssl/man/SSL_num_renegotiations.3 deleted file mode 100644 index 6a81b76a60..0000000000 --- a/src/lib/libssl/man/SSL_num_renegotiations.3 +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_num_renegotiations.3,v 1.5 2019/06/12 09:36:30 schwarze Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> | ||
4 | .\" | ||
5 | .\" Permission to use, copy, modify, and distribute this software for any | ||
6 | .\" purpose with or without fee is hereby granted, provided that the above | ||
7 | .\" copyright notice and this permission notice appear in all copies. | ||
8 | .\" | ||
9 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | .\" | ||
17 | .Dd $Mdocdate: June 12 2019 $ | ||
18 | .Dt SSL_NUM_RENEGOTIATIONS 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm SSL_num_renegotiations , | ||
22 | .Nm SSL_clear_num_renegotiations , | ||
23 | .Nm SSL_total_renegotiations | ||
24 | .Nd renegotiation counters | ||
25 | .Sh SYNOPSIS | ||
26 | .In openssl/ssl.h | ||
27 | .Ft long | ||
28 | .Fo SSL_num_renegotiations | ||
29 | .Fa "SSL *ssl" | ||
30 | .Fc | ||
31 | .Ft long | ||
32 | .Fo SSL_clear_num_renegotiations | ||
33 | .Fa "SSL *ssl" | ||
34 | .Fc | ||
35 | .Ft long | ||
36 | .Fo SSL_total_renegotiations | ||
37 | .Fa "SSL *ssl" | ||
38 | .Fc | ||
39 | .Sh DESCRIPTION | ||
40 | .Fn SSL_num_renegotiations | ||
41 | reports the number of renegotiations initiated in | ||
42 | .Fa ssl | ||
43 | since | ||
44 | .Xr SSL_new 3 , | ||
45 | .Xr SSL_clear 3 , | ||
46 | or | ||
47 | .Fn SSL_clear_num_renegotiations | ||
48 | was last called on that object. | ||
49 | .Pp | ||
50 | .Fn SSL_clear_num_renegotiations | ||
51 | does the same and additionally resets the renegotiation counter to 0. | ||
52 | .Pp | ||
53 | .Fn SSL_total_renegotiations | ||
54 | reports the number of renegotiations initiated in | ||
55 | .Fa ssl | ||
56 | since | ||
57 | .Xr SSL_new 3 | ||
58 | or | ||
59 | .Xr SSL_clear 3 | ||
60 | was last called on that object. | ||
61 | .Pp | ||
62 | These functions are implemented as macros. | ||
63 | .Sh RETURN VALUES | ||
64 | All these functions return a number of renegotiations. | ||
65 | .Sh SEE ALSO | ||
66 | .Xr BIO_set_ssl_renegotiate_bytes 3 , | ||
67 | .Xr ssl 3 , | ||
68 | .Xr SSL_ctrl 3 , | ||
69 | .Xr SSL_read 3 , | ||
70 | .Xr SSL_renegotiate 3 , | ||
71 | .Xr SSL_write 3 | ||
72 | .Sh HISTORY | ||
73 | These functions first appeared in SSLeay 0.9.0 | ||
74 | and have been available since | ||
75 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_pending.3 b/src/lib/libssl/man/SSL_pending.3 deleted file mode 100644 index bbc2e9bdd2..0000000000 --- a/src/lib/libssl/man/SSL_pending.3 +++ /dev/null | |||
@@ -1,90 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_pending.3,v 1.5 2020/01/23 03:40:18 beck Exp $ | ||
2 | .\" OpenSSL a528d4f0 Oct 27 13:40:11 2015 -0400 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>, | ||
5 | .\" Bodo Moeller <bodo@openssl.org>, and Matt Caswell <matt@openssl.org>. | ||
6 | .\" Copyright (c) 2000, 2005, 2015, 2016 The OpenSSL Project. | ||
7 | .\" All rights reserved. | ||
8 | .\" | ||
9 | .\" Redistribution and use in source and binary forms, with or without | ||
10 | .\" modification, are permitted provided that the following conditions | ||
11 | .\" are met: | ||
12 | .\" | ||
13 | .\" 1. Redistributions of source code must retain the above copyright | ||
14 | .\" notice, this list of conditions and the following disclaimer. | ||
15 | .\" | ||
16 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
17 | .\" notice, this list of conditions and the following disclaimer in | ||
18 | .\" the documentation and/or other materials provided with the | ||
19 | .\" distribution. | ||
20 | .\" | ||
21 | .\" 3. All advertising materials mentioning features or use of this | ||
22 | .\" software must display the following acknowledgment: | ||
23 | .\" "This product includes software developed by the OpenSSL Project | ||
24 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
25 | .\" | ||
26 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
27 | .\" endorse or promote products derived from this software without | ||
28 | .\" prior written permission. For written permission, please contact | ||
29 | .\" openssl-core@openssl.org. | ||
30 | .\" | ||
31 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
32 | .\" nor may "OpenSSL" appear in their names without prior written | ||
33 | .\" permission of the OpenSSL Project. | ||
34 | .\" | ||
35 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
36 | .\" acknowledgment: | ||
37 | .\" "This product includes software developed by the OpenSSL Project | ||
38 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
39 | .\" | ||
40 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
41 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
42 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
43 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
44 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
45 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
46 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
47 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
48 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
49 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
50 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
51 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
52 | .\" | ||
53 | .Dd $Mdocdate: January 23 2020 $ | ||
54 | .Dt SSL_PENDING 3 | ||
55 | .Os | ||
56 | .Sh NAME | ||
57 | .Nm SSL_pending | ||
58 | .Nd obtain number of readable bytes buffered in an SSL object | ||
59 | .Sh SYNOPSIS | ||
60 | .In openssl/ssl.h | ||
61 | .Ft int | ||
62 | .Fn SSL_pending "const SSL *ssl" | ||
63 | .Sh DESCRIPTION | ||
64 | Data is received in whole blocks known as records from the peer. | ||
65 | A whole record is processed, for example decrypted, in one go and | ||
66 | is buffered until it is read by the application via a call to | ||
67 | .Xr SSL_read 3 . | ||
68 | .Pp | ||
69 | .Fn SSL_pending | ||
70 | returns the number of bytes of application data which are available | ||
71 | for immediate read. | ||
72 | .Pp | ||
73 | .Fn SSL_pending | ||
74 | takes into account only bytes from the TLS/SSL record that is | ||
75 | currently being processed (if any). | ||
76 | .Sh RETURN VALUES | ||
77 | .Fn SSL_pending | ||
78 | returns the number of buffered and processed application data | ||
79 | bytes that are pending and are available for immediate read. | ||
80 | .Sh SEE ALSO | ||
81 | .Xr ssl 3 , | ||
82 | .Xr SSL_read 3 | ||
83 | .Sh HISTORY | ||
84 | .Fn SSL_pending | ||
85 | appeared in SSLeay 0.4 or earlier and has been available since | ||
86 | .Ox 2.4 . | ||
87 | .Sh BUGS | ||
88 | Up to OpenSSL 0.9.6, | ||
89 | .Fn SSL_pending | ||
90 | did not check if the record type of pending data is application data. | ||
diff --git a/src/lib/libssl/man/SSL_read.3 b/src/lib/libssl/man/SSL_read.3 deleted file mode 100644 index bb72a8ed82..0000000000 --- a/src/lib/libssl/man/SSL_read.3 +++ /dev/null | |||
@@ -1,278 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_read.3,v 1.8 2021/10/24 15:10:13 schwarze Exp $ | ||
2 | .\" full merge up to: OpenSSL 5a2443ae Nov 14 11:37:36 2016 +0000 | ||
3 | .\" partial merge up to: OpenSSL 24a535ea Sep 22 13:14:20 2020 +0100 | ||
4 | .\" | ||
5 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org> and | ||
6 | .\" Matt Caswell <matt@openssl.org>. | ||
7 | .\" Copyright (c) 2000, 2001, 2008, 2016 The OpenSSL Project. | ||
8 | .\" All rights reserved. | ||
9 | .\" | ||
10 | .\" Redistribution and use in source and binary forms, with or without | ||
11 | .\" modification, are permitted provided that the following conditions | ||
12 | .\" are met: | ||
13 | .\" | ||
14 | .\" 1. Redistributions of source code must retain the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer. | ||
16 | .\" | ||
17 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
18 | .\" notice, this list of conditions and the following disclaimer in | ||
19 | .\" the documentation and/or other materials provided with the | ||
20 | .\" distribution. | ||
21 | .\" | ||
22 | .\" 3. All advertising materials mentioning features or use of this | ||
23 | .\" software must display the following acknowledgment: | ||
24 | .\" "This product includes software developed by the OpenSSL Project | ||
25 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
26 | .\" | ||
27 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
28 | .\" endorse or promote products derived from this software without | ||
29 | .\" prior written permission. For written permission, please contact | ||
30 | .\" openssl-core@openssl.org. | ||
31 | .\" | ||
32 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
33 | .\" nor may "OpenSSL" appear in their names without prior written | ||
34 | .\" permission of the OpenSSL Project. | ||
35 | .\" | ||
36 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
37 | .\" acknowledgment: | ||
38 | .\" "This product includes software developed by the OpenSSL Project | ||
39 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
40 | .\" | ||
41 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
42 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
43 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
44 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
45 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
46 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
47 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
48 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
49 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
50 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
51 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
52 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
53 | .\" | ||
54 | .Dd $Mdocdate: October 24 2021 $ | ||
55 | .Dt SSL_READ 3 | ||
56 | .Os | ||
57 | .Sh NAME | ||
58 | .Nm SSL_read_ex , | ||
59 | .Nm SSL_read , | ||
60 | .Nm SSL_peek_ex , | ||
61 | .Nm SSL_peek | ||
62 | .Nd read bytes from a TLS connection | ||
63 | .Sh SYNOPSIS | ||
64 | .In openssl/ssl.h | ||
65 | .Ft int | ||
66 | .Fn SSL_read_ex "SSL *ssl" "void *buf" "size_t num" "size_t *readbytes" | ||
67 | .Ft int | ||
68 | .Fn SSL_read "SSL *ssl" "void *buf" "int num" | ||
69 | .Ft int | ||
70 | .Fn SSL_peek_ex "SSL *ssl" "void *buf" "size_t num" "size_t *readbytes" | ||
71 | .Ft int | ||
72 | .Fn SSL_peek "SSL *ssl" "void *buf" "int num" | ||
73 | .Sh DESCRIPTION | ||
74 | .Fn SSL_read_ex | ||
75 | and | ||
76 | .Fn SSL_read | ||
77 | try to read | ||
78 | .Fa num | ||
79 | bytes from the specified | ||
80 | .Fa ssl | ||
81 | into the buffer | ||
82 | .Fa buf . | ||
83 | On success | ||
84 | .Fn SSL_read_ex | ||
85 | stores the number of bytes actually read in | ||
86 | .Pf * Fa readbytes . | ||
87 | .Pp | ||
88 | .Fn SSL_peek_ex | ||
89 | and | ||
90 | .Fn SSL_peek | ||
91 | are identical to | ||
92 | .Fn SSL_read_ex | ||
93 | and | ||
94 | .Fn SSL_read , | ||
95 | respectively, | ||
96 | except that no bytes are removed from the underlying BIO during | ||
97 | the read, such that a subsequent call to | ||
98 | .Fn SSL_read_ex | ||
99 | or | ||
100 | .Fn SSL_read | ||
101 | will yield at least the same bytes once again. | ||
102 | .Pp | ||
103 | In the following, | ||
104 | .Fn SSL_read_ex , | ||
105 | .Fn SSL_read , | ||
106 | .Fn SSL_peek_ex , | ||
107 | and | ||
108 | .Fn SSL_peek | ||
109 | are called | ||
110 | .Dq read functions . | ||
111 | .Pp | ||
112 | If necessary, a read function will negotiate a TLS session, if | ||
113 | not already explicitly performed by | ||
114 | .Xr SSL_connect 3 | ||
115 | or | ||
116 | .Xr SSL_accept 3 . | ||
117 | If the peer requests a re-negotiation, it will be performed | ||
118 | transparently during the read function operation. | ||
119 | The behaviour of the read functions depends on the underlying | ||
120 | .Vt BIO . | ||
121 | .Pp | ||
122 | For the transparent negotiation to succeed, the | ||
123 | .Fa ssl | ||
124 | must have been initialized to client or server mode. | ||
125 | This is done by calling | ||
126 | .Xr SSL_set_connect_state 3 | ||
127 | or | ||
128 | .Xr SSL_set_accept_state 3 | ||
129 | before the first call to a read function. | ||
130 | .Pp | ||
131 | The read functions work based on the TLS records. | ||
132 | The data are received in records (with a maximum record size of 16kB). | ||
133 | Only when a record has been completely received, it can be processed | ||
134 | (decrypted and checked for integrity). | ||
135 | Therefore, data that was not retrieved at the last read call can | ||
136 | still be buffered inside the TLS layer and will be retrieved on the | ||
137 | next read call. | ||
138 | If | ||
139 | .Fa num | ||
140 | is higher than the number of bytes buffered, the read functions | ||
141 | will return with the bytes buffered. | ||
142 | If no more bytes are in the buffer, the read functions will trigger | ||
143 | the processing of the next record. | ||
144 | Only when the record has been received and processed completely | ||
145 | will the read functions return reporting success. | ||
146 | At most the contents of the record will be returned. | ||
147 | As the size of a TLS record may exceed the maximum packet size | ||
148 | of the underlying transport (e.g., TCP), it may be necessary to | ||
149 | read several packets from the transport layer before the record is | ||
150 | complete and the read call can succeed. | ||
151 | .Pp | ||
152 | If the underlying | ||
153 | .Vt BIO | ||
154 | is blocking, | ||
155 | a read function will only return once the read operation has been | ||
156 | finished or an error occurred, except when a renegotiation takes | ||
157 | place, in which case an | ||
158 | .Dv SSL_ERROR_WANT_READ | ||
159 | may occur. | ||
160 | This behavior can be controlled with the | ||
161 | .Dv SSL_MODE_AUTO_RETRY | ||
162 | flag of the | ||
163 | .Xr SSL_CTX_set_mode 3 | ||
164 | call. | ||
165 | .Pp | ||
166 | If the underlying | ||
167 | .Vt BIO | ||
168 | is non-blocking, a read function will also return when the underlying | ||
169 | .Vt BIO | ||
170 | could not satisfy the needs of the function to continue the operation. | ||
171 | In this case a call to | ||
172 | .Xr SSL_get_error 3 | ||
173 | with the return value of the read function will yield | ||
174 | .Dv SSL_ERROR_WANT_READ | ||
175 | or | ||
176 | .Dv SSL_ERROR_WANT_WRITE . | ||
177 | As at any time a re-negotiation is possible, a read function may | ||
178 | also cause write operations. | ||
179 | The calling process must then repeat the call after taking appropriate | ||
180 | action to satisfy the needs of the read function. | ||
181 | The action depends on the underlying | ||
182 | .Vt BIO . | ||
183 | When using a non-blocking socket, nothing is to be done, but | ||
184 | .Xr select 2 | ||
185 | can be used to check for the required condition. | ||
186 | When using a buffering | ||
187 | .Vt BIO , | ||
188 | like a | ||
189 | .Vt BIO | ||
190 | pair, data must be written into or retrieved out of the | ||
191 | .Vt BIO | ||
192 | before being able to continue. | ||
193 | .Pp | ||
194 | .Xr SSL_pending 3 | ||
195 | can be used to find out whether there are buffered bytes available for | ||
196 | immediate retrieval. | ||
197 | In this case a read function can be called without blocking or | ||
198 | actually receiving new data from the underlying socket. | ||
199 | .Pp | ||
200 | When a read function operation has to be repeated because of | ||
201 | .Dv SSL_ERROR_WANT_READ | ||
202 | or | ||
203 | .Dv SSL_ERROR_WANT_WRITE , | ||
204 | it must be repeated with the same arguments. | ||
205 | .Sh RETURN VALUES | ||
206 | .Fn SSL_read_ex | ||
207 | and | ||
208 | .Fn SSL_peek_ex | ||
209 | return 1 for success or 0 for failure. | ||
210 | Success means that one or more application data bytes | ||
211 | have been read from the SSL connection. | ||
212 | Failure means that no bytes could be read from the SSL connection. | ||
213 | Failures can be retryable (e.g. we are waiting for more bytes to be | ||
214 | delivered by the network) or non-retryable (e.g. a fatal network error). | ||
215 | In the event of a failure, call | ||
216 | .Xr SSL_get_error 3 | ||
217 | to find out the reason which indicates whether the call is retryable or not. | ||
218 | .Pp | ||
219 | For | ||
220 | .Fn SSL_read | ||
221 | and | ||
222 | .Fn SSL_peek , | ||
223 | the following return values can occur: | ||
224 | .Bl -tag -width Ds | ||
225 | .It >0 | ||
226 | The read operation was successful. | ||
227 | The return value is the number of bytes actually read from the | ||
228 | TLS connection. | ||
229 | .It 0 | ||
230 | The read operation was not successful. | ||
231 | The reason may either be a clean shutdown due to a | ||
232 | .Dq close notify | ||
233 | alert sent by the peer (in which case the | ||
234 | .Dv SSL_RECEIVED_SHUTDOWN | ||
235 | flag in the ssl shutdown state is set (see | ||
236 | .Xr SSL_shutdown 3 | ||
237 | and | ||
238 | .Xr SSL_set_shutdown 3 ) . | ||
239 | It is also possible that the peer simply shut down the underlying transport and | ||
240 | the shutdown is incomplete. | ||
241 | Call | ||
242 | .Xr SSL_get_error 3 | ||
243 | with the return value to find out whether an error occurred or the connection | ||
244 | was shut down cleanly | ||
245 | .Pq Dv SSL_ERROR_ZERO_RETURN . | ||
246 | .It <0 | ||
247 | The read operation was not successful, because either an error occurred or | ||
248 | action must be taken by the calling process. | ||
249 | Call | ||
250 | .Xr SSL_get_error 3 | ||
251 | with the return value to find out the reason. | ||
252 | .El | ||
253 | .Sh SEE ALSO | ||
254 | .Xr BIO_new 3 , | ||
255 | .Xr ssl 3 , | ||
256 | .Xr SSL_accept 3 , | ||
257 | .Xr SSL_connect 3 , | ||
258 | .Xr SSL_CTX_new 3 , | ||
259 | .Xr SSL_CTX_set_mode 3 , | ||
260 | .Xr SSL_get_error 3 , | ||
261 | .Xr SSL_pending 3 , | ||
262 | .Xr SSL_set_connect_state 3 , | ||
263 | .Xr SSL_set_shutdown 3 , | ||
264 | .Xr SSL_shutdown 3 , | ||
265 | .Xr SSL_write 3 | ||
266 | .Sh HISTORY | ||
267 | .Fn SSL_read | ||
268 | appeared in SSLeay 0.4 or earlier. | ||
269 | .Fn SSL_peek | ||
270 | first appeared in SSLeay 0.6.6. | ||
271 | Both functions have been available since | ||
272 | .Ox 2.4 . | ||
273 | .Pp | ||
274 | .Fn SSL_read_ex | ||
275 | and | ||
276 | .Fn SSL_peek_ex | ||
277 | first appeared in OpenSSL 1.1.1 and have been available since | ||
278 | .Ox 7.1 . | ||
diff --git a/src/lib/libssl/man/SSL_read_early_data.3 b/src/lib/libssl/man/SSL_read_early_data.3 deleted file mode 100644 index 1435c15935..0000000000 --- a/src/lib/libssl/man/SSL_read_early_data.3 +++ /dev/null | |||
@@ -1,174 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_read_early_data.3,v 1.4 2021/11/26 13:48:22 jsg Exp $ | ||
2 | .\" content checked up to: OpenSSL 6328d367 Jul 4 21:58:30 2020 +0200 | ||
3 | .\" | ||
4 | .\" Copyright (c) 2020 Ingo Schwarze <schwarze@openbsd.org> | ||
5 | .\" | ||
6 | .\" Permission to use, copy, modify, and distribute this software for any | ||
7 | .\" purpose with or without fee is hereby granted, provided that the above | ||
8 | .\" copyright notice and this permission notice appear in all copies. | ||
9 | .\" | ||
10 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
11 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
12 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
13 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
14 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
15 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
16 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
17 | .\" | ||
18 | .Dd $Mdocdate: November 26 2021 $ | ||
19 | .Dt SSL_READ_EARLY_DATA 3 | ||
20 | .Os | ||
21 | .Sh NAME | ||
22 | .Nm SSL_CTX_set_max_early_data , | ||
23 | .Nm SSL_set_max_early_data , | ||
24 | .Nm SSL_SESSION_set_max_early_data , | ||
25 | .Nm SSL_CTX_get_max_early_data , | ||
26 | .Nm SSL_get_max_early_data , | ||
27 | .Nm SSL_SESSION_get_max_early_data , | ||
28 | .Nm SSL_write_early_data , | ||
29 | .Nm SSL_read_early_data , | ||
30 | .Nm SSL_get_early_data_status | ||
31 | .Nd transmit application data during the handshake | ||
32 | .Sh SYNOPSIS | ||
33 | .In openssl/ssl.h | ||
34 | .Ft int | ||
35 | .Fo SSL_CTX_set_max_early_data | ||
36 | .Fa "SSL_CTX *ctx" | ||
37 | .Fa "uint32_t max_bytes" | ||
38 | .Fc | ||
39 | .Ft int | ||
40 | .Fo SSL_set_max_early_data | ||
41 | .Fa "SSL *ssl" | ||
42 | .Fa "uint32_t max_bytes" | ||
43 | .Fc | ||
44 | .Ft int | ||
45 | .Fo SSL_SESSION_set_max_early_data | ||
46 | .Fa "SSL_SESSION *session" | ||
47 | .Fa "uint32_t max_bytes" | ||
48 | .Fc | ||
49 | .Ft uint32_t | ||
50 | .Fo SSL_CTX_get_max_early_data | ||
51 | .Fa "const SSL_CTX *ctx" | ||
52 | .Fc | ||
53 | .Ft uint32_t | ||
54 | .Fo SSL_get_max_early_data | ||
55 | .Fa "const SSL *ssl" | ||
56 | .Fc | ||
57 | .Ft uint32_t | ||
58 | .Fo SSL_SESSION_get_max_early_data | ||
59 | .Fa "const SSL_SESSION *session" | ||
60 | .Fc | ||
61 | .Ft int | ||
62 | .Fo SSL_write_early_data | ||
63 | .Fa "SSL *ssl" | ||
64 | .Fa "const void *buf" | ||
65 | .Fa "size_t len" | ||
66 | .Fa "size_t *written" | ||
67 | .Fc | ||
68 | .Ft int | ||
69 | .Fo SSL_read_early_data | ||
70 | .Fa "SSL *ssl" | ||
71 | .Fa "void *buf" | ||
72 | .Fa "size_t maxlen" | ||
73 | .Fa "size_t *readbytes" | ||
74 | .Fc | ||
75 | .Ft int | ||
76 | .Fo SSL_get_early_data_status | ||
77 | .Fa "const SSL *ssl" | ||
78 | .Fc | ||
79 | .Sh DESCRIPTION | ||
80 | In LibreSSL, these functions have no effect. | ||
81 | They are only provided because some application programs | ||
82 | expect the API to be available when TLSv1.3 is supported. | ||
83 | Using these functions is strongly discouraged because they provide | ||
84 | marginal benefit in the first place even when implemented and | ||
85 | used as designed, because they have absurdly complicated semantics, | ||
86 | and because when they are used, inconspicuous oversights are likely | ||
87 | to cause serious security vulnerabilities. | ||
88 | .Pp | ||
89 | If these functions are used, other TLS implementations | ||
90 | may allow the transfer of application data during the initial handshake. | ||
91 | Even when used as designed, security of the connection is compromised; | ||
92 | in particular, application data is exchanged with unauthenticated peers, | ||
93 | and there is no forward secrecy. | ||
94 | Other downsides include an increased risk of replay attacks. | ||
95 | .Pp | ||
96 | .Fn SSL_CTX_set_max_early_data , | ||
97 | .Fn SSL_set_max_early_data , | ||
98 | and | ||
99 | .Fn SSL_SESSION_set_max_early_data | ||
100 | are intended to configure the maximum number of bytes per session | ||
101 | that can be transmitted during the handshake. | ||
102 | With LibreSSL, all arguments are ignored. | ||
103 | .Pp | ||
104 | An endpoint can attempt to send application data with | ||
105 | .Fn SSL_write_early_data | ||
106 | during the handshake. | ||
107 | With LibreSSL, such attempts always fail and set | ||
108 | .Pf * Fa written | ||
109 | to 0. | ||
110 | .Pp | ||
111 | A server can attempt to read application data from the client using | ||
112 | .Fn SSL_read_early_data | ||
113 | during the handshake. | ||
114 | With LibreSSL, no such data is ever accepted and | ||
115 | .Pf * Fa readbytes | ||
116 | is always set to 0. | ||
117 | .Sh RETURN VALUES | ||
118 | .Fn SSL_CTX_set_max_early_data , | ||
119 | .Fn SSL_set_max_early_data , | ||
120 | and | ||
121 | .Fn SSL_SESSION_set_max_early_data | ||
122 | return 1 for success or 0 for failure. | ||
123 | With LibreSSL, they always succeed. | ||
124 | .Pp | ||
125 | .Fn SSL_CTX_get_max_early_data , | ||
126 | .Fn SSL_get_max_early_data , | ||
127 | and | ||
128 | .Fn SSL_SESSION_get_max_early_data | ||
129 | return the maximum number of bytes of application data | ||
130 | that will be accepted from the peer during the handshake. | ||
131 | With LibreSSL, they always return 0. | ||
132 | .Pp | ||
133 | .Fn SSL_write_early_data | ||
134 | returns 1 for success or 0 for failure. | ||
135 | With LibreSSL, it always fails. | ||
136 | .Pp | ||
137 | With LibreSSL, | ||
138 | .Fn SSL_read_early_data | ||
139 | always returns | ||
140 | .Dv SSL_READ_EARLY_DATA_FINISH | ||
141 | on the server side and | ||
142 | .Dv SSL_READ_EARLY_DATA_ERROR | ||
143 | on the client side. | ||
144 | .Dv SSL_READ_EARLY_DATA_SUCCESS | ||
145 | can occur with other implementations, but not with LibreSSL. | ||
146 | .Pp | ||
147 | With LibreSSL, | ||
148 | .Fn SSL_get_early_data_status | ||
149 | always returns | ||
150 | .Dv SSL_EARLY_DATA_REJECTED . | ||
151 | With other implementations, it might also return | ||
152 | .Dv SSL_EARLY_DATA_NOT_SENT | ||
153 | or | ||
154 | .Dv SSL_EARLY_DATA_ACCEPTED . | ||
155 | .Sh SEE ALSO | ||
156 | .Xr ssl 3 , | ||
157 | .Xr SSL_read 3 , | ||
158 | .Xr SSL_write 3 | ||
159 | .Sh STANDARDS | ||
160 | RFC 8446: The Transport Layer Security (TLS) Protocol Version 1.3: | ||
161 | .Bl -tag -width "section 4.2.10" -compact | ||
162 | .It Section 2.3 | ||
163 | 0-RTT data | ||
164 | .It Section 4.2.10 | ||
165 | Early Data Indication | ||
166 | .It Section 8 | ||
167 | 0-RTT and Anti-Replay | ||
168 | .It Appendix E.5 | ||
169 | Replay Attacks on 0-RTT | ||
170 | .El | ||
171 | .Sh HISTORY | ||
172 | These functions first appeared in OpenSSL 1.1.1 | ||
173 | and have been available since | ||
174 | .Ox 7.0 . | ||
diff --git a/src/lib/libssl/man/SSL_renegotiate.3 b/src/lib/libssl/man/SSL_renegotiate.3 deleted file mode 100644 index 8188d37323..0000000000 --- a/src/lib/libssl/man/SSL_renegotiate.3 +++ /dev/null | |||
@@ -1,166 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_renegotiate.3,v 1.9 2019/06/12 09:36:30 schwarze Exp $ | ||
2 | .\" OpenSSL SSL_key_update.pod 4fbfe86a Feb 16 17:04:40 2017 +0000 | ||
3 | .\" | ||
4 | .\" This file is a derived work. | ||
5 | .\" Some parts are covered by the following Copyright and license: | ||
6 | .\" | ||
7 | .\" Copyright (c) 2016, 2017 Ingo Schwarze <schwarze@openbsd.org> | ||
8 | .\" | ||
9 | .\" Permission to use, copy, modify, and distribute this software for any | ||
10 | .\" purpose with or without fee is hereby granted, provided that the above | ||
11 | .\" copyright notice and this permission notice appear in all copies. | ||
12 | .\" | ||
13 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
14 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
15 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
16 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
17 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
18 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
19 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
20 | .\" | ||
21 | .\" Other parts were written by Matt Caswell <matt@openssl.org>. | ||
22 | .\" Copyright (c) 2017 The OpenSSL Project. All rights reserved. | ||
23 | .\" | ||
24 | .\" Redistribution and use in source and binary forms, with or without | ||
25 | .\" modification, are permitted provided that the following conditions | ||
26 | .\" are met: | ||
27 | .\" | ||
28 | .\" 1. Redistributions of source code must retain the above copyright | ||
29 | .\" notice, this list of conditions and the following disclaimer. | ||
30 | .\" | ||
31 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
32 | .\" notice, this list of conditions and the following disclaimer in | ||
33 | .\" the documentation and/or other materials provided with the | ||
34 | .\" distribution. | ||
35 | .\" | ||
36 | .\" 3. All advertising materials mentioning features or use of this | ||
37 | .\" software must display the following acknowledgment: | ||
38 | .\" "This product includes software developed by the OpenSSL Project | ||
39 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
40 | .\" | ||
41 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
42 | .\" endorse or promote products derived from this software without | ||
43 | .\" prior written permission. For written permission, please contact | ||
44 | .\" openssl-core@openssl.org. | ||
45 | .\" | ||
46 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
47 | .\" nor may "OpenSSL" appear in their names without prior written | ||
48 | .\" permission of the OpenSSL Project. | ||
49 | .\" | ||
50 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
51 | .\" acknowledgment: | ||
52 | .\" "This product includes software developed by the OpenSSL Project | ||
53 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
54 | .\" | ||
55 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
56 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
57 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
58 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
59 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
60 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
61 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
62 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
63 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
64 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
65 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
66 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
67 | .\" | ||
68 | .Dd $Mdocdate: June 12 2019 $ | ||
69 | .Dt SSL_RENEGOTIATE 3 | ||
70 | .Os | ||
71 | .Sh NAME | ||
72 | .Nm SSL_renegotiate , | ||
73 | .Nm SSL_renegotiate_abbreviated , | ||
74 | .Nm SSL_renegotiate_pending | ||
75 | .Nd initiate a new TLS handshake | ||
76 | .Sh SYNOPSIS | ||
77 | .In openssl/ssl.h | ||
78 | .Ft int | ||
79 | .Fo SSL_renegotiate | ||
80 | .Fa "SSL *ssl" | ||
81 | .Fc | ||
82 | .Ft int | ||
83 | .Fo SSL_renegotiate_abbreviated | ||
84 | .Fa "SSL *ssl" | ||
85 | .Fc | ||
86 | .Ft int | ||
87 | .Fo SSL_renegotiate_pending | ||
88 | .Fa "SSL *ssl" | ||
89 | .Fc | ||
90 | .Sh DESCRIPTION | ||
91 | When called from the client side, | ||
92 | .Fn SSL_renegotiate | ||
93 | schedules a completely new handshake over an existing TLS connection. | ||
94 | The next time an I/O operation such as | ||
95 | .Fn SSL_read | ||
96 | or | ||
97 | .Fn SSL_write | ||
98 | takes place on the connection, a check is performed to confirm | ||
99 | that it is a suitable time to start a renegotiation. | ||
100 | If so, a new handshake is initiated immediately. | ||
101 | An existing session associated with the connection is not resumed. | ||
102 | .Pp | ||
103 | This function is automatically called by | ||
104 | .Xr SSL_read 3 | ||
105 | and | ||
106 | .Xr SSL_write 3 | ||
107 | whenever the renegotiation byte count set by | ||
108 | .Xr BIO_set_ssl_renegotiate_bytes 3 | ||
109 | or the timeout set by | ||
110 | .Xr BIO_set_ssl_renegotiate_timeout 3 | ||
111 | are exceeded. | ||
112 | .Pp | ||
113 | When called from the client side, | ||
114 | .Fn SSL_renegotiate_abbreviated | ||
115 | is similar to | ||
116 | .Fn SSL_renegotiate | ||
117 | except that resuming the session associated with the current | ||
118 | connection is attempted in the new handshake. | ||
119 | .Pp | ||
120 | When called from the server side, | ||
121 | .Fn SSL_renegotiate | ||
122 | and | ||
123 | .Fn SSL_renegotiate_abbreviated | ||
124 | behave identically. | ||
125 | They both schedule a request for a new handshake to be sent to the client. | ||
126 | The next time an I/O operation is performed, the same checks as on | ||
127 | the client side are performed and then, if appropriate, the request | ||
128 | is sent. | ||
129 | The client may or may not respond with a new handshake and it may | ||
130 | or may not attempt to resume an existing session. | ||
131 | If a new handshake is started, it is handled transparently during | ||
132 | any I/O function. | ||
133 | .Pp | ||
134 | If a LibreSSL client receives a renegotiation request from a server, | ||
135 | it is also handled transparently during any I/O function. | ||
136 | The client attempts to resume the current session in the new | ||
137 | handshake. | ||
138 | For historical reasons, DTLS clients do not attempt to resume | ||
139 | the session in the new handshake. | ||
140 | .Sh RETURN VALUES | ||
141 | .Fn SSL_renegotiate | ||
142 | and | ||
143 | .Fn SSL_renegotiate_abbreviated | ||
144 | return 1 on success or 0 on error. | ||
145 | .Pp | ||
146 | .Fn SSL_renegotiate_pending | ||
147 | returns 1 if a renegotiation or renegotiation request has been | ||
148 | scheduled but not yet acted on, or 0 otherwise. | ||
149 | .Sh SEE ALSO | ||
150 | .Xr ssl 3 , | ||
151 | .Xr SSL_do_handshake 3 , | ||
152 | .Xr SSL_num_renegotiations 3 , | ||
153 | .Xr SSL_read 3 , | ||
154 | .Xr SSL_write 3 | ||
155 | .Sh HISTORY | ||
156 | .Fn SSL_renegotiate | ||
157 | first appeared in SSLeay 0.8.0 and has been available since | ||
158 | .Ox 2.4 . | ||
159 | .Pp | ||
160 | .Fn SSL_renegotiate_pending | ||
161 | first appeared in OpenSSL 0.9.7 and has been available since | ||
162 | .Ox 3.2 . | ||
163 | .Pp | ||
164 | .Fn SSL_renegotiate_abbreviated | ||
165 | first appeared in OpenSSL 1.0.1 and has been available since | ||
166 | .Ox 5.3 . | ||
diff --git a/src/lib/libssl/man/SSL_rstate_string.3 b/src/lib/libssl/man/SSL_rstate_string.3 deleted file mode 100644 index 99613ba3c0..0000000000 --- a/src/lib/libssl/man/SSL_rstate_string.3 +++ /dev/null | |||
@@ -1,108 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_rstate_string.3,v 1.4 2018/03/27 17:35:50 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 27 2018 $ | ||
52 | .Dt SSL_RSTATE_STRING 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_rstate_string , | ||
56 | .Nm SSL_rstate_string_long | ||
57 | .Nd get textual description of state of an SSL object during read operation | ||
58 | .Sh SYNOPSIS | ||
59 | .In openssl/ssl.h | ||
60 | .Ft const char * | ||
61 | .Fn SSL_rstate_string "SSL *ssl" | ||
62 | .Ft const char * | ||
63 | .Fn SSL_rstate_string_long "SSL *ssl" | ||
64 | .Sh DESCRIPTION | ||
65 | .Fn SSL_rstate_string | ||
66 | returns a 2-letter string indicating the current read state of the | ||
67 | .Vt SSL | ||
68 | object | ||
69 | .Fa ssl . | ||
70 | .Pp | ||
71 | .Fn SSL_rstate_string_long | ||
72 | returns a string indicating the current read state of the | ||
73 | .Vt SSL | ||
74 | object | ||
75 | .Fa ssl . | ||
76 | .Pp | ||
77 | When performing a read operation, the SSL/TLS engine must parse the record, | ||
78 | consisting of header and body. | ||
79 | When working in a blocking environment, | ||
80 | .Fn SSL_rstate_string[_long] | ||
81 | should always return | ||
82 | .Qo RD Qc Ns / Ns Qo read done Qc . | ||
83 | .Pp | ||
84 | This function should only seldom be needed in applications. | ||
85 | .Sh RETURN VALUES | ||
86 | .Fn SSL_rstate_string | ||
87 | and | ||
88 | .Fn SSL_rstate_string_long | ||
89 | can return the following values: | ||
90 | .Bl -tag -width Ds | ||
91 | .It Qo RH Qc Ns / Ns Qo read header Qc | ||
92 | The header of the record is being evaluated. | ||
93 | .It Qo RB Qc Ns / Ns Qo read body Qc | ||
94 | The body of the record is being evaluated. | ||
95 | .It Qo RD Qc Ns / Ns Qo read done Qc | ||
96 | The record has been completely processed. | ||
97 | .It Qo unknown Qc Ns / Ns Qo unknown Qc | ||
98 | The read state is unknown. | ||
99 | This should never happen. | ||
100 | .El | ||
101 | .Sh SEE ALSO | ||
102 | .Xr ssl 3 | ||
103 | .Sh HISTORY | ||
104 | .Fn SSL_rstate_string | ||
105 | and | ||
106 | .Fn SSL_rstate_string_long | ||
107 | first appeared in SSLeay 0.6.0 and have been available since | ||
108 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_session_reused.3 b/src/lib/libssl/man/SSL_session_reused.3 deleted file mode 100644 index add61a904b..0000000000 --- a/src/lib/libssl/man/SSL_session_reused.3 +++ /dev/null | |||
@@ -1,84 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_session_reused.3,v 1.6 2019/06/12 09:36:30 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: June 12 2019 $ | ||
52 | .Dt SSL_SESSION_REUSED 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_session_reused | ||
56 | .Nd query whether a reused session was negotiated during handshake | ||
57 | .Sh SYNOPSIS | ||
58 | .In openssl/ssl.h | ||
59 | .Ft int | ||
60 | .Fn SSL_session_reused "SSL *ssl" | ||
61 | .Sh DESCRIPTION | ||
62 | Query whether a reused session was negotiated during the handshake. | ||
63 | .Pp | ||
64 | During the negotiation, a client can propose to reuse a session. | ||
65 | The server then looks up the session in its cache. | ||
66 | If both client and server agree on the session, | ||
67 | it will be reused and a flag is set that can be queried by the application. | ||
68 | .Sh RETURN VALUES | ||
69 | The following return values can occur: | ||
70 | .Bl -tag -width Ds | ||
71 | .It 0 | ||
72 | A new session was negotiated. | ||
73 | .It 1 | ||
74 | A session was reused. | ||
75 | .El | ||
76 | .Sh SEE ALSO | ||
77 | .Xr ssl 3 , | ||
78 | .Xr SSL_ctrl 3 , | ||
79 | .Xr SSL_CTX_set_session_cache_mode 3 , | ||
80 | .Xr SSL_set_session 3 | ||
81 | .Sh HISTORY | ||
82 | .Fn SSL_session_reused | ||
83 | first appeared in SSLeay 0.8.0 and has been available since | ||
84 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_set1_host.3 b/src/lib/libssl/man/SSL_set1_host.3 deleted file mode 100644 index 2a3935c3f2..0000000000 --- a/src/lib/libssl/man/SSL_set1_host.3 +++ /dev/null | |||
@@ -1,172 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_set1_host.3,v 1.4 2021/03/31 16:56:46 tb Exp $ | ||
2 | .\" selective merge up to: OpenSSL 6328d367 Jul 4 21:58:30 2020 +0200 | ||
3 | .\" | ||
4 | .\" This file was written by Viktor Dukhovni <viktor@openssl.org> | ||
5 | .\" Copyright (c) 2015 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 31 2021 $ | ||
52 | .Dt SSL_SET1_HOST 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_set1_host , | ||
56 | .Nm SSL_set_hostflags , | ||
57 | .Nm SSL_get0_peername | ||
58 | .Nd SSL server verification parameters | ||
59 | .Sh SYNOPSIS | ||
60 | .In openssl/ssl.h | ||
61 | .Ft int | ||
62 | .Fo SSL_set1_host | ||
63 | .Fa "SSL *ssl" | ||
64 | .Fa "const char *hostname" | ||
65 | .Fc | ||
66 | .Ft void | ||
67 | .Fo SSL_set_hostflags | ||
68 | .Fa "SSL *ssl" | ||
69 | .Fa "unsigned int flags" | ||
70 | .Fc | ||
71 | .Ft const char * | ||
72 | .Fo SSL_get0_peername | ||
73 | .Fa "SSL *ssl" | ||
74 | .Fc | ||
75 | .Sh DESCRIPTION | ||
76 | .Fn SSL_set1_host | ||
77 | configures a server hostname check in the | ||
78 | .Fa ssl | ||
79 | client, setting the expected DNS hostname to | ||
80 | .Fa hostname | ||
81 | and clearing any previously specified hostname. | ||
82 | If | ||
83 | .Fa hostname | ||
84 | is | ||
85 | .Dv NULL | ||
86 | or the empty string, name checks are not performed on the peer certificate. | ||
87 | If a nonempty | ||
88 | .Fa hostname | ||
89 | is specified, certificate verification automatically checks the peer | ||
90 | hostname via | ||
91 | .Xr X509_check_host 3 | ||
92 | with | ||
93 | .Fa flags | ||
94 | set to 0. | ||
95 | .Pp | ||
96 | .Fn SSL_set_hostflags | ||
97 | sets the flags that will be passed to | ||
98 | .Xr X509_check_host 3 | ||
99 | when name checks are applicable, | ||
100 | by default the flags value is 0. | ||
101 | See | ||
102 | .Xr X509_check_host 3 | ||
103 | for the list of available flags and their meaning. | ||
104 | .Pp | ||
105 | .Fn SSL_get0_peername | ||
106 | returns the DNS hostname or subject CommonName from the peer certificate | ||
107 | that matched one of the reference identifiers. | ||
108 | Unless wildcard matching is disabled, the name matched in the peer | ||
109 | certificate may be a wildcard name. | ||
110 | A reference identifier starting with | ||
111 | .Sq \&. | ||
112 | indicates a parent domain prefix rather than a fixed name. | ||
113 | In this case, the matched peername may be a sub-domain | ||
114 | of the reference identifier. | ||
115 | The returned string is owned by the library and is no longer valid | ||
116 | once the associated | ||
117 | .Fa ssl | ||
118 | object is cleared or freed, or if a renegotiation takes place. | ||
119 | Applications must not free the return value. | ||
120 | .Pp | ||
121 | SSL clients are advised to use these functions in preference to | ||
122 | explicitly calling | ||
123 | .Xr X509_check_host 3 . | ||
124 | .Sh RETURN VALUES | ||
125 | .Fn SSL_set1_host | ||
126 | returns 1 for success or 0 for failure. | ||
127 | .Pp | ||
128 | .Fn SSL_get0_peername | ||
129 | returns the matched peername or | ||
130 | .Dv NULL | ||
131 | if peername verification is not applicable | ||
132 | or no trusted peername was matched. | ||
133 | Use | ||
134 | .Xr SSL_get_verify_result 3 | ||
135 | to determine whether verification succeeded. | ||
136 | .Sh EXAMPLES | ||
137 | The calls below check the hostname. | ||
138 | Wildcards are supported, but they must match the entire label. | ||
139 | The actual name matched in the certificate (which might be a wildcard) | ||
140 | is retrieved, and must be copied by the application if it is to be | ||
141 | retained beyond the lifetime of the SSL connection. | ||
142 | .Bd -literal | ||
143 | if (!SSL_set1_host(ssl, "smtp.example.com")) | ||
144 | /* error */ | ||
145 | |||
146 | /* XXX: Perform SSL_connect() handshake and handle errors here */ | ||
147 | |||
148 | if (SSL_get_verify_result(ssl) == X509_V_OK) { | ||
149 | const char *peername = SSL_get0_peername(ssl); | ||
150 | |||
151 | if (peername != NULL) | ||
152 | /* Name checks were in scope and matched the peername */ | ||
153 | } | ||
154 | .Ed | ||
155 | .Sh SEE ALSO | ||
156 | .Xr ssl 3 , | ||
157 | .Xr SSL_CTX_set_verify 3 , | ||
158 | .Xr SSL_get_peer_certificate 3 , | ||
159 | .Xr SSL_get_verify_result 3 , | ||
160 | .Xr X509_check_host 3 , | ||
161 | .Xr X509_VERIFY_PARAM_set1_host 3 | ||
162 | .Sh HISTORY | ||
163 | All three functions first appeared in OpenSSL 1.1.0. | ||
164 | .Fn SSL_set1_host | ||
165 | has been available since | ||
166 | .Ox 6.5 , | ||
167 | and | ||
168 | .Fn SSL_set_hostflags | ||
169 | and | ||
170 | .Fn SSL_get0_peername | ||
171 | since | ||
172 | .Ox 6.9 . | ||
diff --git a/src/lib/libssl/man/SSL_set1_param.3 b/src/lib/libssl/man/SSL_set1_param.3 deleted file mode 100644 index cd8ad40ad0..0000000000 --- a/src/lib/libssl/man/SSL_set1_param.3 +++ /dev/null | |||
@@ -1,137 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_set1_param.3,v 1.6 2022/09/10 10:22:46 jsg Exp $ | ||
2 | .\" full merge up to: | ||
3 | .\" OpenSSL man3/SSL_CTX_get0_param 99d63d46 Oct 26 13:56:48 2016 -0400 | ||
4 | .\" | ||
5 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | ||
6 | .\" Copyright (c) 2015 The OpenSSL Project. All rights reserved. | ||
7 | .\" | ||
8 | .\" Redistribution and use in source and binary forms, with or without | ||
9 | .\" modification, are permitted provided that the following conditions | ||
10 | .\" are met: | ||
11 | .\" | ||
12 | .\" 1. Redistributions of source code must retain the above copyright | ||
13 | .\" notice, this list of conditions and the following disclaimer. | ||
14 | .\" | ||
15 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
16 | .\" notice, this list of conditions and the following disclaimer in | ||
17 | .\" the documentation and/or other materials provided with the | ||
18 | .\" distribution. | ||
19 | .\" | ||
20 | .\" 3. All advertising materials mentioning features or use of this | ||
21 | .\" software must display the following acknowledgment: | ||
22 | .\" "This product includes software developed by the OpenSSL Project | ||
23 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
24 | .\" | ||
25 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | .\" endorse or promote products derived from this software without | ||
27 | .\" prior written permission. For written permission, please contact | ||
28 | .\" openssl-core@openssl.org. | ||
29 | .\" | ||
30 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
31 | .\" nor may "OpenSSL" appear in their names without prior written | ||
32 | .\" permission of the OpenSSL Project. | ||
33 | .\" | ||
34 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
35 | .\" acknowledgment: | ||
36 | .\" "This product includes software developed by the OpenSSL Project | ||
37 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
38 | .\" | ||
39 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | .\" | ||
52 | .Dd $Mdocdate: September 10 2022 $ | ||
53 | .Dt SSL_SET1_PARAM 3 | ||
54 | .Os | ||
55 | .Sh NAME | ||
56 | .Nm SSL_CTX_get0_param , | ||
57 | .Nm SSL_get0_param , | ||
58 | .Nm SSL_CTX_set1_param , | ||
59 | .Nm SSL_set1_param | ||
60 | .Nd get and set verification parameters | ||
61 | .Sh SYNOPSIS | ||
62 | .In openssl/ssl.h | ||
63 | .Ft X509_VERIFY_PARAM * | ||
64 | .Fo SSL_CTX_get0_param | ||
65 | .Fa "SSL_CTX *ctx" | ||
66 | .Fc | ||
67 | .Ft X509_VERIFY_PARAM * | ||
68 | .Fo SSL_get0_param | ||
69 | .Fa "SSL *ssl" | ||
70 | .Fc | ||
71 | .Ft int | ||
72 | .Fo SSL_CTX_set1_param | ||
73 | .Fa "SSL_CTX *ctx" | ||
74 | .Fa "X509_VERIFY_PARAM *vpm" | ||
75 | .Fc | ||
76 | .Ft int | ||
77 | .Fo SSL_set1_param | ||
78 | .Fa "SSL *ssl" | ||
79 | .Fa "X509_VERIFY_PARAM *vpm" | ||
80 | .Fc | ||
81 | .Sh DESCRIPTION | ||
82 | .Fn SSL_CTX_get0_param | ||
83 | and | ||
84 | .Fn SSL_get0_param | ||
85 | retrieve an internal pointer to the verification parameters for | ||
86 | .Fa ctx | ||
87 | or | ||
88 | .Fa ssl , | ||
89 | respectively. | ||
90 | The returned pointer must not be freed by the calling application, | ||
91 | but the application can modify the parameters pointed to, | ||
92 | to suit its needs: for example to add a hostname check. | ||
93 | .Pp | ||
94 | .Fn SSL_CTX_set1_param | ||
95 | and | ||
96 | .Fn SSL_set1_param | ||
97 | set the verification parameters to | ||
98 | .Fa vpm | ||
99 | for | ||
100 | .Fa ctx | ||
101 | or | ||
102 | .Fa ssl . | ||
103 | .Sh RETURN VALUES | ||
104 | .Fn SSL_CTX_get0_param | ||
105 | and | ||
106 | .Fn SSL_get0_param | ||
107 | return a pointer to an | ||
108 | .Vt X509_VERIFY_PARAM | ||
109 | structure. | ||
110 | .Pp | ||
111 | .Fn SSL_CTX_set1_param | ||
112 | and | ||
113 | .Fn SSL_set1_param | ||
114 | return 1 for success or 0 for failure. | ||
115 | .Sh EXAMPLES | ||
116 | Check that the hostname matches | ||
117 | .Pa www.foo.com | ||
118 | in the peer certificate: | ||
119 | .Bd -literal -offset indent | ||
120 | X509_VERIFY_PARAM *vpm = SSL_get0_param(ssl); | ||
121 | X509_VERIFY_PARAM_set1_host(vpm, "www.foo.com", 0); | ||
122 | .Ed | ||
123 | .Sh SEE ALSO | ||
124 | .Xr ssl 3 , | ||
125 | .Xr X509_VERIFY_PARAM_set_flags 3 | ||
126 | .Sh HISTORY | ||
127 | .Fn SSL_CTX_set1_param | ||
128 | and | ||
129 | .Fn SSL_set1_param | ||
130 | first appeared in OpenSSL 1.0.0 and have been available since | ||
131 | .Ox 4.9 . | ||
132 | .Pp | ||
133 | .Fn SSL_CTX_get0_param | ||
134 | and | ||
135 | .Fn SSL_get0_param | ||
136 | first appeared in OpenSSL 1.0.2 and have been available since | ||
137 | .Ox 6.3 . | ||
diff --git a/src/lib/libssl/man/SSL_set_SSL_CTX.3 b/src/lib/libssl/man/SSL_set_SSL_CTX.3 deleted file mode 100644 index 2abaefb292..0000000000 --- a/src/lib/libssl/man/SSL_set_SSL_CTX.3 +++ /dev/null | |||
@@ -1,67 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_set_SSL_CTX.3,v 1.4 2022/07/13 22:05:53 schwarze Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 2020 Ingo Schwarze <schwarze@openbsd.org> | ||
4 | .\" | ||
5 | .\" Permission to use, copy, modify, and distribute this software for any | ||
6 | .\" purpose with or without fee is hereby granted, provided that the above | ||
7 | .\" copyright notice and this permission notice appear in all copies. | ||
8 | .\" | ||
9 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | .\" | ||
17 | .Dd $Mdocdate: July 13 2022 $ | ||
18 | .Dt SSL_SET_SSL_CTX 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm SSL_set_SSL_CTX | ||
22 | .Nd modify an SSL connection object to use another context | ||
23 | .Sh SYNOPSIS | ||
24 | .In openssl/ssl.h | ||
25 | .Ft SSL_CTX * | ||
26 | .Fo SSL_set_SSL_CTX | ||
27 | .Fa "SSL *ssl" | ||
28 | .Fa "SSL_CTX* ctx" | ||
29 | .Fc | ||
30 | .Sh DESCRIPTION | ||
31 | .Fn SSL_set_SSL_CTX | ||
32 | causes | ||
33 | .Fa ssl | ||
34 | to use the context | ||
35 | .Fa ctx . | ||
36 | .Pp | ||
37 | If | ||
38 | .Fa ctx | ||
39 | is | ||
40 | .Dv NULL , | ||
41 | .Fa ssl | ||
42 | reverts to using the context that it was initially created from with | ||
43 | .Xr SSL_new 3 . | ||
44 | .Pp | ||
45 | If | ||
46 | .Fa ssl | ||
47 | already uses | ||
48 | .Fa ctx , | ||
49 | no action occurs. | ||
50 | .Sh RETURN VALUES | ||
51 | .Fn SSL_set_SSL_CTX | ||
52 | returns an internal pointer to the context that | ||
53 | .Fa ssl | ||
54 | is using as a result of the call, or | ||
55 | .Dv NULL | ||
56 | if memory allocation fails. | ||
57 | .Sh SEE ALSO | ||
58 | .Xr ssl 3 , | ||
59 | .Xr SSL_clear 3 , | ||
60 | .Xr SSL_CTX_new 3 , | ||
61 | .Xr SSL_get_SSL_CTX 3 , | ||
62 | .Xr SSL_new 3 , | ||
63 | .Xr SSL_set_security_level 3 | ||
64 | .Sh HISTORY | ||
65 | .Fn SSL_set_SSL_CTX | ||
66 | first appeared in OpenSSL 0.9.8f and has been available since | ||
67 | .Ox 4.5 . | ||
diff --git a/src/lib/libssl/man/SSL_set_bio.3 b/src/lib/libssl/man/SSL_set_bio.3 deleted file mode 100644 index e727f442d6..0000000000 --- a/src/lib/libssl/man/SSL_set_bio.3 +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_set_bio.3,v 1.6 2020/10/08 18:21:30 tb Exp $ | ||
2 | .\" OpenSSL acb5b343 Sep 16 16:00:38 2000 +0000 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2000 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: October 8 2020 $ | ||
52 | .Dt SSL_SET_BIO 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_set_bio | ||
56 | .Nd connect the SSL object with a BIO | ||
57 | .Sh SYNOPSIS | ||
58 | .In openssl/ssl.h | ||
59 | .Ft void | ||
60 | .Fn SSL_set_bio "SSL *ssl" "BIO *rbio" "BIO *wbio" | ||
61 | .Sh DESCRIPTION | ||
62 | .Fn SSL_set_bio | ||
63 | connects the | ||
64 | .Vt BIO Ns | ||
65 | s | ||
66 | .Fa rbio | ||
67 | and | ||
68 | .Fa wbio | ||
69 | for the read and write operations of the TLS/SSL (encrypted) side of | ||
70 | .Fa ssl . | ||
71 | .Pp | ||
72 | The SSL engine inherits the behaviour of | ||
73 | .Fa rbio | ||
74 | and | ||
75 | .Fa wbio , | ||
76 | respectively. | ||
77 | If a | ||
78 | .Vt BIO | ||
79 | is non-blocking, the | ||
80 | .Fa ssl | ||
81 | will also have non-blocking behaviour. | ||
82 | .Pp | ||
83 | If there was already a | ||
84 | .Vt BIO | ||
85 | connected to | ||
86 | .Fa ssl , | ||
87 | .Xr BIO_free 3 | ||
88 | will be called (for both the reading and writing side, if different). | ||
89 | .Sh SEE ALSO | ||
90 | .Xr BIO_new 3 , | ||
91 | .Xr ssl 3 , | ||
92 | .Xr SSL_accept 3 , | ||
93 | .Xr SSL_connect 3 , | ||
94 | .Xr SSL_get_rbio 3 , | ||
95 | .Xr SSL_shutdown 3 | ||
96 | .Sh HISTORY | ||
97 | .Fn SSL_set_bio | ||
98 | first appeared in SSLeay 0.6.0 and has been available since | ||
99 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_set_connect_state.3 b/src/lib/libssl/man/SSL_set_connect_state.3 deleted file mode 100644 index c2072c4370..0000000000 --- a/src/lib/libssl/man/SSL_set_connect_state.3 +++ /dev/null | |||
@@ -1,153 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_set_connect_state.3,v 1.6 2018/03/27 17:35:50 schwarze Exp $ | ||
2 | .\" full merge up to OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 | ||
3 | .\" selective merge up to: OpenSSL dbd007d7 Jul 28 13:31:27 2017 +0800 | ||
4 | .\" | ||
5 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org> | ||
6 | .\" and Paul Yang <yang.yang@baishancloud.com>. | ||
7 | .\" Copyright (c) 2001, 2017 The OpenSSL Project. All rights reserved. | ||
8 | .\" | ||
9 | .\" Redistribution and use in source and binary forms, with or without | ||
10 | .\" modification, are permitted provided that the following conditions | ||
11 | .\" are met: | ||
12 | .\" | ||
13 | .\" 1. Redistributions of source code must retain the above copyright | ||
14 | .\" notice, this list of conditions and the following disclaimer. | ||
15 | .\" | ||
16 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
17 | .\" notice, this list of conditions and the following disclaimer in | ||
18 | .\" the documentation and/or other materials provided with the | ||
19 | .\" distribution. | ||
20 | .\" | ||
21 | .\" 3. All advertising materials mentioning features or use of this | ||
22 | .\" software must display the following acknowledgment: | ||
23 | .\" "This product includes software developed by the OpenSSL Project | ||
24 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
25 | .\" | ||
26 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
27 | .\" endorse or promote products derived from this software without | ||
28 | .\" prior written permission. For written permission, please contact | ||
29 | .\" openssl-core@openssl.org. | ||
30 | .\" | ||
31 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
32 | .\" nor may "OpenSSL" appear in their names without prior written | ||
33 | .\" permission of the OpenSSL Project. | ||
34 | .\" | ||
35 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
36 | .\" acknowledgment: | ||
37 | .\" "This product includes software developed by the OpenSSL Project | ||
38 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
39 | .\" | ||
40 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
41 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
42 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
43 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
44 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
45 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
46 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
47 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
48 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
49 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
50 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
51 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
52 | .\" | ||
53 | .Dd $Mdocdate: March 27 2018 $ | ||
54 | .Dt SSL_SET_CONNECT_STATE 3 | ||
55 | .Os | ||
56 | .Sh NAME | ||
57 | .Nm SSL_set_connect_state , | ||
58 | .Nm SSL_set_accept_state , | ||
59 | .Nm SSL_is_server | ||
60 | .Nd prepare SSL object to work in client or server mode | ||
61 | .Sh SYNOPSIS | ||
62 | .In openssl/ssl.h | ||
63 | .Ft void | ||
64 | .Fn SSL_set_connect_state "SSL *ssl" | ||
65 | .Ft void | ||
66 | .Fn SSL_set_accept_state "SSL *ssl" | ||
67 | .Ft int | ||
68 | .Fn SSL_is_server "const SSL *ssl" | ||
69 | .Sh DESCRIPTION | ||
70 | .Fn SSL_set_connect_state | ||
71 | sets | ||
72 | .Fa ssl | ||
73 | to work in client mode. | ||
74 | .Pp | ||
75 | .Fn SSL_set_accept_state | ||
76 | sets | ||
77 | .Fa ssl | ||
78 | to work in server mode. | ||
79 | .Pp | ||
80 | .Fn SSL_is_server | ||
81 | checks whether | ||
82 | .Fa ssl | ||
83 | is set to server mode. | ||
84 | .Pp | ||
85 | When the | ||
86 | .Vt SSL_CTX | ||
87 | object was created with | ||
88 | .Xr SSL_CTX_new 3 , | ||
89 | it was either assigned a dedicated client method, a dedicated server method, or | ||
90 | a generic method, that can be used for both client and server connections. | ||
91 | (The method might have been changed with | ||
92 | .Xr SSL_CTX_set_ssl_version 3 | ||
93 | or | ||
94 | .Xr SSL_set_ssl_method 3 . ) | ||
95 | .Pp | ||
96 | When beginning a new handshake, the SSL engine must know whether it must call | ||
97 | the connect (client) or accept (server) routines. | ||
98 | Even though it may be clear from the method chosen whether client or server | ||
99 | mode was requested, the handshake routines must be explicitly set. | ||
100 | .Pp | ||
101 | When using the | ||
102 | .Xr SSL_connect 3 | ||
103 | or | ||
104 | .Xr SSL_accept 3 | ||
105 | routines, the correct handshake routines are automatically set. | ||
106 | When performing a transparent negotiation using | ||
107 | .Xr SSL_write 3 | ||
108 | or | ||
109 | .Xr SSL_read 3 , | ||
110 | the handshake routines must be explicitly set in advance using either | ||
111 | .Fn SSL_set_connect_state | ||
112 | or | ||
113 | .Fn SSL_set_accept_state . | ||
114 | .Pp | ||
115 | If | ||
116 | .Fn SSL_is_server | ||
117 | is called before | ||
118 | .Fn SSL_set_connect_state | ||
119 | or | ||
120 | .Fn SSL_set_accept_state | ||
121 | was called either automatically or explicitly, | ||
122 | the result depends on what method was used when the | ||
123 | .Fa SSL_CTX | ||
124 | was created. | ||
125 | If a generic method or a dedicated server method was passed to | ||
126 | .Xr SSL_CTX_new 3 , | ||
127 | .Fn SSL_is_server | ||
128 | returns 1; otherwise, it returns 0. | ||
129 | .Sh RETURN VALUES | ||
130 | .Fn SSL_is_server | ||
131 | returns 1 if | ||
132 | .Fa ssl | ||
133 | is set to server mode or 0 if it is set to client mode. | ||
134 | .Sh SEE ALSO | ||
135 | .Xr ssl 3 , | ||
136 | .Xr SSL_accept 3 , | ||
137 | .Xr SSL_connect 3 , | ||
138 | .Xr SSL_CTX_new 3 , | ||
139 | .Xr SSL_CTX_set_ssl_version 3 , | ||
140 | .Xr SSL_do_handshake 3 , | ||
141 | .Xr SSL_new 3 , | ||
142 | .Xr SSL_read 3 , | ||
143 | .Xr SSL_write 3 | ||
144 | .Sh HISTORY | ||
145 | .Fn SSL_set_connect_state | ||
146 | and | ||
147 | .Fn SSL_set_accept_state | ||
148 | first appeared in SSLeay 0.6.0 and have been available since | ||
149 | .Ox 2.4 . | ||
150 | .Pp | ||
151 | .Fn SSL_is_server | ||
152 | first appeared in OpenSSL 1.0.2 and has been available since | ||
153 | .Ox 6.3 . | ||
diff --git a/src/lib/libssl/man/SSL_set_fd.3 b/src/lib/libssl/man/SSL_set_fd.3 deleted file mode 100644 index 7b9727e9ad..0000000000 --- a/src/lib/libssl/man/SSL_set_fd.3 +++ /dev/null | |||
@@ -1,129 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_set_fd.3,v 1.5 2018/03/27 17:35:50 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2000, 2013 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 27 2018 $ | ||
52 | .Dt SSL_SET_FD 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_set_fd , | ||
56 | .Nm SSL_set_rfd , | ||
57 | .Nm SSL_set_wfd | ||
58 | .Nd connect the SSL object with a file descriptor | ||
59 | .Sh SYNOPSIS | ||
60 | .In openssl/ssl.h | ||
61 | .Ft int | ||
62 | .Fn SSL_set_fd "SSL *ssl" "int fd" | ||
63 | .Ft int | ||
64 | .Fn SSL_set_rfd "SSL *ssl" "int fd" | ||
65 | .Ft int | ||
66 | .Fn SSL_set_wfd "SSL *ssl" "int fd" | ||
67 | .Sh DESCRIPTION | ||
68 | .Fn SSL_set_fd | ||
69 | sets the file descriptor | ||
70 | .Fa fd | ||
71 | as the input/output facility for the TLS/SSL (encrypted) side of | ||
72 | .Fa ssl . | ||
73 | .Fa fd | ||
74 | will typically be the socket file descriptor of a network connection. | ||
75 | .Pp | ||
76 | When performing the operation, a socket | ||
77 | .Vt BIO | ||
78 | is automatically created to interface between the | ||
79 | .Fa ssl | ||
80 | and | ||
81 | .Fa fd . | ||
82 | The | ||
83 | .Vt BIO | ||
84 | and hence the SSL engine inherit the behaviour of | ||
85 | .Fa fd . | ||
86 | If | ||
87 | .Fa fd | ||
88 | is non-blocking, the | ||
89 | .Fa ssl | ||
90 | will also have non-blocking behaviour. | ||
91 | .Pp | ||
92 | If there was already a | ||
93 | .Vt BIO | ||
94 | connected to | ||
95 | .Fa ssl , | ||
96 | .Xr BIO_free 3 | ||
97 | will be called (for both the reading and writing side, if different). | ||
98 | .Pp | ||
99 | .Fn SSL_set_rfd | ||
100 | and | ||
101 | .Fn SSL_set_wfd | ||
102 | perform the respective action, but only for the read channel or the write | ||
103 | channel, which can be set independently. | ||
104 | .Sh RETURN VALUES | ||
105 | The following return values can occur: | ||
106 | .Bl -tag -width Ds | ||
107 | .It 0 | ||
108 | The operation failed. | ||
109 | Check the error stack to find out why. | ||
110 | .It 1 | ||
111 | The operation succeeded. | ||
112 | .El | ||
113 | .Sh SEE ALSO | ||
114 | .Xr BIO_new 3 , | ||
115 | .Xr ssl 3 , | ||
116 | .Xr SSL_accept 3 , | ||
117 | .Xr SSL_connect 3 , | ||
118 | .Xr SSL_get_fd 3 , | ||
119 | .Xr SSL_set_bio 3 , | ||
120 | .Xr SSL_shutdown 3 | ||
121 | .Sh HISTORY | ||
122 | .Fn SSL_set_fd | ||
123 | appeared in SSLeay 0.4 or earlier. | ||
124 | .Fn SSL_set_rfd | ||
125 | and | ||
126 | .Fn SSL_set_wfd | ||
127 | first appeared in SSLeay 0.6.0. | ||
128 | These functions have been available since | ||
129 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_set_max_send_fragment.3 b/src/lib/libssl/man/SSL_set_max_send_fragment.3 deleted file mode 100644 index 7de087a743..0000000000 --- a/src/lib/libssl/man/SSL_set_max_send_fragment.3 +++ /dev/null | |||
@@ -1,97 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_set_max_send_fragment.3,v 1.5 2019/06/12 09:36:30 schwarze Exp $ | ||
2 | .\" OpenSSL doc/man3/SSL_CTX_set_split_send_fragment.pod | ||
3 | .\" OpenSSL 6782e5fd Oct 21 16:16:20 2016 +0100 | ||
4 | .\" | ||
5 | .\" This file was written by Matt Caswell <matt@openssl.org>. | ||
6 | .\" Copyright (c) 2016 The OpenSSL Project. All rights reserved. | ||
7 | .\" | ||
8 | .\" Redistribution and use in source and binary forms, with or without | ||
9 | .\" modification, are permitted provided that the following conditions | ||
10 | .\" are met: | ||
11 | .\" | ||
12 | .\" 1. Redistributions of source code must retain the above copyright | ||
13 | .\" notice, this list of conditions and the following disclaimer. | ||
14 | .\" | ||
15 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
16 | .\" notice, this list of conditions and the following disclaimer in | ||
17 | .\" the documentation and/or other materials provided with the | ||
18 | .\" distribution. | ||
19 | .\" | ||
20 | .\" 3. All advertising materials mentioning features or use of this | ||
21 | .\" software must display the following acknowledgment: | ||
22 | .\" "This product includes software developed by the OpenSSL Project | ||
23 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
24 | .\" | ||
25 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | .\" endorse or promote products derived from this software without | ||
27 | .\" prior written permission. For written permission, please contact | ||
28 | .\" openssl-core@openssl.org. | ||
29 | .\" | ||
30 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
31 | .\" nor may "OpenSSL" appear in their names without prior written | ||
32 | .\" permission of the OpenSSL Project. | ||
33 | .\" | ||
34 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
35 | .\" acknowledgment: | ||
36 | .\" "This product includes software developed by the OpenSSL Project | ||
37 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
38 | .\" | ||
39 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | .\" | ||
52 | .Dd $Mdocdate: June 12 2019 $ | ||
53 | .Dt SSL_SET_MAX_SEND_FRAGMENT 3 | ||
54 | .Os | ||
55 | .Sh NAME | ||
56 | .Nm SSL_CTX_set_max_send_fragment , | ||
57 | .Nm SSL_set_max_send_fragment | ||
58 | .Nd control fragment sizes | ||
59 | .Sh SYNOPSIS | ||
60 | .In openssl/ssl.h | ||
61 | .Ft long | ||
62 | .Fo SSL_CTX_set_max_send_fragment | ||
63 | .Fa "SSL_CTX *ctx" | ||
64 | .Fa "long m" | ||
65 | .Fc | ||
66 | .Ft long | ||
67 | .Fo SSL_set_max_send_fragment | ||
68 | .Fa "SSL *ssl" | ||
69 | .Fa "long m" | ||
70 | .Fc | ||
71 | .Sh DESCRIPTION | ||
72 | .Fn SSL_CTX_set_max_send_fragment | ||
73 | and | ||
74 | .Fn SSL_set_max_send_fragment | ||
75 | set the | ||
76 | .Sy max_send_fragment | ||
77 | parameter for SSL_CTX and SSL objects respectively. | ||
78 | This value restricts the amount of plaintext bytes that will be sent in | ||
79 | any one SSL/TLS record. | ||
80 | By default its value is SSL3_RT_MAX_PLAIN_LENGTH (16384). | ||
81 | These functions will only accept a value in the range 512 - | ||
82 | SSL3_RT_MAX_PLAIN_LENGTH. | ||
83 | .Pp | ||
84 | These functions are implemented using macros. | ||
85 | .Sh RETURN VALUES | ||
86 | These functions return 1 on success or 0 on failure. | ||
87 | .Sh SEE ALSO | ||
88 | .Xr ssl 3 , | ||
89 | .Xr SSL_ctrl 3 , | ||
90 | .Xr SSL_CTX_set_read_ahead 3 , | ||
91 | .Xr SSL_pending 3 | ||
92 | .Sh HISTORY | ||
93 | .Fn SSL_CTX_set_max_send_fragment | ||
94 | and | ||
95 | .Fn SSL_set_max_send_fragment | ||
96 | first appeared in OpenSSL 1.0.0 and have been available since | ||
97 | .Ox 4.9 . | ||
diff --git a/src/lib/libssl/man/SSL_set_psk_use_session_callback.3 b/src/lib/libssl/man/SSL_set_psk_use_session_callback.3 deleted file mode 100644 index 7f2bfcc010..0000000000 --- a/src/lib/libssl/man/SSL_set_psk_use_session_callback.3 +++ /dev/null | |||
@@ -1,86 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_set_psk_use_session_callback.3,v 1.1 2021/09/14 14:30:57 schwarze Exp $ | ||
2 | .\" OpenSSL man3/SSL_CTX_set_psk_client_callback.pod | ||
3 | .\" checked up to 24a535ea Sep 22 13:14:20 2020 +0100 | ||
4 | .\" | ||
5 | .\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org> | ||
6 | .\" | ||
7 | .\" Permission to use, copy, modify, and distribute this software for any | ||
8 | .\" purpose with or without fee is hereby granted, provided that the above | ||
9 | .\" copyright notice and this permission notice appear in all copies. | ||
10 | .\" | ||
11 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
12 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
13 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
14 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
15 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
16 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
17 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
18 | .\" | ||
19 | .Dd $Mdocdate: September 14 2021 $ | ||
20 | .Dt SSL_SET_PSK_USE_SESSION_CALLBACK 3 | ||
21 | .Os | ||
22 | .Sh NAME | ||
23 | .Nm SSL_set_psk_use_session_callback , | ||
24 | .Nm SSL_psk_use_session_cb_func | ||
25 | .Nd set TLS pre-shared key client callback | ||
26 | .Sh SYNOPSIS | ||
27 | .In openssl/ssl.h | ||
28 | .Ft typedef int | ||
29 | .Fo (*SSL_psk_use_session_cb_func) | ||
30 | .Fa "SSL *ssl" | ||
31 | .Fa "const EVP_MD *md" | ||
32 | .Fa "const unsigned char **id" | ||
33 | .Fa "size_t *idlen" | ||
34 | .Fa "SSL_SESSION **session" | ||
35 | .Fc | ||
36 | .Ft void | ||
37 | .Fo SSL_set_psk_use_session_callback | ||
38 | .Fa "SSL *ssl" | ||
39 | .Fa "SSL_psk_use_session_cb_func cb" | ||
40 | .Fc | ||
41 | .Sh DESCRIPTION | ||
42 | LibreSSL provides the stub function | ||
43 | .Fn SSL_set_psk_use_session_callback | ||
44 | to allow compiling application programs | ||
45 | that contain optional support for TLSv1.3 pre-shared keys. | ||
46 | .Pp | ||
47 | LibreSSL does not support TLS pre-shared keys, | ||
48 | and no action occurs when | ||
49 | .Fn SSL_set_psk_use_session_callback | ||
50 | is called. | ||
51 | In particular, both arguments are ignored. | ||
52 | During session negotiation, | ||
53 | LibreSSL never calls the callback | ||
54 | .Fa cb | ||
55 | and always behaves as if that callback succeeded and set the | ||
56 | .Pf * Fa session | ||
57 | pointer to | ||
58 | .Dv NULL . | ||
59 | That is, LibreSSL never sends a pre-shared key to the server | ||
60 | and never aborts the handshake for lack of a pre-shared key. | ||
61 | .Pp | ||
62 | With OpenSSL, a client application wishing to use TLSv1.3 pre-shared keys | ||
63 | can install a callback function | ||
64 | .Fa cb | ||
65 | using | ||
66 | .Fn SSL_set_psk_use_session_callback . | ||
67 | The OpenSSL library may call | ||
68 | .Fa cb | ||
69 | once or twice during session negotiation. | ||
70 | If the callback fails, OpenSSL aborts connection setup. | ||
71 | If the callback succeeds but sets the | ||
72 | .Pf * Fa session | ||
73 | pointer to | ||
74 | .Dv NULL , | ||
75 | OpenSSL continues the handshake | ||
76 | but does not send a pre-shared key to the server. | ||
77 | .Sh RETURN VALUES | ||
78 | The | ||
79 | .Fn SSL_psk_use_session_cb_func | ||
80 | callback is expected to return 1 on success or 0 on failure. | ||
81 | .Sh HISTORY | ||
82 | .Fn SSL_set_psk_use_session_callback | ||
83 | and | ||
84 | .Fn SSL_psk_use_session_cb_func | ||
85 | first appeared in OpenSSL 1.1.1 and have been available since | ||
86 | .Ox 7.0 . | ||
diff --git a/src/lib/libssl/man/SSL_set_session.3 b/src/lib/libssl/man/SSL_set_session.3 deleted file mode 100644 index 7d85f5ad0c..0000000000 --- a/src/lib/libssl/man/SSL_set_session.3 +++ /dev/null | |||
@@ -1,119 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_set_session.3,v 1.4 2018/03/27 17:35:50 schwarze Exp $ | ||
2 | .\" OpenSSL 05ea606a May 20 20:52:46 2016 -0400 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2000, 2001, 2016 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 27 2018 $ | ||
52 | .Dt SSL_SET_SESSION 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_set_session | ||
56 | .Nd set a TLS/SSL session to be used during TLS/SSL connect | ||
57 | .Sh SYNOPSIS | ||
58 | .In openssl/ssl.h | ||
59 | .Ft int | ||
60 | .Fn SSL_set_session "SSL *ssl" "SSL_SESSION *session" | ||
61 | .Sh DESCRIPTION | ||
62 | .Fn SSL_set_session | ||
63 | sets | ||
64 | .Fa session | ||
65 | to be used when the TLS/SSL connection is to be established. | ||
66 | .Fn SSL_set_session | ||
67 | is only useful for TLS/SSL clients. | ||
68 | When the session is set, the reference count of | ||
69 | .Fa session | ||
70 | is incremented | ||
71 | by 1. | ||
72 | If the session is not reused, the reference count is decremented again during | ||
73 | .Fn SSL_connect . | ||
74 | Whether the session was reused can be queried with the | ||
75 | .Xr SSL_session_reused 3 | ||
76 | call. | ||
77 | .Pp | ||
78 | If there is already a session set inside | ||
79 | .Fa ssl | ||
80 | (because it was set with | ||
81 | .Fn SSL_set_session | ||
82 | before or because the same | ||
83 | .Fa ssl | ||
84 | was already used for a connection), | ||
85 | .Xr SSL_SESSION_free 3 | ||
86 | will be called for that session. | ||
87 | .Pp | ||
88 | .Vt SSL_SESSION | ||
89 | objects keep internal link information about the session cache list when being | ||
90 | inserted into one | ||
91 | .Vt SSL_CTX | ||
92 | object's session cache. | ||
93 | One | ||
94 | .Vt SSL_SESSION | ||
95 | object, regardless of its reference count, must therefore only be used with one | ||
96 | .Vt SSL_CTX | ||
97 | object (and the | ||
98 | .Vt SSL | ||
99 | objects created from this | ||
100 | .Vt SSL_CTX | ||
101 | object). | ||
102 | .Sh RETURN VALUES | ||
103 | The following return values can occur: | ||
104 | .Bl -tag -width Ds | ||
105 | .It 0 | ||
106 | The operation failed; check the error stack to find out the reason. | ||
107 | .It 1 | ||
108 | The operation succeeded. | ||
109 | .El | ||
110 | .Sh SEE ALSO | ||
111 | .Xr ssl 3 , | ||
112 | .Xr SSL_CTX_set_session_cache_mode 3 , | ||
113 | .Xr SSL_get_session 3 , | ||
114 | .Xr SSL_SESSION_free 3 , | ||
115 | .Xr SSL_session_reused 3 | ||
116 | .Sh HISTORY | ||
117 | .Fn SSL_set_session | ||
118 | first appeared in SSLeay 0.5.2 and has been available since | ||
119 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_set_shutdown.3 b/src/lib/libssl/man/SSL_set_shutdown.3 deleted file mode 100644 index ef8c004f76..0000000000 --- a/src/lib/libssl/man/SSL_set_shutdown.3 +++ /dev/null | |||
@@ -1,138 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_set_shutdown.3,v 1.7 2024/12/19 06:45:21 jmc Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001, 2005 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: December 19 2024 $ | ||
52 | .Dt SSL_SET_SHUTDOWN 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_set_shutdown , | ||
56 | .Nm SSL_get_shutdown | ||
57 | .Nd manipulate shutdown state of an SSL connection | ||
58 | .Sh SYNOPSIS | ||
59 | .In openssl/ssl.h | ||
60 | .Ft void | ||
61 | .Fn SSL_set_shutdown "SSL *ssl" "int mode" | ||
62 | .Ft int | ||
63 | .Fn SSL_get_shutdown "const SSL *ssl" | ||
64 | .Sh DESCRIPTION | ||
65 | .Fn SSL_set_shutdown | ||
66 | sets the shutdown state of | ||
67 | .Fa ssl | ||
68 | to | ||
69 | .Fa mode . | ||
70 | .Pp | ||
71 | .Fn SSL_get_shutdown | ||
72 | returns the shutdown mode of | ||
73 | .Fa ssl . | ||
74 | .Pp | ||
75 | The shutdown state of an ssl connection is a bitmask of: | ||
76 | .Bl -tag -width Ds | ||
77 | .It 0 | ||
78 | No shutdown setting, yet. | ||
79 | .It Dv SSL_SENT_SHUTDOWN | ||
80 | A | ||
81 | .Dq close notify | ||
82 | shutdown alert was sent to the peer; the connection is being considered closed | ||
83 | and the session is closed and correct. | ||
84 | .It Dv SSL_RECEIVED_SHUTDOWN | ||
85 | A shutdown alert was received from the peer, either a normal | ||
86 | .Dq close notify | ||
87 | or a fatal error. | ||
88 | .El | ||
89 | .Pp | ||
90 | .Dv SSL_SENT_SHUTDOWN | ||
91 | and | ||
92 | .Dv SSL_RECEIVED_SHUTDOWN | ||
93 | can be set at the same time. | ||
94 | .Pp | ||
95 | The shutdown state of the connection is used to determine the state of the | ||
96 | .Fa ssl | ||
97 | session. | ||
98 | If the session is still open when | ||
99 | .Xr SSL_clear 3 | ||
100 | or | ||
101 | .Xr SSL_free 3 | ||
102 | is called, it is considered bad and removed according to RFC 2246. | ||
103 | The actual condition for a correctly closed session is | ||
104 | .Dv SSL_SENT_SHUTDOWN | ||
105 | (according to the TLS RFC, it is acceptable to only send the | ||
106 | .Dq close notify | ||
107 | alert but to not wait for the peer's answer when the underlying connection is | ||
108 | closed). | ||
109 | .Fn SSL_set_shutdown | ||
110 | can be used to set this state without sending a close alert to the peer (see | ||
111 | .Xr SSL_shutdown 3 ) . | ||
112 | .Pp | ||
113 | If a | ||
114 | .Dq close notify | ||
115 | was received, | ||
116 | .Dv SSL_RECEIVED_SHUTDOWN | ||
117 | will be set, but to set | ||
118 | .Dv SSL_SENT_SHUTDOWN | ||
119 | the application must still call | ||
120 | .Xr SSL_shutdown 3 | ||
121 | or | ||
122 | .Fn SSL_set_shutdown | ||
123 | itself. | ||
124 | .Sh RETURN VALUES | ||
125 | .Fn SSL_get_shutdown | ||
126 | returns the current setting. | ||
127 | .Sh SEE ALSO | ||
128 | .Xr ssl 3 , | ||
129 | .Xr SSL_clear 3 , | ||
130 | .Xr SSL_CTX_set_quiet_shutdown 3 , | ||
131 | .Xr SSL_free 3 , | ||
132 | .Xr SSL_shutdown 3 | ||
133 | .Sh HISTORY | ||
134 | .Fn SSL_set_shutdown | ||
135 | and | ||
136 | .Fn SSL_get_shutdown | ||
137 | first appeared in SSLeay 0.8.0 and have been available since | ||
138 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_set_tmp_ecdh.3 b/src/lib/libssl/man/SSL_set_tmp_ecdh.3 deleted file mode 100644 index 8fd2d9fd5b..0000000000 --- a/src/lib/libssl/man/SSL_set_tmp_ecdh.3 +++ /dev/null | |||
@@ -1,119 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_set_tmp_ecdh.3,v 1.6 2021/11/30 15:58:08 jsing Exp $ | ||
2 | .\" | ||
3 | .\" Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org> | ||
4 | .\" | ||
5 | .\" Permission to use, copy, modify, and distribute this software for any | ||
6 | .\" purpose with or without fee is hereby granted, provided that the above | ||
7 | .\" copyright notice and this permission notice appear in all copies. | ||
8 | .\" | ||
9 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
10 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
11 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
12 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
13 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
16 | .\" | ||
17 | .Dd $Mdocdate: November 30 2021 $ | ||
18 | .Dt SSL_SET_TMP_ECDH 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm SSL_set_tmp_ecdh , | ||
22 | .Nm SSL_CTX_set_tmp_ecdh , | ||
23 | .Nm SSL_set_ecdh_auto , | ||
24 | .Nm SSL_CTX_set_ecdh_auto , | ||
25 | .Nm SSL_set_tmp_ecdh_callback , | ||
26 | .Nm SSL_CTX_set_tmp_ecdh_callback | ||
27 | .Nd select a curve for ECDH ephemeral key exchange | ||
28 | .Sh SYNOPSIS | ||
29 | .In openssl/ssl.h | ||
30 | .Ft long | ||
31 | .Fo SSL_set_tmp_ecdh | ||
32 | .Fa "SSL *ssl" | ||
33 | .Fa "EC_KEY *ecdh" | ||
34 | .Fc | ||
35 | .Ft long | ||
36 | .Fo SSL_CTX_set_tmp_ecdh | ||
37 | .Fa "SSL_CTX *ctx" | ||
38 | .Fa "EC_KEY *ecdh" | ||
39 | .Fc | ||
40 | .Ft long | ||
41 | .Fo SSL_set_ecdh_auto | ||
42 | .Fa "SSL *ssl" | ||
43 | .Fa "int state" | ||
44 | .Fc | ||
45 | .Ft long | ||
46 | .Fo SSL_CTX_set_ecdh_auto | ||
47 | .Fa "SSL_CTX *ctx" | ||
48 | .Fa "int state" | ||
49 | .Fc | ||
50 | .Ft void | ||
51 | .Fo SSL_set_tmp_ecdh_callback | ||
52 | .Fa "SSL *ssl" | ||
53 | .Fa "EC_KEY *(*ecdh)(SSL *ssl, int is_export, int keylength)" | ||
54 | .Fc | ||
55 | .Ft void | ||
56 | .Fo SSL_CTX_set_tmp_ecdh_callback | ||
57 | .Fa "SSL_CTX *ctx" | ||
58 | .Fa "EC_KEY *(*ecdh)(SSL *ssl, int is_export, int keylength)" | ||
59 | .Fc | ||
60 | .Sh DESCRIPTION | ||
61 | Automatic EC curve selection and generation is always enabled in | ||
62 | LibreSSL, and applications cannot manually provide EC keys for use | ||
63 | with ECDH key exchange. | ||
64 | .Pp | ||
65 | The only remaining effect of | ||
66 | .Fn SSL_set_tmp_ecdh | ||
67 | is that the curve of the given | ||
68 | .Fa ecdh | ||
69 | key becomes the only curve enabled for the | ||
70 | .Fa ssl | ||
71 | connection, so it is equivalent to calling | ||
72 | .Xr SSL_set1_groups_list 3 | ||
73 | with the same single curve name. | ||
74 | .Pp | ||
75 | .Fn SSL_CTX_set_tmp_ecdh | ||
76 | has the same effect on all connections that will be created from | ||
77 | .Fa ctx | ||
78 | in the future. | ||
79 | .Pp | ||
80 | The functions | ||
81 | .Fn SSL_set_ecdh_auto , | ||
82 | .Fn SSL_CTX_set_ecdh_auto , | ||
83 | .Fn SSL_set_tmp_ecdh_callback , | ||
84 | and | ||
85 | .Fn SSL_CTX_set_tmp_ecdh_callback | ||
86 | are deprecated and have no effect. | ||
87 | .Sh RETURN VALUES | ||
88 | .Fn SSL_set_tmp_ecdh | ||
89 | and | ||
90 | .Fn SSL_CTX_set_tmp_ecdh | ||
91 | return 1 on success or 0 on failure. | ||
92 | .Pp | ||
93 | .Fn SSL_set_ecdh_auto , | ||
94 | .Fn SSL_CTX_set_ecdh_auto , | ||
95 | .Fn SSL_set_tmp_ecdh_callback , | ||
96 | and | ||
97 | .Fn SSL_CTX_set_tmp_ecdh_callback | ||
98 | always return 1. | ||
99 | .Sh SEE ALSO | ||
100 | .Xr ssl 3 , | ||
101 | .Xr SSL_CTX_set1_groups 3 , | ||
102 | .Xr SSL_CTX_set_cipher_list 3 , | ||
103 | .Xr SSL_CTX_set_options 3 , | ||
104 | .Xr SSL_CTX_set_tmp_dh_callback 3 , | ||
105 | .Xr SSL_new 3 | ||
106 | .Sh HISTORY | ||
107 | .Fn SSL_set_tmp_ecdh , | ||
108 | .Fn SSL_CTX_set_tmp_ecdh , | ||
109 | .Fn SSL_set_tmp_ecdh_callback , | ||
110 | and | ||
111 | .Fn SSL_CTX_set_tmp_ecdh_callback | ||
112 | first appeared in OpenSSL 0.9.8 and have been available since | ||
113 | .Ox 4.5 . | ||
114 | .Pp | ||
115 | .Fn SSL_CTX_set_ecdh_auto | ||
116 | and | ||
117 | .Fn SSL_set_ecdh_auto | ||
118 | first appeared in OpenSSL 1.0.2 and have been available since | ||
119 | .Ox 5.7 . | ||
diff --git a/src/lib/libssl/man/SSL_set_verify_result.3 b/src/lib/libssl/man/SSL_set_verify_result.3 deleted file mode 100644 index 4b7cc6ec3c..0000000000 --- a/src/lib/libssl/man/SSL_set_verify_result.3 +++ /dev/null | |||
@@ -1,90 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_set_verify_result.3,v 1.5 2020/03/29 17:05:02 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2000 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 29 2020 $ | ||
52 | .Dt SSL_SET_VERIFY_RESULT 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_set_verify_result | ||
56 | .Nd override result of peer certificate verification | ||
57 | .Sh SYNOPSIS | ||
58 | .In openssl/ssl.h | ||
59 | .Ft void | ||
60 | .Fn SSL_set_verify_result "SSL *ssl" "long verify_result" | ||
61 | .Sh DESCRIPTION | ||
62 | .Fn SSL_set_verify_result | ||
63 | sets | ||
64 | .Fa verify_result | ||
65 | of the object | ||
66 | .Fa ssl | ||
67 | to be the result of the verification of the X509 certificate presented by the | ||
68 | peer, if any. | ||
69 | .Pp | ||
70 | .Fn SSL_set_verify_result | ||
71 | overrides the verification result. | ||
72 | It only changes the verification result of the | ||
73 | .Fa ssl | ||
74 | object. | ||
75 | It does not become part of the established session, so if the session is to be | ||
76 | reused later, the original value will reappear. | ||
77 | .Pp | ||
78 | The valid codes for | ||
79 | .Fa verify_result | ||
80 | are documented in | ||
81 | .Xr openssl 1 . | ||
82 | .Sh SEE ALSO | ||
83 | .Xr openssl 1 , | ||
84 | .Xr ssl 3 , | ||
85 | .Xr SSL_get_peer_certificate 3 , | ||
86 | .Xr SSL_get_verify_result 3 | ||
87 | .Sh HISTORY | ||
88 | .Fn SSL_set_verify_result | ||
89 | first appeared in SSLeay 0.6.1 and has been available since | ||
90 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_shutdown.3 b/src/lib/libssl/man/SSL_shutdown.3 deleted file mode 100644 index bfb1e91ea7..0000000000 --- a/src/lib/libssl/man/SSL_shutdown.3 +++ /dev/null | |||
@@ -1,253 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_shutdown.3,v 1.5 2018/03/27 17:35:50 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2000, 2001, 2004, 2014 The OpenSSL Project. | ||
6 | .\" All rights reserved. | ||
7 | .\" | ||
8 | .\" Redistribution and use in source and binary forms, with or without | ||
9 | .\" modification, are permitted provided that the following conditions | ||
10 | .\" are met: | ||
11 | .\" | ||
12 | .\" 1. Redistributions of source code must retain the above copyright | ||
13 | .\" notice, this list of conditions and the following disclaimer. | ||
14 | .\" | ||
15 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
16 | .\" notice, this list of conditions and the following disclaimer in | ||
17 | .\" the documentation and/or other materials provided with the | ||
18 | .\" distribution. | ||
19 | .\" | ||
20 | .\" 3. All advertising materials mentioning features or use of this | ||
21 | .\" software must display the following acknowledgment: | ||
22 | .\" "This product includes software developed by the OpenSSL Project | ||
23 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
24 | .\" | ||
25 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
26 | .\" endorse or promote products derived from this software without | ||
27 | .\" prior written permission. For written permission, please contact | ||
28 | .\" openssl-core@openssl.org. | ||
29 | .\" | ||
30 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
31 | .\" nor may "OpenSSL" appear in their names without prior written | ||
32 | .\" permission of the OpenSSL Project. | ||
33 | .\" | ||
34 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
35 | .\" acknowledgment: | ||
36 | .\" "This product includes software developed by the OpenSSL Project | ||
37 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
38 | .\" | ||
39 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
40 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
41 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
42 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
43 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
44 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
45 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
46 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
47 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
48 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
51 | .\" | ||
52 | .Dd $Mdocdate: March 27 2018 $ | ||
53 | .Dt SSL_SHUTDOWN 3 | ||
54 | .Os | ||
55 | .Sh NAME | ||
56 | .Nm SSL_shutdown | ||
57 | .Nd shut down a TLS/SSL connection | ||
58 | .Sh SYNOPSIS | ||
59 | .In openssl/ssl.h | ||
60 | .Ft int | ||
61 | .Fn SSL_shutdown "SSL *ssl" | ||
62 | .Sh DESCRIPTION | ||
63 | .Fn SSL_shutdown | ||
64 | shuts down an active TLS/SSL connection. | ||
65 | It sends the | ||
66 | .Dq close notify | ||
67 | shutdown alert to the peer. | ||
68 | .Pp | ||
69 | .Fn SSL_shutdown | ||
70 | tries to send the | ||
71 | .Dq close notify | ||
72 | shutdown alert to the peer. | ||
73 | Whether the operation succeeds or not, the | ||
74 | .Dv SSL_SENT_SHUTDOWN | ||
75 | flag is set and a currently open session is considered closed and good and will | ||
76 | be kept in the session cache for further reuse. | ||
77 | .Pp | ||
78 | The shutdown procedure consists of 2 steps: the sending of the | ||
79 | .Dq close notify | ||
80 | shutdown alert and the reception of the peer's | ||
81 | .Dq close notify | ||
82 | shutdown alert. | ||
83 | According to the TLS standard, it is acceptable for an application to only send | ||
84 | its shutdown alert and then close the underlying connection without waiting for | ||
85 | the peer's response (this way resources can be saved, as the process can | ||
86 | already terminate or serve another connection). | ||
87 | When the underlying connection shall be used for more communications, | ||
88 | the complete shutdown procedure (bidirectional | ||
89 | .Dq close notify | ||
90 | alerts) must be performed, so that the peers stay synchronized. | ||
91 | .Pp | ||
92 | .Fn SSL_shutdown | ||
93 | supports both uni- and bidirectional shutdown by its 2 step behavior. | ||
94 | .Pp | ||
95 | When the application is the first party to send the | ||
96 | .Dq close notify | ||
97 | alert, | ||
98 | .Fn SSL_shutdown | ||
99 | will only send the alert and then set the | ||
100 | .Dv SSL_SENT_SHUTDOWN | ||
101 | flag (so that the session is considered good and will be kept in cache). | ||
102 | .Fn SSL_shutdown | ||
103 | will then return 0. | ||
104 | If a unidirectional shutdown is enough | ||
105 | (the underlying connection shall be closed anyway), this first call to | ||
106 | .Fn SSL_shutdown | ||
107 | is sufficient. | ||
108 | In order to complete the bidirectional shutdown handshake, | ||
109 | .Fn SSL_shutdown | ||
110 | must be called again. | ||
111 | The second call will make | ||
112 | .Fn SSL_shutdown | ||
113 | wait for the peer's | ||
114 | .Dq close notify | ||
115 | shutdown alert. | ||
116 | On success, the second call to | ||
117 | .Fn SSL_shutdown | ||
118 | will return 1. | ||
119 | .Pp | ||
120 | If the peer already sent the | ||
121 | .Dq close notify | ||
122 | alert and it was already processed implicitly inside another function | ||
123 | .Pq Xr SSL_read 3 , | ||
124 | the | ||
125 | .Dv SSL_RECEIVED_SHUTDOWN | ||
126 | flag is set. | ||
127 | .Fn SSL_shutdown | ||
128 | will send the | ||
129 | .Dq close notify | ||
130 | alert, set the | ||
131 | .Dv SSL_SENT_SHUTDOWN | ||
132 | flag and will immediately return with 1. | ||
133 | Whether | ||
134 | .Dv SSL_RECEIVED_SHUTDOWN | ||
135 | is already set can be checked using the | ||
136 | .Fn SSL_get_shutdown | ||
137 | (see also the | ||
138 | .Xr SSL_set_shutdown 3 | ||
139 | call). | ||
140 | .Pp | ||
141 | It is therefore recommended to check the return value of | ||
142 | .Fn SSL_shutdown | ||
143 | and call | ||
144 | .Fn SSL_shutdown | ||
145 | again, if the bidirectional shutdown is not yet complete (return value of the | ||
146 | first call is 0). | ||
147 | .Pp | ||
148 | The behaviour of | ||
149 | .Fn SSL_shutdown | ||
150 | additionally depends on the underlying | ||
151 | .Vt BIO . | ||
152 | .Pp | ||
153 | If the underlying | ||
154 | .Vt BIO | ||
155 | is | ||
156 | .Em blocking , | ||
157 | .Fn SSL_shutdown | ||
158 | will only return once the | ||
159 | handshake step has been finished or an error occurred. | ||
160 | .Pp | ||
161 | If the underlying | ||
162 | .Vt BIO | ||
163 | is | ||
164 | .Em non-blocking , | ||
165 | .Fn SSL_shutdown | ||
166 | will also return when the underlying | ||
167 | .Vt BIO | ||
168 | could not satisfy the needs of | ||
169 | .Fn SSL_shutdown | ||
170 | to continue the handshake. | ||
171 | In this case a call to | ||
172 | .Xr SSL_get_error 3 | ||
173 | with the | ||
174 | return value of | ||
175 | .Fn SSL_shutdown | ||
176 | will yield | ||
177 | .Dv SSL_ERROR_WANT_READ | ||
178 | or | ||
179 | .Dv SSL_ERROR_WANT_WRITE . | ||
180 | The calling process then must repeat the call after taking appropriate action | ||
181 | to satisfy the needs of | ||
182 | .Fn SSL_shutdown . | ||
183 | The action depends on the underlying | ||
184 | .Vt BIO . | ||
185 | When using a non-blocking socket, nothing is to be done, but | ||
186 | .Xr select 2 | ||
187 | can be used to check for the required condition. | ||
188 | When using a buffering | ||
189 | .Vt BIO , | ||
190 | like a | ||
191 | .Vt BIO | ||
192 | pair, data must be written into or retrieved out of the | ||
193 | .Vt BIO | ||
194 | before being able to continue. | ||
195 | .Pp | ||
196 | .Fn SSL_shutdown | ||
197 | can be modified to only set the connection to | ||
198 | .Dq shutdown | ||
199 | state but not actually send the | ||
200 | .Dq close notify | ||
201 | alert messages; see | ||
202 | .Xr SSL_CTX_set_quiet_shutdown 3 . | ||
203 | When | ||
204 | .Dq quiet shutdown | ||
205 | is enabled, | ||
206 | .Fn SSL_shutdown | ||
207 | will always succeed and return 1. | ||
208 | .Sh RETURN VALUES | ||
209 | The following return values can occur: | ||
210 | .Bl -tag -width Ds | ||
211 | .It 0 | ||
212 | The shutdown is not yet finished. | ||
213 | Call | ||
214 | .Fn SSL_shutdown | ||
215 | for a second time, if a bidirectional shutdown shall be performed. | ||
216 | The output of | ||
217 | .Xr SSL_get_error 3 | ||
218 | may be misleading, as an erroneous | ||
219 | .Dv SSL_ERROR_SYSCALL | ||
220 | may be flagged even though no error occurred. | ||
221 | .It 1 | ||
222 | The shutdown was successfully completed. | ||
223 | The | ||
224 | .Dq close notify | ||
225 | alert was sent and the peer's | ||
226 | .Dq close notify | ||
227 | alert was received. | ||
228 | .It \(mi1 | ||
229 | The shutdown was not successful because a fatal error occurred either | ||
230 | at the protocol level or a connection failure occurred. | ||
231 | It can also occur if action is need to continue the operation for non-blocking | ||
232 | .Vt BIO Ns | ||
233 | s. | ||
234 | Call | ||
235 | .Xr SSL_get_error 3 | ||
236 | with the return value | ||
237 | .Fa ret | ||
238 | to find out the reason. | ||
239 | .El | ||
240 | .Sh SEE ALSO | ||
241 | .Xr BIO_new 3 , | ||
242 | .Xr ssl 3 , | ||
243 | .Xr SSL_accept 3 , | ||
244 | .Xr SSL_clear 3 , | ||
245 | .Xr SSL_connect 3 , | ||
246 | .Xr SSL_CTX_set_quiet_shutdown 3 , | ||
247 | .Xr SSL_free 3 , | ||
248 | .Xr SSL_get_error 3 , | ||
249 | .Xr SSL_set_shutdown 3 | ||
250 | .Sh HISTORY | ||
251 | .Fn SSL_shutdown | ||
252 | first appeared in SSLeay 0.8.0 and has been available since | ||
253 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_state_string.3 b/src/lib/libssl/man/SSL_state_string.3 deleted file mode 100644 index 1070335448..0000000000 --- a/src/lib/libssl/man/SSL_state_string.3 +++ /dev/null | |||
@@ -1,110 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_state_string.3,v 1.4 2018/03/27 17:35:50 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001, 2005 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 27 2018 $ | ||
52 | .Dt SSL_STATE_STRING 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_state_string , | ||
56 | .Nm SSL_state_string_long | ||
57 | .Nd get textual description of state of an SSL object | ||
58 | .Sh SYNOPSIS | ||
59 | .In openssl/ssl.h | ||
60 | .Ft const char * | ||
61 | .Fn SSL_state_string "const SSL *ssl" | ||
62 | .Ft const char * | ||
63 | .Fn SSL_state_string_long "const SSL *ssl" | ||
64 | .Sh DESCRIPTION | ||
65 | .Fn SSL_state_string | ||
66 | returns a 6 letter string indicating the current state of the | ||
67 | .Vt SSL | ||
68 | object | ||
69 | .Fa ssl . | ||
70 | .Pp | ||
71 | .Fn SSL_state_string_long | ||
72 | returns a string indicating the current state of the | ||
73 | .Vt SSL | ||
74 | object | ||
75 | .Fa ssl . | ||
76 | .Pp | ||
77 | During its use, an | ||
78 | .Vt SSL | ||
79 | object passes several states. | ||
80 | The state is internally maintained. | ||
81 | Querying the state information is not very informative before or when a | ||
82 | connection has been established. | ||
83 | It however can be of significant interest during the handshake. | ||
84 | .Pp | ||
85 | When using non-blocking sockets, | ||
86 | the function call performing the handshake may return with | ||
87 | .Dv SSL_ERROR_WANT_READ | ||
88 | or | ||
89 | .Dv SSL_ERROR_WANT_WRITE | ||
90 | condition, so that | ||
91 | .Fn SSL_state_string[_long] | ||
92 | may be called. | ||
93 | .Pp | ||
94 | For both blocking or non-blocking sockets, | ||
95 | the details state information can be used within the | ||
96 | .Fn info_callback | ||
97 | function set with the | ||
98 | .Xr SSL_set_info_callback 3 | ||
99 | call. | ||
100 | .Sh RETURN VALUES | ||
101 | Detailed description of possible states to be included later. | ||
102 | .Sh SEE ALSO | ||
103 | .Xr ssl 3 , | ||
104 | .Xr SSL_CTX_set_info_callback 3 | ||
105 | .Sh HISTORY | ||
106 | .Fn SSL_state_string | ||
107 | and | ||
108 | .Fn SSL_state_string_long | ||
109 | first appeared in SSLeay 0.6.0 and have been available since | ||
110 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_want.3 b/src/lib/libssl/man/SSL_want.3 deleted file mode 100644 index 24e8645ba8..0000000000 --- a/src/lib/libssl/man/SSL_want.3 +++ /dev/null | |||
@@ -1,161 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_want.3,v 1.5 2018/03/27 17:35:50 schwarze Exp $ | ||
2 | .\" OpenSSL 9b86974e Aug 17 15:21:33 2015 -0400 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001, 2005 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: March 27 2018 $ | ||
52 | .Dt SSL_WANT 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm SSL_want , | ||
56 | .Nm SSL_want_nothing , | ||
57 | .Nm SSL_want_read , | ||
58 | .Nm SSL_want_write , | ||
59 | .Nm SSL_want_x509_lookup | ||
60 | .Nd obtain state information TLS/SSL I/O operation | ||
61 | .Sh SYNOPSIS | ||
62 | .In openssl/ssl.h | ||
63 | .Ft int | ||
64 | .Fn SSL_want "const SSL *ssl" | ||
65 | .Ft int | ||
66 | .Fn SSL_want_nothing "const SSL *ssl" | ||
67 | .Ft int | ||
68 | .Fn SSL_want_read "const SSL *ssl" | ||
69 | .Ft int | ||
70 | .Fn SSL_want_write "const SSL *ssl" | ||
71 | .Ft int | ||
72 | .Fn SSL_want_x509_lookup "const SSL *ssl" | ||
73 | .Sh DESCRIPTION | ||
74 | .Fn SSL_want | ||
75 | returns state information for the | ||
76 | .Vt SSL | ||
77 | object | ||
78 | .Fa ssl . | ||
79 | .Pp | ||
80 | The other | ||
81 | .Fn SSL_want_* | ||
82 | calls are shortcuts for the possible states returned by | ||
83 | .Fn SSL_want . | ||
84 | .Pp | ||
85 | .Fn SSL_want | ||
86 | examines the internal state information of the | ||
87 | .Vt SSL | ||
88 | object. | ||
89 | Its return values are similar to those of | ||
90 | .Xr SSL_get_error 3 . | ||
91 | Unlike | ||
92 | .Xr SSL_get_error 3 , | ||
93 | which also evaluates the error queue, | ||
94 | the results are obtained by examining an internal state flag only. | ||
95 | The information must therefore only be used for normal operation under | ||
96 | non-blocking I/O. | ||
97 | Error conditions are not handled and must be treated using | ||
98 | .Xr SSL_get_error 3 . | ||
99 | .Pp | ||
100 | The result returned by | ||
101 | .Fn SSL_want | ||
102 | should always be consistent with the result of | ||
103 | .Xr SSL_get_error 3 . | ||
104 | .Sh RETURN VALUES | ||
105 | The following return values can currently occur for | ||
106 | .Fn SSL_want : | ||
107 | .Bl -tag -width Ds | ||
108 | .It Dv SSL_NOTHING | ||
109 | There is no data to be written or to be read. | ||
110 | .It Dv SSL_WRITING | ||
111 | There are data in the SSL buffer that must be written to the underlying | ||
112 | .Vt BIO | ||
113 | layer in order to complete the actual | ||
114 | .Fn SSL_* | ||
115 | operation. | ||
116 | A call to | ||
117 | .Xr SSL_get_error 3 | ||
118 | should return | ||
119 | .Dv SSL_ERROR_WANT_WRITE . | ||
120 | .It Dv SSL_READING | ||
121 | More data must be read from the underlying | ||
122 | .Vt BIO | ||
123 | layer in order to | ||
124 | complete the actual | ||
125 | .Fn SSL_* | ||
126 | operation. | ||
127 | A call to | ||
128 | .Xr SSL_get_error 3 | ||
129 | should return | ||
130 | .Dv SSL_ERROR_WANT_READ . | ||
131 | .It Dv SSL_X509_LOOKUP | ||
132 | The operation did not complete because an application callback set by | ||
133 | .Xr SSL_CTX_set_client_cert_cb 3 | ||
134 | has asked to be called again. | ||
135 | A call to | ||
136 | .Xr SSL_get_error 3 | ||
137 | should return | ||
138 | .Dv SSL_ERROR_WANT_X509_LOOKUP . | ||
139 | .El | ||
140 | .Pp | ||
141 | .Fn SSL_want_nothing , | ||
142 | .Fn SSL_want_read , | ||
143 | .Fn SSL_want_write , | ||
144 | and | ||
145 | .Fn SSL_want_x509_lookup | ||
146 | return 1 when the corresponding condition is true or 0 otherwise. | ||
147 | .Sh SEE ALSO | ||
148 | .Xr err 3 , | ||
149 | .Xr ssl 3 , | ||
150 | .Xr SSL_get_error 3 | ||
151 | .Sh HISTORY | ||
152 | .Fn SSL_want , | ||
153 | .Fn SSL_want_nothing , | ||
154 | .Fn SSL_want_read , | ||
155 | and | ||
156 | .Fn SSL_want_write | ||
157 | first appeared in SSLeay 0.5.2. | ||
158 | .Fn SSL_want_x509_lookup | ||
159 | first appeared in SSLeay 0.6.0. | ||
160 | These functions have been available since | ||
161 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/SSL_write.3 b/src/lib/libssl/man/SSL_write.3 deleted file mode 100644 index 2c6fbcef08..0000000000 --- a/src/lib/libssl/man/SSL_write.3 +++ /dev/null | |||
@@ -1,249 +0,0 @@ | |||
1 | .\" $OpenBSD: SSL_write.3,v 1.7 2021/10/24 15:10:13 schwarze Exp $ | ||
2 | .\" full merge up to: OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" partial merge up to: OpenSSL 24a535ea Sep 22 13:14:20 2020 +0100 | ||
4 | .\" | ||
5 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org> | ||
6 | .\" and Matt Caswell <matt@openssl.org>. | ||
7 | .\" Copyright (c) 2000, 2001, 2002, 2016 The OpenSSL Project. | ||
8 | .\" All rights reserved. | ||
9 | .\" | ||
10 | .\" Redistribution and use in source and binary forms, with or without | ||
11 | .\" modification, are permitted provided that the following conditions | ||
12 | .\" are met: | ||
13 | .\" | ||
14 | .\" 1. Redistributions of source code must retain the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer. | ||
16 | .\" | ||
17 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
18 | .\" notice, this list of conditions and the following disclaimer in | ||
19 | .\" the documentation and/or other materials provided with the | ||
20 | .\" distribution. | ||
21 | .\" | ||
22 | .\" 3. All advertising materials mentioning features or use of this | ||
23 | .\" software must display the following acknowledgment: | ||
24 | .\" "This product includes software developed by the OpenSSL Project | ||
25 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
26 | .\" | ||
27 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
28 | .\" endorse or promote products derived from this software without | ||
29 | .\" prior written permission. For written permission, please contact | ||
30 | .\" openssl-core@openssl.org. | ||
31 | .\" | ||
32 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
33 | .\" nor may "OpenSSL" appear in their names without prior written | ||
34 | .\" permission of the OpenSSL Project. | ||
35 | .\" | ||
36 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
37 | .\" acknowledgment: | ||
38 | .\" "This product includes software developed by the OpenSSL Project | ||
39 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
40 | .\" | ||
41 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
42 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
43 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
44 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
45 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
46 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
47 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
48 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
49 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
50 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
51 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
52 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
53 | .\" | ||
54 | .Dd $Mdocdate: October 24 2021 $ | ||
55 | .Dt SSL_WRITE 3 | ||
56 | .Os | ||
57 | .Sh NAME | ||
58 | .Nm SSL_write_ex , | ||
59 | .Nm SSL_write | ||
60 | .Nd write bytes to a TLS connection | ||
61 | .Sh SYNOPSIS | ||
62 | .In openssl/ssl.h | ||
63 | .Ft int | ||
64 | .Fn SSL_write_ex "SSL *ssl" "const void *buf" "size_t num" "size_t *written" | ||
65 | .Ft int | ||
66 | .Fn SSL_write "SSL *ssl" "const void *buf" "int num" | ||
67 | .Sh DESCRIPTION | ||
68 | .Fn SSL_write_ex | ||
69 | and | ||
70 | .Fn SSL_write | ||
71 | write | ||
72 | .Fa num | ||
73 | bytes from the buffer | ||
74 | .Fa buf | ||
75 | into the specified | ||
76 | .Fa ssl | ||
77 | connection. | ||
78 | On success | ||
79 | .Fn SSL_write_ex | ||
80 | stores the number of bytes written in | ||
81 | .Pf * Fa written . | ||
82 | .Pp | ||
83 | In the following, | ||
84 | .Fn SSL_write_ex | ||
85 | and | ||
86 | .Fn SSL_write | ||
87 | are called | ||
88 | .Dq write functions . | ||
89 | .Pp | ||
90 | If necessary, a write function negotiates a TLS session, | ||
91 | if not already explicitly performed by | ||
92 | .Xr SSL_connect 3 | ||
93 | or | ||
94 | .Xr SSL_accept 3 . | ||
95 | If the peer requests a re-negotiation, | ||
96 | it will be performed transparently during the | ||
97 | write function operation. | ||
98 | The behaviour of the write functions depends on the underlying | ||
99 | .Vt BIO . | ||
100 | .Pp | ||
101 | For the transparent negotiation to succeed, the | ||
102 | .Fa ssl | ||
103 | must have been initialized to client or server mode. | ||
104 | This is done by calling | ||
105 | .Xr SSL_set_connect_state 3 | ||
106 | or | ||
107 | .Xr SSL_set_accept_state 3 | ||
108 | before the first call to a write function. | ||
109 | .Pp | ||
110 | If the underlying | ||
111 | .Vt BIO | ||
112 | is | ||
113 | .Em blocking , | ||
114 | the write function | ||
115 | will only return once the write operation has been finished or an error | ||
116 | occurred, except when a renegotiation takes place, in which case a | ||
117 | .Dv SSL_ERROR_WANT_READ | ||
118 | may occur. | ||
119 | This behaviour can be controlled with the | ||
120 | .Dv SSL_MODE_AUTO_RETRY | ||
121 | flag of the | ||
122 | .Xr SSL_CTX_set_mode 3 | ||
123 | call. | ||
124 | .Pp | ||
125 | If the underlying | ||
126 | .Vt BIO | ||
127 | is | ||
128 | .Em non-blocking , | ||
129 | the write function will also return when the underlying | ||
130 | .Vt BIO | ||
131 | could not satisfy the needs of the function to continue the operation. | ||
132 | In this case a call to | ||
133 | .Xr SSL_get_error 3 | ||
134 | with the return value of the write function will yield | ||
135 | .Dv SSL_ERROR_WANT_READ | ||
136 | or | ||
137 | .Dv SSL_ERROR_WANT_WRITE . | ||
138 | As at any time a re-negotiation is possible, a call to | ||
139 | a write function can also cause read operations. | ||
140 | The calling process then must repeat the call after taking appropriate action | ||
141 | to satisfy the needs of the write function. | ||
142 | The action depends on the underlying | ||
143 | .Vt BIO . | ||
144 | When using a non-blocking socket, nothing is to be done, but | ||
145 | .Xr select 2 | ||
146 | can be used to check for the required condition. | ||
147 | When using a buffering | ||
148 | .Vt BIO , | ||
149 | like a | ||
150 | .Vt BIO | ||
151 | pair, data must be written into or retrieved out of the BIO before being able | ||
152 | to continue. | ||
153 | .Pp | ||
154 | The write functions | ||
155 | will only return with success when the complete contents of | ||
156 | .Fa buf | ||
157 | of length | ||
158 | .Fa num | ||
159 | have been written. | ||
160 | This default behaviour can be changed with the | ||
161 | .Dv SSL_MODE_ENABLE_PARTIAL_WRITE | ||
162 | option of | ||
163 | .Xr SSL_CTX_set_mode 3 . | ||
164 | When this flag is set, the write functions will also return with | ||
165 | success when a partial write has been successfully completed. | ||
166 | In this case the write function operation is considered completed. | ||
167 | The bytes are sent and a new write call with a new buffer (with the | ||
168 | already sent bytes removed) must be started. | ||
169 | A partial write is performed with the size of a message block, | ||
170 | which is 16kB. | ||
171 | .Pp | ||
172 | When a write function call has to be repeated because | ||
173 | .Xr SSL_get_error 3 | ||
174 | returned | ||
175 | .Dv SSL_ERROR_WANT_READ | ||
176 | or | ||
177 | .Dv SSL_ERROR_WANT_WRITE , | ||
178 | it must be repeated with the same arguments. | ||
179 | .Pp | ||
180 | When calling | ||
181 | .Fn SSL_write | ||
182 | with | ||
183 | .Fa num Ns =0 | ||
184 | bytes to be sent, the behaviour is undefined. | ||
185 | .Fn SSL_write_ex | ||
186 | can be called with | ||
187 | .Fa num Ns =0 , | ||
188 | but will not send application data to the peer. | ||
189 | .Sh RETURN VALUES | ||
190 | .Fn SSL_write_ex | ||
191 | returns 1 for success or 0 for failure. | ||
192 | Success means that all requested application data bytes have been | ||
193 | written to the TLS connection or, if | ||
194 | .Dv SSL_MODE_ENABLE_PARTIAL_WRITE | ||
195 | is in use, at least one application data byte has been written | ||
196 | to the TLS connection. | ||
197 | Failure means that not all the requested bytes have been written yet (if | ||
198 | .Dv SSL_MODE_ENABLE_PARTIAL_WRITE | ||
199 | is not in use) or no bytes could be written to the TLS connection (if | ||
200 | .Dv SSL_MODE_ENABLE_PARTIAL_WRITE | ||
201 | is in use). | ||
202 | Failures can be retryable (e.g. the network write buffer has temporarily | ||
203 | filled up) or non-retryable (e.g. a fatal network error). | ||
204 | In the event of a failure, call | ||
205 | .Xr SSL_get_error 3 | ||
206 | to find out the reason | ||
207 | which indicates whether the call is retryable or not. | ||
208 | .Pp | ||
209 | For | ||
210 | .Fn SSL_write , | ||
211 | the following return values can occur: | ||
212 | .Bl -tag -width Ds | ||
213 | .It >0 | ||
214 | The write operation was successful. | ||
215 | The return value is the number of bytes actually written to the TLS | ||
216 | connection. | ||
217 | .It 0 | ||
218 | The write operation was not successful. | ||
219 | Probably the underlying connection was closed. | ||
220 | Call | ||
221 | .Xr SSL_get_error 3 | ||
222 | with the return value to find out whether an error occurred or the connection | ||
223 | was shut down cleanly | ||
224 | .Pq Dv SSL_ERROR_ZERO_RETURN . | ||
225 | .It <0 | ||
226 | The write operation was not successful, because either an error occurred or | ||
227 | action must be taken by the calling process. | ||
228 | Call | ||
229 | .Xr SSL_get_error 3 | ||
230 | with the return value to find out the reason. | ||
231 | .El | ||
232 | .Sh SEE ALSO | ||
233 | .Xr BIO_new 3 , | ||
234 | .Xr ssl 3 , | ||
235 | .Xr SSL_accept 3 , | ||
236 | .Xr SSL_connect 3 , | ||
237 | .Xr SSL_CTX_new 3 , | ||
238 | .Xr SSL_CTX_set_mode 3 , | ||
239 | .Xr SSL_get_error 3 , | ||
240 | .Xr SSL_read 3 , | ||
241 | .Xr SSL_set_connect_state 3 | ||
242 | .Sh HISTORY | ||
243 | .Fn SSL_write | ||
244 | appeared in SSLeay 0.4 or earlier and has been available since | ||
245 | .Ox 2.4 . | ||
246 | .Pp | ||
247 | .Fn SSL_write_ex | ||
248 | first appeared in OpenSSL 1.1.1 and has been available since | ||
249 | .Ox 7.1 . | ||
diff --git a/src/lib/libssl/man/d2i_SSL_SESSION.3 b/src/lib/libssl/man/d2i_SSL_SESSION.3 deleted file mode 100644 index 7a2bc529ab..0000000000 --- a/src/lib/libssl/man/d2i_SSL_SESSION.3 +++ /dev/null | |||
@@ -1,181 +0,0 @@ | |||
1 | .\" $OpenBSD: d2i_SSL_SESSION.3,v 1.7 2019/06/08 15:25:43 schwarze Exp $ | ||
2 | .\" OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100 | ||
3 | .\" | ||
4 | .\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. | ||
5 | .\" Copyright (c) 2001, 2005, 2014 The OpenSSL Project. All rights reserved. | ||
6 | .\" | ||
7 | .\" Redistribution and use in source and binary forms, with or without | ||
8 | .\" modification, are permitted provided that the following conditions | ||
9 | .\" are met: | ||
10 | .\" | ||
11 | .\" 1. Redistributions of source code must retain the above copyright | ||
12 | .\" notice, this list of conditions and the following disclaimer. | ||
13 | .\" | ||
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer in | ||
16 | .\" the documentation and/or other materials provided with the | ||
17 | .\" distribution. | ||
18 | .\" | ||
19 | .\" 3. All advertising materials mentioning features or use of this | ||
20 | .\" software must display the following acknowledgment: | ||
21 | .\" "This product includes software developed by the OpenSSL Project | ||
22 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
23 | .\" | ||
24 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
25 | .\" endorse or promote products derived from this software without | ||
26 | .\" prior written permission. For written permission, please contact | ||
27 | .\" openssl-core@openssl.org. | ||
28 | .\" | ||
29 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
30 | .\" nor may "OpenSSL" appear in their names without prior written | ||
31 | .\" permission of the OpenSSL Project. | ||
32 | .\" | ||
33 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
34 | .\" acknowledgment: | ||
35 | .\" "This product includes software developed by the OpenSSL Project | ||
36 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
37 | .\" | ||
38 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
39 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
40 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
41 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
42 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
43 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
44 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
45 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
46 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
47 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
50 | .\" | ||
51 | .Dd $Mdocdate: June 8 2019 $ | ||
52 | .Dt D2I_SSL_SESSION 3 | ||
53 | .Os | ||
54 | .Sh NAME | ||
55 | .Nm d2i_SSL_SESSION , | ||
56 | .Nm i2d_SSL_SESSION | ||
57 | .Nd convert SSL_SESSION object from/to ASN1 representation | ||
58 | .Sh SYNOPSIS | ||
59 | .In openssl/ssl.h | ||
60 | .Ft SSL_SESSION * | ||
61 | .Fn d2i_SSL_SESSION "SSL_SESSION **a" "const unsigned char **pp" "long length" | ||
62 | .Ft int | ||
63 | .Fn i2d_SSL_SESSION "SSL_SESSION *in" "unsigned char **pp" | ||
64 | .Sh DESCRIPTION | ||
65 | .Fn d2i_SSL_SESSION | ||
66 | transforms the external ASN1 representation of an SSL/TLS session, | ||
67 | stored as binary data at location | ||
68 | .Fa pp | ||
69 | with length | ||
70 | .Fa length , | ||
71 | into | ||
72 | an | ||
73 | .Vt SSL_SESSION | ||
74 | object. | ||
75 | .Pp | ||
76 | .Fn i2d_SSL_SESSION | ||
77 | transforms the | ||
78 | .Vt SSL_SESSION | ||
79 | object | ||
80 | .Fa in | ||
81 | into the ASN1 representation and stores it into the memory location pointed to | ||
82 | by | ||
83 | .Fa pp . | ||
84 | The length of the resulting ASN1 representation is returned. | ||
85 | If | ||
86 | .Fa pp | ||
87 | is the | ||
88 | .Dv NULL | ||
89 | pointer, only the length is calculated and returned. | ||
90 | .Pp | ||
91 | The | ||
92 | .Vt SSL_SESSION | ||
93 | object is built from several | ||
94 | .Xr malloc 3 Ns | ||
95 | -ed parts; it can therefore not be moved, copied or stored directly. | ||
96 | In order to store session data on disk or into a database, | ||
97 | it must be transformed into a binary ASN1 representation. | ||
98 | .Pp | ||
99 | When using | ||
100 | .Fn d2i_SSL_SESSION , | ||
101 | the | ||
102 | .Vt SSL_SESSION | ||
103 | object is automatically allocated. | ||
104 | The reference count is 1, so that the session must be explicitly removed using | ||
105 | .Xr SSL_SESSION_free 3 , | ||
106 | unless the | ||
107 | .Vt SSL_SESSION | ||
108 | object is completely taken over, when being called inside the | ||
109 | .Fn get_session_cb , | ||
110 | see | ||
111 | .Xr SSL_CTX_sess_set_get_cb 3 . | ||
112 | .Pp | ||
113 | .Vt SSL_SESSION | ||
114 | objects keep internal link information about the session cache list when being | ||
115 | inserted into one | ||
116 | .Vt SSL_CTX | ||
117 | object's session cache. | ||
118 | One | ||
119 | .Vt SSL_SESSION | ||
120 | object, regardless of its reference count, must therefore only be used with one | ||
121 | .Vt SSL_CTX | ||
122 | object (and the | ||
123 | .Vt SSL | ||
124 | objects created from this | ||
125 | .Vt SSL_CTX | ||
126 | object). | ||
127 | .Pp | ||
128 | When using | ||
129 | .Fn i2d_SSL_SESSION , | ||
130 | the memory location pointed to by | ||
131 | .Fa pp | ||
132 | must be large enough to hold the binary representation of the session. | ||
133 | There is no known limit on the size of the created ASN1 representation, | ||
134 | so call | ||
135 | .Fn i2d_SSL_SESSION | ||
136 | first with | ||
137 | .Fa pp Ns = Ns Dv NULL | ||
138 | to obtain the encoded size, before allocating the required amount of memory and | ||
139 | calling | ||
140 | .Fn i2d_SSL_SESSION | ||
141 | again. | ||
142 | Note that this will advance the value contained in | ||
143 | .Fa *pp | ||
144 | so it is necessary to save a copy of the original allocation. | ||
145 | For example: | ||
146 | .Bd -literal -offset indent | ||
147 | char *p, *pp; | ||
148 | int elen, len; | ||
149 | |||
150 | elen = i2d_SSL_SESSION(sess, NULL); | ||
151 | p = pp = malloc(elen); | ||
152 | if (p != NULL) { | ||
153 | len = i2d_SSL_SESSION(sess, &pp); | ||
154 | assert(elen == len); | ||
155 | assert(p + len == pp); | ||
156 | } | ||
157 | .Ed | ||
158 | .Sh RETURN VALUES | ||
159 | .Fn d2i_SSL_SESSION | ||
160 | returns a pointer to the newly allocated | ||
161 | .Vt SSL_SESSION | ||
162 | object. | ||
163 | In case of failure a | ||
164 | .Dv NULL | ||
165 | pointer is returned and the error message can be retrieved from the error | ||
166 | stack. | ||
167 | .Pp | ||
168 | .Fn i2d_SSL_SESSION | ||
169 | returns the size of the ASN1 representation in bytes. | ||
170 | When the session is not valid, 0 is returned and no operation is performed. | ||
171 | .Sh SEE ALSO | ||
172 | .Xr d2i_X509 3 , | ||
173 | .Xr ssl 3 , | ||
174 | .Xr SSL_CTX_sess_set_get_cb 3 , | ||
175 | .Xr SSL_SESSION_free 3 | ||
176 | .Sh HISTORY | ||
177 | .Fn d2i_SSL_SESSION | ||
178 | and | ||
179 | .Fn i2d_SSL_SESSION | ||
180 | first appeared in SSLeay 0.5.2 and have been available since | ||
181 | .Ox 2.4 . | ||
diff --git a/src/lib/libssl/man/ssl.3 b/src/lib/libssl/man/ssl.3 deleted file mode 100644 index 314a1b0a94..0000000000 --- a/src/lib/libssl/man/ssl.3 +++ /dev/null | |||
@@ -1,353 +0,0 @@ | |||
1 | .\" $OpenBSD: ssl.3,v 1.26 2024/08/31 10:51:48 tb Exp $ | ||
2 | .\" full merge up to: OpenSSL e330f55d Nov 11 00:51:04 2016 +0100 | ||
3 | .\" selective merge up to: OpenSSL 322755cc Sep 1 08:40:51 2018 +0800 | ||
4 | .\" | ||
5 | .\" This file was written by Ralf S. Engelschall <rse@openssl.org>, | ||
6 | .\" Ben Laurie <ben@openssl.org>, and Ulf Moeller <ulf@openssl.org>. | ||
7 | .\" Copyright (c) 1998-2002, 2005, 2013, 2015 The OpenSSL Project. | ||
8 | .\" All rights reserved. | ||
9 | .\" | ||
10 | .\" Redistribution and use in source and binary forms, with or without | ||
11 | .\" modification, are permitted provided that the following conditions | ||
12 | .\" are met: | ||
13 | .\" | ||
14 | .\" 1. Redistributions of source code must retain the above copyright | ||
15 | .\" notice, this list of conditions and the following disclaimer. | ||
16 | .\" | ||
17 | .\" 2. Redistributions in binary form must reproduce the above copyright | ||
18 | .\" notice, this list of conditions and the following disclaimer in | ||
19 | .\" the documentation and/or other materials provided with the | ||
20 | .\" distribution. | ||
21 | .\" | ||
22 | .\" 3. All advertising materials mentioning features or use of this | ||
23 | .\" software must display the following acknowledgment: | ||
24 | .\" "This product includes software developed by the OpenSSL Project | ||
25 | .\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
26 | .\" | ||
27 | .\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
28 | .\" endorse or promote products derived from this software without | ||
29 | .\" prior written permission. For written permission, please contact | ||
30 | .\" openssl-core@openssl.org. | ||
31 | .\" | ||
32 | .\" 5. Products derived from this software may not be called "OpenSSL" | ||
33 | .\" nor may "OpenSSL" appear in their names without prior written | ||
34 | .\" permission of the OpenSSL Project. | ||
35 | .\" | ||
36 | .\" 6. Redistributions of any form whatsoever must retain the following | ||
37 | .\" acknowledgment: | ||
38 | .\" "This product includes software developed by the OpenSSL Project | ||
39 | .\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
40 | .\" | ||
41 | .\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
42 | .\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
43 | .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
44 | .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
45 | .\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
46 | .\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
47 | .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
48 | .\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
49 | .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
50 | .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
51 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
52 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | ||
53 | .\" | ||
54 | .Dd $Mdocdate: August 31 2024 $ | ||
55 | .Dt SSL 3 | ||
56 | .Os | ||
57 | .Sh NAME | ||
58 | .Nm ssl | ||
59 | .Nd OpenSSL TLS library | ||
60 | .Sh DESCRIPTION | ||
61 | The | ||
62 | .Nm ssl | ||
63 | library implements the Transport Layer Security (TLS) protocol, | ||
64 | the successor to the Secure Sockets Layer (SSL) protocol. | ||
65 | .Pp | ||
66 | An | ||
67 | .Vt SSL_CTX | ||
68 | object is created as a framework to establish TLS/SSL enabled connections (see | ||
69 | .Xr SSL_CTX_new 3 ) . | ||
70 | Various options regarding certificates, algorithms, etc., can be set in this | ||
71 | object. | ||
72 | .Pp | ||
73 | When a network connection has been created, it can be assigned to an | ||
74 | .Vt SSL | ||
75 | object. | ||
76 | After the | ||
77 | .Vt SSL | ||
78 | object has been created using | ||
79 | .Xr SSL_new 3 , | ||
80 | .Xr SSL_set_fd 3 | ||
81 | or | ||
82 | .Xr SSL_set_bio 3 | ||
83 | can be used to associate the network connection with the object. | ||
84 | .Pp | ||
85 | Then the TLS/SSL handshake is performed using | ||
86 | .Xr SSL_accept 3 | ||
87 | or | ||
88 | .Xr SSL_connect 3 | ||
89 | respectively. | ||
90 | .Xr SSL_read 3 | ||
91 | and | ||
92 | .Xr SSL_write 3 | ||
93 | are used to read and write data on the TLS/SSL connection. | ||
94 | .Xr SSL_shutdown 3 | ||
95 | can be used to shut down the TLS/SSL connection. | ||
96 | .Sh DATA STRUCTURES | ||
97 | Currently the | ||
98 | .Nm ssl | ||
99 | library functions deal with the following data structures: | ||
100 | .Bl -tag -width Ds | ||
101 | .It Vt SSL_METHOD No (SSL Method) | ||
102 | That's a dispatch structure describing the internal | ||
103 | .Nm ssl | ||
104 | library methods/functions which implement the various protocol versions. | ||
105 | It's needed to create an | ||
106 | .Vt SSL_CTX . | ||
107 | See | ||
108 | .Xr TLS_method 3 | ||
109 | for constructors. | ||
110 | .It Vt SSL_CIPHER No (SSL Cipher) | ||
111 | This structure holds the algorithm information for a particular cipher which | ||
112 | is a core part of the SSL/TLS protocol. | ||
113 | The available ciphers are configured on an | ||
114 | .Vt SSL_CTX | ||
115 | basis and the actually used ones are then part of the | ||
116 | .Vt SSL_SESSION . | ||
117 | .It Vt SSL_CTX No (SSL Context) | ||
118 | That's the global context structure which is created by a server or client | ||
119 | once per program lifetime and which holds mainly default values for the | ||
120 | .Vt SSL | ||
121 | structures which are later created for the connections. | ||
122 | .It Vt SSL_SESSION No (SSL Session) | ||
123 | This is a structure containing the current TLS/SSL session details for a | ||
124 | connection: | ||
125 | .Vt SSL_CIPHER Ns s , | ||
126 | client and server certificates, keys, etc. | ||
127 | .It Vt SSL No (SSL Connection) | ||
128 | That's the main SSL/TLS structure which is created by a server or client per | ||
129 | established connection. | ||
130 | This actually is the core structure in the SSL API. | ||
131 | At run-time the application usually deals with this structure which has | ||
132 | links to mostly all other structures. | ||
133 | .El | ||
134 | .Sh HEADER FILES | ||
135 | Currently the | ||
136 | .Nm ssl | ||
137 | library provides the following C header files containing the prototypes for the | ||
138 | data structures and functions: | ||
139 | .Bl -tag -width Ds | ||
140 | .It Pa ssl.h | ||
141 | That's the common header file for the SSL/TLS API. | ||
142 | Include it into your program to make the API of the | ||
143 | .Nm ssl | ||
144 | library available. | ||
145 | It internally includes both more private SSL headers and headers from the | ||
146 | .Em crypto | ||
147 | library. | ||
148 | Whenever you need hardcore details on the internals of the SSL API, look inside | ||
149 | this header file. | ||
150 | .It Pa ssl3.h | ||
151 | That's the sub header file dealing with the SSLv3 protocol only. | ||
152 | .Bf Em | ||
153 | Usually you don't have to include it explicitly because it's already included | ||
154 | by | ||
155 | .Pa ssl.h . | ||
156 | .Ef | ||
157 | .It Pa tls1.h | ||
158 | That's the sub header file dealing with the TLSv1 protocol only. | ||
159 | .Bf Em | ||
160 | Usually you don't have to include it explicitly because it's already included | ||
161 | by | ||
162 | .Pa ssl.h . | ||
163 | .Ef | ||
164 | .El | ||
165 | .Sh API FUNCTIONS | ||
166 | .Ss Ciphers | ||
167 | The following pages describe functions acting on | ||
168 | .Vt SSL_CIPHER | ||
169 | objects: | ||
170 | .Xr SSL_get_ciphers 3 , | ||
171 | .Xr SSL_get_current_cipher 3 , | ||
172 | .Xr SSL_CIPHER_get_name 3 | ||
173 | .Ss Protocol contexts | ||
174 | The following pages describe functions acting on | ||
175 | .Vt SSL_CTX | ||
176 | objects. | ||
177 | .Pp | ||
178 | Constructors and destructors: | ||
179 | .Xr SSL_CTX_new 3 , | ||
180 | .Xr SSL_CTX_set_ssl_version 3 , | ||
181 | .Xr SSL_CTX_free 3 | ||
182 | .Pp | ||
183 | Certificate configuration: | ||
184 | .Xr SSL_CTX_add_extra_chain_cert 3 , | ||
185 | .Xr SSL_CTX_get0_certificate 3 , | ||
186 | .Xr SSL_CTX_load_verify_locations 3 , | ||
187 | .Xr SSL_CTX_set_cert_store 3 , | ||
188 | .Xr SSL_CTX_set_cert_verify_callback 3 , | ||
189 | .Xr SSL_CTX_set_client_cert_cb 3 , | ||
190 | .Xr SSL_CTX_set_default_passwd_cb 3 , | ||
191 | .Xr SSL_CTX_set_tlsext_status_cb 3 | ||
192 | .Pp | ||
193 | Session configuration: | ||
194 | .Xr SSL_CTX_add_session 3 , | ||
195 | .Xr SSL_CTX_flush_sessions 3 , | ||
196 | .Xr SSL_CTX_sess_number 3 , | ||
197 | .Xr SSL_CTX_sess_set_cache_size 3 , | ||
198 | .Xr SSL_CTX_sess_set_get_cb 3 , | ||
199 | .Xr SSL_CTX_sessions 3 , | ||
200 | .Xr SSL_CTX_set_session_cache_mode 3 , | ||
201 | .Xr SSL_CTX_set_timeout 3 , | ||
202 | .Xr SSL_CTX_set_tlsext_ticket_key_cb 3 | ||
203 | .Pp | ||
204 | Various configuration: | ||
205 | .Xr SSL_CTX_get_ex_new_index 3 , | ||
206 | .Xr SSL_CTX_set_tlsext_servername_callback 3 | ||
207 | .Ss Common configuration of contexts and connections | ||
208 | The functions on the following pages each come in two variants: | ||
209 | one to directly configure a single | ||
210 | .Vt SSL | ||
211 | connection and another to be called on an | ||
212 | .Vt SSL_CTX | ||
213 | object, to set up defaults for all future | ||
214 | .Vt SSL | ||
215 | connections created from that context. | ||
216 | .Pp | ||
217 | Protocol and algorithm configuration: | ||
218 | .Xr SSL_CTX_set_alpn_select_cb 3 , | ||
219 | .Xr SSL_CTX_set_cipher_list 3 , | ||
220 | .Xr SSL_CTX_set_min_proto_version 3 , | ||
221 | .Xr SSL_CTX_set_options 3 , | ||
222 | .Xr SSL_CTX_set_security_level 3 , | ||
223 | .Xr SSL_CTX_set_tlsext_use_srtp 3 , | ||
224 | .Xr SSL_CTX_set_tmp_dh_callback 3 , | ||
225 | .Xr SSL_CTX_set1_groups 3 | ||
226 | .Pp | ||
227 | Certificate configuration: | ||
228 | .Xr SSL_CTX_add1_chain_cert 3 , | ||
229 | .Xr SSL_CTX_get_verify_mode 3 , | ||
230 | .Xr SSL_CTX_set_client_CA_list 3 , | ||
231 | .Xr SSL_CTX_set_max_cert_list 3 , | ||
232 | .Xr SSL_CTX_set_verify 3 , | ||
233 | .Xr SSL_CTX_use_certificate 3 , | ||
234 | .Xr SSL_get_client_CA_list 3 | ||
235 | .Xr SSL_set1_param 3 | ||
236 | .Pp | ||
237 | Session configuration: | ||
238 | .Xr SSL_CTX_set_generate_session_id 3 , | ||
239 | .Xr SSL_CTX_set_session_id_context 3 | ||
240 | .Pp | ||
241 | Various configuration: | ||
242 | .Xr SSL_CTX_ctrl 3 , | ||
243 | .Xr SSL_CTX_set_info_callback 3 , | ||
244 | .Xr SSL_CTX_set_mode 3 , | ||
245 | .Xr SSL_CTX_set_msg_callback 3 , | ||
246 | .Xr SSL_CTX_set_quiet_shutdown 3 , | ||
247 | .Xr SSL_CTX_set_read_ahead 3 , | ||
248 | .Xr SSL_set_max_send_fragment 3 | ||
249 | .Ss Sessions | ||
250 | The following pages describe functions acting on | ||
251 | .Vt SSL_SESSION | ||
252 | objects. | ||
253 | .Pp | ||
254 | Constructors and destructors: | ||
255 | .Xr SSL_SESSION_new 3 , | ||
256 | .Xr SSL_SESSION_free 3 | ||
257 | .Pp | ||
258 | Accessors: | ||
259 | .Xr SSL_SESSION_get_compress_id 3 , | ||
260 | .Xr SSL_SESSION_get_ex_new_index 3 , | ||
261 | .Xr SSL_SESSION_get_id 3 , | ||
262 | .Xr SSL_SESSION_get_protocol_version 3 , | ||
263 | .Xr SSL_SESSION_get_time 3 , | ||
264 | .Xr SSL_SESSION_get0_peer 3 , | ||
265 | .Xr SSL_SESSION_has_ticket 3 , | ||
266 | .Xr SSL_SESSION_set1_id_context 3 | ||
267 | .Pp | ||
268 | Encoding and decoding: | ||
269 | .Xr d2i_SSL_SESSION 3 , | ||
270 | .Xr PEM_read_SSL_SESSION 3 , | ||
271 | .Xr SSL_SESSION_print 3 | ||
272 | .Ss Connections | ||
273 | The following pages describe functions acting on | ||
274 | .Vt SSL | ||
275 | connection objects: | ||
276 | .Pp | ||
277 | Constructors and destructors: | ||
278 | .Xr SSL_new 3 , | ||
279 | .Xr SSL_dup 3 , | ||
280 | .Xr SSL_free 3 , | ||
281 | .Xr BIO_f_ssl 3 | ||
282 | .Pp | ||
283 | To change the configuration: | ||
284 | .Xr SSL_clear 3 , | ||
285 | .Xr SSL_set_SSL_CTX 3 , | ||
286 | .Xr SSL_copy_session_id 3 , | ||
287 | .Xr SSL_set_bio 3 , | ||
288 | .Xr SSL_set_connect_state 3 , | ||
289 | .Xr SSL_set_fd 3 , | ||
290 | .Xr SSL_set_session 3 , | ||
291 | .Xr SSL_set1_host 3 , | ||
292 | .Xr SSL_set_verify_result 3 | ||
293 | .Pp | ||
294 | To inspect the configuration: | ||
295 | .Xr SSL_get_certificate 3 , | ||
296 | .Xr SSL_get_default_timeout 3 , | ||
297 | .Xr SSL_get_ex_new_index 3 , | ||
298 | .Xr SSL_get_fd 3 , | ||
299 | .Xr SSL_get_rbio 3 , | ||
300 | .Xr SSL_get_SSL_CTX 3 | ||
301 | .Pp | ||
302 | To transmit data: | ||
303 | .Xr DTLSv1_listen 3 , | ||
304 | .Xr SSL_accept 3 , | ||
305 | .Xr SSL_connect 3 , | ||
306 | .Xr SSL_do_handshake 3 , | ||
307 | .Xr SSL_read 3 , | ||
308 | .Xr SSL_read_early_data 3 , | ||
309 | .Xr SSL_renegotiate 3 , | ||
310 | .Xr SSL_shutdown 3 , | ||
311 | .Xr SSL_write 3 | ||
312 | .Pp | ||
313 | To inspect the state after a connection is established: | ||
314 | .Xr SSL_export_keying_material 3 , | ||
315 | .Xr SSL_get_client_random 3 , | ||
316 | .Xr SSL_get_ex_data_X509_STORE_CTX_idx 3 , | ||
317 | .Xr SSL_get_peer_cert_chain 3 , | ||
318 | .Xr SSL_get_peer_certificate 3 , | ||
319 | .Xr SSL_get_server_tmp_key 3 , | ||
320 | .Xr SSL_get_servername 3 , | ||
321 | .Xr SSL_get_session 3 , | ||
322 | .Xr SSL_get_shared_ciphers 3 , | ||
323 | .Xr SSL_get_verify_result 3 , | ||
324 | .Xr SSL_get_version 3 , | ||
325 | .Xr SSL_session_reused 3 | ||
326 | .Pp | ||
327 | To inspect the state during ongoing communication: | ||
328 | .Xr SSL_get_error 3 , | ||
329 | .Xr SSL_get_shutdown 3 , | ||
330 | .Xr SSL_get_state 3 , | ||
331 | .Xr SSL_num_renegotiations 3 , | ||
332 | .Xr SSL_pending 3 , | ||
333 | .Xr SSL_rstate_string 3 , | ||
334 | .Xr SSL_state_string 3 , | ||
335 | .Xr SSL_want 3 | ||
336 | .Ss Utility functions | ||
337 | .Xr SSL_alert_type_string 3 , | ||
338 | .Xr SSL_dup_CA_list 3 , | ||
339 | .Xr SSL_load_client_CA_file 3 | ||
340 | .Ss Obsolete functions | ||
341 | .Xr OPENSSL_init_ssl 3 , | ||
342 | .Xr SSL_COMP_get_compression_methods 3 , | ||
343 | .Xr SSL_CTX_set_tmp_rsa_callback 3 , | ||
344 | .Xr SSL_library_init 3 , | ||
345 | .Xr SSL_set_tmp_ecdh 3 | ||
346 | .Sh SEE ALSO | ||
347 | .Xr openssl 1 , | ||
348 | .Xr crypto 3 , | ||
349 | .Xr tls_init 3 | ||
350 | .Sh HISTORY | ||
351 | The | ||
352 | .Nm | ||
353 | document appeared in OpenSSL 0.9.2. | ||