diff options
author | schwarze <> | 2021-09-14 14:30:57 +0000 |
---|---|---|
committer | schwarze <> | 2021-09-14 14:30:57 +0000 |
commit | 721f84f987db2650c18bfa5c6bfe892cc9cfb1eb (patch) | |
tree | 475bdafd8d0c696fa2b411b8dae447688f895fb7 | |
parent | 33b1f6c25da4e88a47183c41e5a49a09b04f752d (diff) | |
download | openbsd-721f84f987db2650c18bfa5c6bfe892cc9cfb1eb.tar.gz openbsd-721f84f987db2650c18bfa5c6bfe892cc9cfb1eb.tar.bz2 openbsd-721f84f987db2650c18bfa5c6bfe892cc9cfb1eb.zip |
provide a small manual page for the SSL_set_psk_use_session_callback(3)
stub, written from scratch;
OK tb@ on SSL_set_psk_use_session_callback.3
-rw-r--r-- | src/lib/libssl/man/Makefile | 3 | ||||
-rw-r--r-- | src/lib/libssl/man/SSL_set_psk_use_session_callback.3 | 86 |
2 files changed, 88 insertions, 1 deletions
diff --git a/src/lib/libssl/man/Makefile b/src/lib/libssl/man/Makefile index 0c8805df5e..1dbe53751f 100644 --- a/src/lib/libssl/man/Makefile +++ b/src/lib/libssl/man/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.72 2021/09/14 14:08:15 schwarze Exp $ | 1 | # $OpenBSD: Makefile,v 1.73 2021/09/14 14:30:57 schwarze Exp $ |
2 | 2 | ||
3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> |
4 | 4 | ||
@@ -112,6 +112,7 @@ MAN = BIO_f_ssl.3 \ | |||
112 | SSL_set_connect_state.3 \ | 112 | SSL_set_connect_state.3 \ |
113 | SSL_set_fd.3 \ | 113 | SSL_set_fd.3 \ |
114 | SSL_set_max_send_fragment.3 \ | 114 | SSL_set_max_send_fragment.3 \ |
115 | SSL_set_psk_use_session_callback.3 \ | ||
115 | SSL_set_session.3 \ | 116 | SSL_set_session.3 \ |
116 | SSL_set_shutdown.3 \ | 117 | SSL_set_shutdown.3 \ |
117 | SSL_set_tmp_ecdh.3 \ | 118 | SSL_set_tmp_ecdh.3 \ |
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 new file mode 100644 index 0000000000..7f2bfcc010 --- /dev/null +++ b/src/lib/libssl/man/SSL_set_psk_use_session_callback.3 | |||
@@ -0,0 +1,86 @@ | |||
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 . | ||