1gnutls_certificate_client_setg_nruettlrsi_ecvgeenr_utftiulfnsicctaitoen_(c3l)ient_set_retrieve_function(3)
2
3
4

NAME

6       gnutls_certificate_client_set_retrieve_function  -  Used to set a call‐
7       back to retrieve the certificate
8

SYNOPSIS

10       #include <gnutls/gnutls.h>
11
12       void    gnutls_certificate_client_set_retrieve_function(gnutls_certifi‐
13       cate_credentials_t  cred, gnutls_certificate_client_retrieve_function *
14       func);
15

ARGUMENTS

17       gnutls_certificate_credentials_t cred
18                   is a gnutls_certificate_credentials_t structure.
19
20       gnutls_certificate_client_retrieve_function * func
21                   is the callback function
22

DESCRIPTION

24       This function sets a callback to be called in  order  to  retrieve  the
25       certificate  to be used in the handshake.  The callback's function pro‐
26       totype  is:  int  (*callback)(gnutls_session_t,  const  gnutls_datum_t*
27       req_ca_dn,    int    nreqs,    gnutls_pk_algorithm_t*   pk_algos,   int
28       pk_algos_length, gnutls_retr_st* st);
29
30       st should contain the certificates and private keys.
31
32       req_ca_cert, is only used in X.509 certificates.  Contains a list  with
33       the  CA  names  that  the server considers trusted.  Normally we should
34       send a certificate that is signed by one of these CAs. These names  are
35       DER   encoded.  To  get  a  more  meaningful  value  use  the  function
36       gnutls_x509_rdn_get().
37
38       pk_algos, contains a list  with  server's  acceptable  signature  algo‐
39       rithms.   The  certificate  returned  should support the server's given
40       algorithms.
41
42       If the callback function is provided then gnutls will call it,  in  the
43       handshake, after the certificate request message has been received.
44
45       The  callback  function should set the certificate list to be sent, and
46       return 0 on success. If no certificate was selected then the number  of
47       certificates  should be set to zero. The value (-1) indicates error and
48       the handshake will be terminated.
49

REPORTING BUGS

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

SEE ALSO

60       The full documentation for gnutls is maintained as  a  Texinfo  manual.
61       If  the  info  and gnutls programs are properly installed at your site,
62       the command
63
64              info gnutls
65
66       should give you access to the complete manual.
67
68
69
70gnutls                      gnutls_ce1r.t6i.f3icate_client_set_retrieve_function(3)
Impressum