1gnutls_certificate_set_retrieve_funcgtgninuoutntl(ls3s_)certificate_set_retrieve_function(3)
2
3
4
6 gnutls_certificate_set_retrieve_function - API function
7
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
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
22 This function sets a callback to be called in order to retrieve the
23 certificate to be used in the handshake.
24
25 The callback's function prototype is: int (*callback)(gnutls_session_t,
26 const gnutls_datum_t* req_ca_dn, int nreqs, const gnutls_pk_algo‐
27 rithm_t* pk_algos, int pk_algos_length, gnutls_retr2_st* st);
28
29 req_ca_cert is only used in X.509 certificates. Contains a list with
30 the CA names that the server considers trusted. Normally we should
31 send a certificate that is signed by one of these CAs. These names are
32 DER encoded. To get a more meaningful value use the function
33 gnutls_x509_rdn_get().
34
35 pk_algos contains a list with server's acceptable signature algorithms.
36 The certificate returned should support the server's given algorithms.
37
38 st should contain the certificates and private keys.
39
40 If the callback function is provided then gnutls will call it, in the
41 handshake, after the certificate request message has been received.
42
43 In server side pk_algos and req_ca_dn are NULL.
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
51 Report bugs to <bug-gnutls@gnu.org>. GnuTLS home page:
52 http://www.gnu.org/software/gnutls/ General help using GNU software:
53 http://www.gnu.org/gethelp/
54
56 Copyright © 2008 Free Software Foundation.
57 Copying and distribution of this file, with or without modification,
58 are permitted in any medium without royalty provided the copyright
59 notice and this notice are preserved.
60
62 The full documentation for gnutls is maintained as a Texinfo manual.
63 If the info and gnutls programs are properly installed at your site,
64 the command
65
66 info gnutls
67
68 should give you access to the complete manual.
69
70
71
72gnutls 2g.n1u2t.l6s._1certificate_set_retrieve_function(3)