1gnutls_psk_set_server_credentialsg_nfuutnglcnstu_itpolsnsk2_(s3e)t_server_credentials_function2(3)
2
3
4

NAME

6       gnutls_psk_set_server_credentials_function2 - API function
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       void gnutls_psk_set_server_credentials_function2(gnutls_psk_server_cre‐
12       dentials_t cred, gnutls_psk_server_credentials_function2 func);
13

ARGUMENTS

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

DESCRIPTION

22       This function can be used to set a callback to retrieve the user's  PSK
23       credentials.    The   callback's   function   form   is:   int  (*call‐
24       back)(gnutls_session_t, const gnutls_datum_t* username, gnutls_datum_t*
25       key);
26
27       This   callback   function   has   the   same   semantics  as  that  of
28       gnutls_psk_set_server_credentials_function(), but it allows  non-string
29       usernames to be used.
30
31        username  contains  the  actual  username.  The  key must be filled in
32       using the gnutls_malloc().
33
34       In case the callback returned a negative number then gnutls will assume
35       that the username does not exist.
36
37       The  callback  function  will  only  be called once per handshake.  The
38       callback function should return 0 on success,  while  -1  indicates  an
39       error.
40

REPORTING BUGS

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

SEE ALSO

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                          gnut3l.s6_.p1s5k_set_server_credentials_function2(3)
Impressum