diff options
author | schwarze <> | 2016-11-05 15:32:20 +0000 |
---|---|---|
committer | schwarze <> | 2016-11-05 15:32:20 +0000 |
commit | 5af30545c000c195ca6e44f207da004e5780ddb5 (patch) | |
tree | 1672f1234352c29443fcacb44e22f1b20f174d99 /src/lib/libssl/doc/SSL_CTX_use_psk_identity_hint.3 | |
parent | ba7c6bac5d2c870a4d1c1ce9f08db5e57c660625 (diff) | |
download | openbsd-5af30545c000c195ca6e44f207da004e5780ddb5.tar.gz openbsd-5af30545c000c195ca6e44f207da004e5780ddb5.tar.bz2 openbsd-5af30545c000c195ca6e44f207da004e5780ddb5.zip |
move manual pages from doc/ to man/ for consistency with other
libraries, in particular considering that there are unrelated
files in doc/; requested by jsing@ and beck@
Diffstat (limited to 'src/lib/libssl/doc/SSL_CTX_use_psk_identity_hint.3')
-rw-r--r-- | src/lib/libssl/doc/SSL_CTX_use_psk_identity_hint.3 | 110 |
1 files changed, 0 insertions, 110 deletions
diff --git a/src/lib/libssl/doc/SSL_CTX_use_psk_identity_hint.3 b/src/lib/libssl/doc/SSL_CTX_use_psk_identity_hint.3 deleted file mode 100644 index 00c92b51ab..0000000000 --- a/src/lib/libssl/doc/SSL_CTX_use_psk_identity_hint.3 +++ /dev/null | |||
@@ -1,110 +0,0 @@ | |||
1 | .\" | ||
2 | .\" $OpenBSD: SSL_CTX_use_psk_identity_hint.3,v 1.2 2014/12/02 14:11:01 jmc Exp $ | ||
3 | .\" | ||
4 | .Dd $Mdocdate: December 2 2014 $ | ||
5 | .Dt SSL_CTX_USE_PSK_IDENTITY_HINT 3 | ||
6 | .Os | ||
7 | .Sh NAME | ||
8 | .Nm SSL_CTX_use_psk_identity_hint , | ||
9 | .Nm SSL_use_psk_identity_hint , | ||
10 | .Nm SSL_CTX_set_psk_server_callback , | ||
11 | .Nm SSL_set_psk_server_callback | ||
12 | .Nd set PSK identity hint to use | ||
13 | .Sh SYNOPSIS | ||
14 | .In openssl/ssl.h | ||
15 | .Ft int | ||
16 | .Fn SSL_CTX_use_psk_identity_hint "SSL_CTX *ctx" "const char *hint" | ||
17 | .Ft int | ||
18 | .Fn SSL_use_psk_identity_hint "SSL *ssl" "const char *hint" | ||
19 | .Ft void | ||
20 | .Fo SSL_CTX_set_psk_server_callback | ||
21 | .Fa "SSL_CTX *ctx" | ||
22 | .Fa "unsigned int (*callback)(SSL *ssl, const char *identity, unsigned char *psk, int max_psk_len)" | ||
23 | .Fc | ||
24 | .Ft void | ||
25 | .Fo SSL_set_psk_server_callback | ||
26 | .Fa "SSL *ssl" | ||
27 | .Fa "unsigned int (*callback)(SSL *ssl, const char *identity, unsigned char *psk, int max_psk_len)" | ||
28 | .Fc | ||
29 | .Sh DESCRIPTION | ||
30 | .Fn SSL_CTX_use_psk_identity_hint | ||
31 | sets the given | ||
32 | .Dv NULL Ns | ||
33 | -terminated PSK identity hint | ||
34 | .Fa hint | ||
35 | to SSL context object | ||
36 | .Fa ctx . | ||
37 | .Fn SSL_use_psk_identity_hint | ||
38 | sets the given | ||
39 | .Dv NULL Ns | ||
40 | -terminated | ||
41 | PSK identity hint | ||
42 | .Fa hint | ||
43 | to SSL connection object | ||
44 | .Fa ssl . | ||
45 | If | ||
46 | .Fa hint | ||
47 | is | ||
48 | .Dv NULL | ||
49 | the current hint from | ||
50 | .Fa ctx | ||
51 | or | ||
52 | .Fa ssl | ||
53 | is deleted. | ||
54 | .Pp | ||
55 | In the case where PSK identity hint is | ||
56 | .Dv NULL , | ||
57 | the server does not send the | ||
58 | .Em ServerKeyExchange | ||
59 | message to the client. | ||
60 | .Pp | ||
61 | A server application must provide a callback function which is called when the | ||
62 | server receives the | ||
63 | .Em ClientKeyExchange | ||
64 | message from the client. | ||
65 | The purpose of the callback function is to validate the received PSK identity | ||
66 | and to fetch the pre-shared key used during the connection setup phase. | ||
67 | The callback is set using functions | ||
68 | .Fn SSL_CTX_set_psk_server_callback | ||
69 | or | ||
70 | .Fn SSL_set_psk_server_callback . | ||
71 | The callback function is given the connection in parameter | ||
72 | .Fa ssl , | ||
73 | .Dv NULL Ns | ||
74 | -terminated PSK identity sent by the client in parameter | ||
75 | .Fa identity , | ||
76 | and a buffer | ||
77 | .Fa psk | ||
78 | of length | ||
79 | .Fa max_psk_len | ||
80 | bytes where the pre-shared key is to be stored. | ||
81 | .Sh RETURN VALUES | ||
82 | .Fn SSL_CTX_use_psk_identity_hint | ||
83 | and | ||
84 | .Fn SSL_use_psk_identity_hint | ||
85 | return 1 on success, 0 otherwise. | ||
86 | .Pp | ||
87 | Return values from the server callback are interpreted as follows: | ||
88 | .Bl -tag -width Ds | ||
89 | .It >0 | ||
90 | PSK identity was found and the server callback has provided the PSK | ||
91 | successfully in parameter | ||
92 | .Fa psk . | ||
93 | Return value is the length of | ||
94 | .Fa psk | ||
95 | in bytes. | ||
96 | It is an error to return a value greater than | ||
97 | .Fa max_psk_len . | ||
98 | .Pp | ||
99 | If the PSK identity was not found but the callback instructs the protocol to | ||
100 | continue anyway, the callback must provide some random data to | ||
101 | .Fa psk | ||
102 | and return the length of the random data, so the connection will fail with | ||
103 | .Dq decryption_error | ||
104 | before it will be finished completely. | ||
105 | .It 0 | ||
106 | PSK identity was not found. | ||
107 | An | ||
108 | .Dq unknown_psk_identity | ||
109 | alert message will be sent and the connection setup fails. | ||
110 | .El | ||