diff options
Diffstat (limited to 'src/lib/libssl/doc/SSL_CTX_set_psk_client_callback.3')
-rw-r--r-- | src/lib/libssl/doc/SSL_CTX_set_psk_client_callback.3 | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/src/lib/libssl/doc/SSL_CTX_set_psk_client_callback.3 b/src/lib/libssl/doc/SSL_CTX_set_psk_client_callback.3 deleted file mode 100644 index 40504ce59a..0000000000 --- a/src/lib/libssl/doc/SSL_CTX_set_psk_client_callback.3 +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | .\" | ||
2 | .\" $OpenBSD: SSL_CTX_set_psk_client_callback.3,v 1.2 2014/12/02 14:11:01 jmc Exp $ | ||
3 | .\" | ||
4 | .Dd $Mdocdate: December 2 2014 $ | ||
5 | .Dt SSL_CTX_SET_PSK_CLIENT_CALLBACK 3 | ||
6 | .Os | ||
7 | .Sh NAME | ||
8 | .Nm SSL_CTX_set_psk_client_callback , | ||
9 | .Nm SSL_set_psk_client_callback | ||
10 | .Nd set PSK client callback | ||
11 | .Sh SYNOPSIS | ||
12 | .In openssl/ssl.h | ||
13 | .Ft void | ||
14 | .Fo SSL_CTX_set_psk_client_callback | ||
15 | .Fa "SSL_CTX *ctx" | ||
16 | .Fa "unsigned int (*callback)(SSL *ssl, const char *hint, char *identity, \ | ||
17 | unsigned int max_identity_len, unsigned char *psk, unsigned int max_psk_len)" | ||
18 | .Fc | ||
19 | .Ft void | ||
20 | .Fo SSL_set_psk_client_callback | ||
21 | .Fa "SSL *ssl" | ||
22 | .Fa "unsigned int (*callback)(SSL *ssl, const char *hint, char *identity, \ | ||
23 | unsigned int max_identity_len, unsigned char *psk, unsigned int max_psk_len)" | ||
24 | .Fc | ||
25 | .Sh DESCRIPTION | ||
26 | A client application must provide a callback function which is called | ||
27 | when the client is sending the ClientKeyExchange message to the server. | ||
28 | .Pp | ||
29 | The purpose of the callback function is to select the PSK identity and | ||
30 | the pre-shared key to use during the connection setup phase. | ||
31 | .Pp | ||
32 | The callback is set using functions | ||
33 | .Fn SSL_CTX_set_psk_client_callback | ||
34 | or | ||
35 | .Fn SSL_set_psk_client_callback . | ||
36 | The callback function is given the connection in parameter | ||
37 | .Fa ssl , | ||
38 | a | ||
39 | .Dv NULL Ns | ||
40 | -terminated PSK identity hint sent by the server in parameter | ||
41 | .Fa hint , | ||
42 | a buffer | ||
43 | .Fa identity | ||
44 | of length | ||
45 | .Fa max_identity_len | ||
46 | bytes where the resulting | ||
47 | .Dv NULL Ns | ||
48 | -terminated identity is to be stored, and a buffer | ||
49 | .Fa psk | ||
50 | of | ||
51 | length | ||
52 | .Fa max_psk_len | ||
53 | bytes where the resulting pre-shared key is to be stored. | ||
54 | .Sh NOTES | ||
55 | Note that parameter | ||
56 | .Fa hint | ||
57 | given to the callback may be | ||
58 | .Dv NULL . | ||
59 | .Sh RETURN VALUES | ||
60 | Return values from the client callback are interpreted as follows: | ||
61 | .Pp | ||
62 | On success (callback found a PSK identity and a pre-shared key to use) | ||
63 | the length (> 0) of | ||
64 | .Fa psk | ||
65 | in bytes is returned. | ||
66 | .Pp | ||
67 | Otherwise or on errors callback should return 0. | ||
68 | In this case the connection setup fails. | ||