1gnutls_credentials_set(3)           gnutls           gnutls_credentials_set(3)
2
3
4

NAME

6       gnutls_credentials_set  - Sets the needed credentials for the specified
7       authentication algorithm.
8

SYNOPSIS

10       #include <gnutls/gnutls.h>
11
12       int  gnutls_credentials_set(gnutls_session_t  session,   gnutls_creden‐
13       tials_type_t type, void * cred);
14

ARGUMENTS

16       gnutls_session_t session
17                   is a gnutls_session_t structure.
18
19       gnutls_credentials_type_t type
20                   is the type of the credentials
21
22       void * cred is a pointer to a structure.
23

DESCRIPTION

25       Sets the needed credentials for the specified type.  Eg username, pass‐
26       word - or public and private keys etc.  The (void* cred) parameter is a
27       structure that depends on the specified type and on the current session
28       (client or server).  [ In order to minimize  memory  usage,  and  share
29       credentials between several threads gnutls keeps a pointer to cred, and
30       not the whole cred structure. Thus you will have to keep the  structure
31       allocated until you call gnutls_deinit(). ]
32
33       For  GNUTLS_CRD_ANON cred should be gnutls_anon_client_credentials_t in
34       case  of  a   client.    In   case   of   a   server   it   should   be
35       gnutls_anon_server_credentials_t.
36
37       For  GNUTLS_CRD_SRP  cred  should be gnutls_srp_client_credentials_t in
38       case of a client, and gnutls_srp_server_credentials_t,  in  case  of  a
39       server.
40
41       For  GNUTLS_CRD_CERTIFICATE  cred  should be gnutls_certificate_creden‐
42       tials_t.
43

REPORTING BUGS

45       Report bugs to <bug-gnutls@gnu.org>.
46
48       Copyright © 2006 Free Software Foundation.
49       Permission is granted to make and distribute verbatim  copies  of  this
50       manual  provided  the  copyright  notice and this permission notice are
51       preserved on all copies.
52

SEE ALSO

54       The full documentation for gnutls is maintained as  a  Texinfo  manual.
55       If  the  info  and gnutls programs are properly installed at your site,
56       the command
57
58              info gnutls
59
60       should give you access to the complete manual.
61
62
63
64gnutls                               1.6.3           gnutls_credentials_set(3)
Impressum