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

NAME

6       gnutls_certificate_client_set_retrieve_function - API function
7

SYNOPSIS

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

ARGUMENTS

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

DESCRIPTION

23       This  function  sets  a  callback to be called in order to retrieve the
24       certificate to be used in  the  handshake.   You  are  advised  to  use
25       gnutls_certificate_set_retrieve_function2()  because  it  is  much more
26       efficient in the processing it requires from gnutls.
27
28       The callback's function prototype is: int (*callback)(gnutls_session_t,
29       const  gnutls_datum_t*  req_ca_dn,  int  nreqs,  const  gnutls_pk_algo‐
30       rithm_t* pk_algos, int pk_algos_length, gnutls_retr_st* st);
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        st should contain the certificates and private keys.
43
44       If the callback function is provided then gnutls will call it,  in  the
45       handshake,  if  a certificate is requested by the server (and after the
46       certificate request message has been received).
47
48       The callback function should set the certificate list to be  sent,  and
49       return  0 on success. If no certificate was selected then the number of
50       certificates should be set to zero. The value (-1) indicates error  and
51       the handshake will be terminated.
52

REPORTING BUGS

54       Report bugs to <bugs@gnutls.org>.
55       Home page: http://www.gnutls.org
56
57
59       Copyright © 2001-2014 Free Software Foundation, Inc..
60       Copying  and  distribution  of this file, with or without modification,
61       are permitted in any medium  without  royalty  provided  the  copyright
62       notice and this notice are preserved.
63

SEE ALSO

65       The  full  documentation  for gnutls is maintained as a Texinfo manual.
66       If the /usr/share/doc/gnutls/ directory does not contain the HTML  form
67       visit
68
69       http://www.gnutls.org/manual/
70
71gnutls                      gnutls_c3e.r3t.i2f9icate_client_set_retrieve_function(3)
Impressum