Tizen 2.0 Release
[external/libgnutls26.git] / doc / manpages / gnutls_certificate_client_set_retrieve_function.3
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"
3 .SH NAME
4 gnutls_certificate_client_set_retrieve_function \- API function
5 .SH SYNOPSIS
6 .B #include <gnutls/gnutls.h>
7 .sp
8 .BI "void gnutls_certificate_client_set_retrieve_function(gnutls_certificate_credentials_t " cred ", gnutls_certificate_client_retrieve_function * " func ");"
9 .SH ARGUMENTS
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
14 .SH "DESCRIPTION"
15 This function sets a callback to be called in order to retrieve the
16 certificate to be used in the handshake.
17
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);
21
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.
27
28 \fIpk_algos\fP contains a list with server's acceptable signature algorithms.
29 The certificate returned should support the server's given algorithms.
30
31 \fIst\fP should contain the certificates and private keys.
32
33 If the callback function is provided then gnutls will call it, in the
34 handshake, after the certificate request message has been received.
35
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.
40 .SH "REPORTING BUGS"
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/
44 .SH COPYRIGHT
45 Copyright \(co 2008 Free Software Foundation.
46 .br
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.
50 .SH "SEE ALSO"
51 The full documentation for
52 .B gnutls
53 is maintained as a Texinfo manual.  If the
54 .B info
55 and
56 .B gnutls
57 programs are properly installed at your site, the command
58 .IP
59 .B info gnutls
60 .PP
61 should give you access to the complete manual.