1 .\" DO NOT MODIFY THIS FILE! It was generated by gdoc.
2 .TH "gnutls_certificate_client_set_retrieve_function" 3 "2.12.6.1" "gnutls" "gnutls"
4 gnutls_certificate_client_set_retrieve_function \- API function
6 .B #include <gnutls/gnutls.h>
8 .BI "void gnutls_certificate_client_set_retrieve_function(gnutls_certificate_credentials_t " cred ", gnutls_certificate_client_retrieve_function * " func ");"
10 .IP "gnutls_certificate_credentials_t cred" 12
11 is a \fBgnutls_certificate_credentials_t\fP structure.
12 .IP "gnutls_certificate_client_retrieve_function * func" 12
13 is the callback function
15 This function sets a callback to be called in order to retrieve the
16 certificate to be used in the handshake.
18 The callback's function prototype is:
19 int (*callback)(gnutls_session_t, const gnutls_datum_t* req_ca_dn, int nreqs,
20 const gnutls_pk_algorithm_t* pk_algos, int pk_algos_length, gnutls_retr_st* st);
22 \fIreq_ca_cert\fP is only used in X.509 certificates.
23 Contains a list with the CA names that the server considers trusted.
24 Normally we should send a certificate that is signed
25 by one of these CAs. These names are DER encoded. To get a more
26 meaningful value use the function \fBgnutls_x509_rdn_get()\fP.
28 \fIpk_algos\fP contains a list with server's acceptable signature algorithms.
29 The certificate returned should support the server's given algorithms.
31 \fIst\fP should contain the certificates and private keys.
33 If the callback function is provided then gnutls will call it, in the
34 handshake, after the certificate request message has been received.
36 The callback function should set the certificate list to be sent,
37 and return 0 on success. If no certificate was selected then the
38 number of certificates should be set to zero. The value (\-1)
39 indicates error and the handshake will be terminated.
41 Report bugs to <bug-gnutls@gnu.org>.
42 GnuTLS home page: http://www.gnu.org/software/gnutls/
43 General help using GNU software: http://www.gnu.org/gethelp/
45 Copyright \(co 2008 Free Software Foundation.
47 Copying and distribution of this file, with or without modification,
48 are permitted in any medium without royalty provided the copyright
49 notice and this notice are preserved.
51 The full documentation for
53 is maintained as a Texinfo manual. If the
57 programs are properly installed at your site, the command
61 should give you access to the complete manual.