1gnutls_srp_set_client_credentials_gfnuungtcnltusit_olsnsr(p3_)set_client_credentials_function(3)
2
3
4
6 gnutls_srp_set_client_credentials_function - API function
7
9 #include <gnutls/gnutls.h>
10
11 void gnutls_srp_set_client_credentials_function(gnutls_srp_client_cre‐
12 dentials_t cred, gnutls_srp_client_credentials_function * func);
13
15 gnutls_srp_client_credentials_t cred
16 is a gnutls_srp_server_credentials_t type.
17
18 gnutls_srp_client_credentials_function * func
19 is the callback function
20
22 This function can be used to set a callback to retrieve the username
23 and password for client SRP authentication. The callback's function
24 form is:
25
26 int (*callback)(gnutls_session_t, char** username, char**password);
27
28 The username and password must be allocated using gnutls_malloc().
29
30 The username should be an ASCII string or UTF-8 string. In case of a
31 UTF-8 string it is recommended to be following the PRECIS framework for
32 usernames (rfc8265). The password can be in ASCII format, or normalized
33 using gnutls_utf8_password_normalize().
34
35 The callback function will be called once per handshake before the ini‐
36 tial hello message is sent.
37
38 The callback should not return a negative error code the second time
39 called, since the handshake procedure will be aborted.
40
41 The callback function should return 0 on success. -1 indicates an er‐
42 ror.
43
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
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 gnut3l.s8_.s2rp_set_client_credentials_function(3)