1gnutls_certificate_set_retrieve_funcgtgninuoutntl(ls3s_)certificate_set_retrieve_function(3)
2
3
4

NAME

6       gnutls_certificate_set_retrieve_function - API function
7

SYNOPSIS

9       #include <gnutls/gnutls.h>
10
11       void   gnutls_certificate_set_retrieve_function(gnutls_certificate_cre‐
12       dentials_t cred, gnutls_certificate_retrieve_function * func);
13

ARGUMENTS

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

DESCRIPTION

22       This function sets a callback to be called in  order  to  retrieve  the
23       certificate  to  be  used  in  the  handshake.  You  are advised to use
24       gnutls_certificate_set_retrieve_function2() because  it  is  much  more
25       efficient in the processing it requires from gnutls.
26
27       The callback's function prototype is: int (*callback)(gnutls_session_t,
28       const  gnutls_datum_t*  req_ca_dn,  int  nreqs,  const  gnutls_pk_algo‐
29       rithm_t* pk_algos, int pk_algos_length, gnutls_retr2_st* st);
30
31        req_ca_dn  is  only  used in X.509 certificates.  Contains a list with
32       the CA names that the server considers  trusted.   Normally  we  should
33       send  a certificate that is signed by one of these CAs. These names are
34       DER  encoded.  To  get  a  more  meaningful  value  use  the   function
35       gnutls_x509_rdn_get().
36
37        pk_algos  contains  a  list  with  server's acceptable signature algo‐
38       rithms.  The certificate returned should  support  the  server's  given
39       algorithms.
40
41        st should contain the certificates and private keys.
42
43       If  the  callback function is provided then gnutls will call it, in the
44       handshake, after the certificate request message has been received.
45
46       In server side pk_algos and req_ca_dn are NULL.
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

SINCE

54       3.0
55

REPORTING BUGS

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

SEE ALSO

68       The  full  documentation  for gnutls is maintained as a Texinfo manual.
69       If the /usr/share/doc/gnutls/ directory does not contain the HTML  form
70       visit
71
72       http://www.gnutls.org/manual/
73
74gnutls                             g3n.u3t.l2s9_certificate_set_retrieve_function(3)
Impressum