summaryrefslogtreecommitdiff
path: root/src/lib/libssl/doc/SSL_CTX_set_psk_client_callback.3
diff options
context:
space:
mode:
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.368
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, \
17unsigned 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, \
23unsigned int max_identity_len, unsigned char *psk, unsigned int max_psk_len)"
24.Fc
25.Sh DESCRIPTION
26A client application must provide a callback function which is called
27when the client is sending the ClientKeyExchange message to the server.
28.Pp
29The purpose of the callback function is to select the PSK identity and
30the pre-shared key to use during the connection setup phase.
31.Pp
32The callback is set using functions
33.Fn SSL_CTX_set_psk_client_callback
34or
35.Fn SSL_set_psk_client_callback .
36The callback function is given the connection in parameter
37.Fa ssl ,
38a
39.Dv NULL Ns
40-terminated PSK identity hint sent by the server in parameter
41.Fa hint ,
42a buffer
43.Fa identity
44of length
45.Fa max_identity_len
46bytes where the resulting
47.Dv NULL Ns
48-terminated identity is to be stored, and a buffer
49.Fa psk
50of
51length
52.Fa max_psk_len
53bytes where the resulting pre-shared key is to be stored.
54.Sh NOTES
55Note that parameter
56.Fa hint
57given to the callback may be
58.Dv NULL .
59.Sh RETURN VALUES
60Return values from the client callback are interpreted as follows:
61.Pp
62On success (callback found a PSK identity and a pre-shared key to use)
63the length (> 0) of
64.Fa psk
65in bytes is returned.
66.Pp
67Otherwise or on errors callback should return 0.
68In this case the connection setup fails.