1gnutls_psk_set_client_credentialsg_nfuutnglcnstu_itpolsnsk3_(s3e)t_client_credentials_function3(3)
2
3
4

NAME

6       gnutls_psk_set_client_credentials_function3 - API function
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       void gnutls_psk_set_client_credentials_function3(gnutls_psk_client_cre‐
12       dentials_t cred, gnutls_psk_client_credentials_function3 * func);
13

ARGUMENTS

15       gnutls_psk_client_credentials_t cred
16                   is a gnutls_psk_server_credentials_t type.
17
18       gnutls_psk_client_credentials_function3 * func
19                   is the callback function
20

DESCRIPTION

22       This function can be used to set a callback to  retrieve  the  username
23       and  password  for  client PSK authentication.  The callback's function
24       form is: int  (*callback)(gnutls_session_t,  gnutls_datum_t*  username,
25       gnutls_datum_t*   key,  gnutls_datum_t*  context,  gnutls_psk_key_flags
26       *flags);
27
28       This  callback  function  has   the   same   semantics   as   that   of
29       gnutls_psk_set_client_credentials_function2(), but it returns flags as‐
30       sociated with the key.  The callback may import external PSK using  the
31       method  described in RFC 9258 by using gnutls_psk_format_imported_iden‐
32       tity().
33
34       The data field of  username ,  key , and  context must be allocated us‐
35       ing  gnutls_malloc().  The  username should be an ASCII string or UTF-8
36       string. In case of a UTF-8 string it is recommended to be following the
37       PRECIS framework for usernames (rfc8265).
38
39       The callback function will be called once per handshake.
40
41       The  callback function should return 0 on success.  -1 indicates an er‐
42       ror.
43

REPORTING BUGS

45       Report bugs to <bugs@gnutls.org>.
46       Home page: https://www.gnutls.org
47
48
50       Copyright © 2001-2023 Free Software Foundation, Inc., and others.
51       Copying and distribution of this file, with  or  without  modification,
52       are  permitted in any medium without royalty provided the copyright no‐
53       tice and this notice are preserved.
54

SEE ALSO

56       The full documentation for gnutls is maintained as  a  Texinfo  manual.
57       If  the /usr/share/doc/gnutls/ directory does not contain the HTML form
58       visit
59
60       https://www.gnutls.org/manual/
61
62gnutls                          gnutl3s._8p.s2k_set_client_credentials_function3(3)
Impressum