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 string.
33 In case of a UTF-8 string it is recommended to be following the PRECIS
34 framework for usernames (rfc8265). The key can be either in raw byte
35 format or in Hex format (without the 0x prefix).
36
38 On success, GNUTLS_E_SUCCESS (0) is returned, otherwise an error code
39 is returned.
40
42 Report bugs to <bugs@gnutls.org>.
43 Home page: https://www.gnutls.org
44
45
47 Copyright © 2001- Free Software Foundation, Inc., and others.
48 Copying and distribution of this file, with or without modification,
49 are permitted in any medium without royalty provided the copyright
50 notice and this notice are preserved.
51
53 The full documentation for gnutls is maintained as a Texinfo manual.
54 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
55 visit
56
57 https://www.gnutls.org/manual/
58
59gnutls 3.6.15gnutls_psk_set_client_credentials(3)