1gnutls_psk_set_client_credentials(3)gnutlsgnutls_psk_set_client_credentials(3)
2
3
4
6 gnutls_psk_set_client_credentials - API function
7
9 #include <gnutls/gnutls.h>
10
11 int gnutls_psk_set_client_credentials(gnutls_psk_client_credentials_t
12 res, const char * username, const gnutls_datum_t * key,
13 gnutls_psk_key_flags flags);
14
16 gnutls_psk_client_credentials_t res
17 is a gnutls_psk_client_credentials_t type.
18
19 const char * username
20 is the user's zero-terminated userid
21
22 const gnutls_datum_t * key
23 is the user's key
24
25 gnutls_psk_key_flags flags
26 indicate the format of the key, either GNUTLS_PSK_KEY_RAW
27 or GNUTLS_PSK_KEY_HEX.
28
30 This function sets the username and password, in a
31 gnutls_psk_client_credentials_t type. Those will be used in PSK
32 authentication. username should be an ASCII string or UTF-8 strings
33 prepared using the "SASLprep" profile of "stringprep". The key can be
34 either in raw byte format or in Hex format (without the 0x prefix).
35
37 On success, GNUTLS_E_SUCCESS (0) is returned, otherwise an error code
38 is returned.
39
41 Report bugs to <bugs@gnutls.org>.
42 Home page: http://www.gnutls.org
43
44
46 Copyright © 2001-2018 Free Software Foundation, Inc., and others.
47 Copying and distribution of this file, with or without modification,
48 are permitted in any medium without royalty provided the copyright
49 notice and this notice are preserved.
50
52 The full documentation for gnutls is maintained as a Texinfo manual.
53 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
54 visit
55
56 http://www.gnutls.org/manual/
57
58gnutls 3.6.5gnutls_psk_set_client_credentials(3)