Tizen 2.0 Release
[external/libgnutls26.git] / doc / manpages / gnutls_certificate_set_x509_trust_file.3
1 .\" DO NOT MODIFY THIS FILE!  It was generated by gdoc.
2 .TH "gnutls_certificate_set_x509_trust_file" 3 "2.12.6.1" "gnutls" "gnutls"
3 .SH NAME
4 gnutls_certificate_set_x509_trust_file \- API function
5 .SH SYNOPSIS
6 .B #include <gnutls/gnutls.h>
7 .sp
8 .BI "int gnutls_certificate_set_x509_trust_file(gnutls_certificate_credentials_t " res ", const char * " cafile ", gnutls_x509_crt_fmt_t " type ");"
9 .SH ARGUMENTS
10 .IP "gnutls_certificate_credentials_t res" 12
11 is a \fBgnutls_certificate_credentials_t\fP structure.
12 .IP "const char * cafile" 12
13 is a file containing the list of trusted CAs (DER or PEM list)
14 .IP "gnutls_x509_crt_fmt_t type" 12
15 is PEM or DER
16 .SH "DESCRIPTION"
17 This function adds the trusted CAs in order to verify client or
18 server certificates. In case of a client this is not required to
19 be called if the certificates are not verified using
20 \fBgnutls_certificate_verify_peers2()\fP.  This function may be called
21 multiple times.
22
23 In case of a server the names of the CAs set here will be sent to
24 the client if a certificate request is sent. This can be disabled
25 using \fBgnutls_certificate_send_x509_rdn_sequence()\fP.
26
27 This function can also accept PKCS \fB11\fP URLs. In that case it
28 will import all certificates that are marked as trusted.
29 .SH "RETURNS"
30 number of certificates processed, or a negative value on
31 error.
32 .SH "REPORTING BUGS"
33 Report bugs to <bug-gnutls@gnu.org>.
34 GnuTLS home page: http://www.gnu.org/software/gnutls/
35 General help using GNU software: http://www.gnu.org/gethelp/
36 .SH COPYRIGHT
37 Copyright \(co 2008 Free Software Foundation.
38 .br
39 Copying and distribution of this file, with or without modification,
40 are permitted in any medium without royalty provided the copyright
41 notice and this notice are preserved.
42 .SH "SEE ALSO"
43 The full documentation for
44 .B gnutls
45 is maintained as a Texinfo manual.  If the
46 .B info
47 and
48 .B gnutls
49 programs are properly installed at your site, the command
50 .IP
51 .B info gnutls
52 .PP
53 should give you access to the complete manual.