Debian Codegraph @

deps/libneon/doc/man/ne_ssl_trust_cert.3

raw
1 '\" t
2 .\" Title: ne_ssl_trust_cert
3 .\" Author:
4 .\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
5 .\" Date: 3 May 2011
6 .\" Manual: neon API reference
7 .\" Source: neon 0.29.6
8 .\" Language: English
9 .\"
10 .TH "NE_SSL_TRUST_CERT" "3" "3 May 2011" "neon 0.29.6" "neon API reference"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .SH "NAME"
31 ne_ssl_trust_cert, ne_ssl_trust_default_ca \- functions to indicate that certificates are trusted
32 .SH "SYNOPSIS"
33 .sp
34 .ft B
35 .nf
36 #include <ne_session\&.h>
37 .fi
38 .ft
39 .HP \w'void\ ne_ssl_trust_cert('u
40 .BI "void ne_ssl_trust_cert(ne_session\ *" "session" ", const\ ne_ssl_certificate\ *" "cert" ");"
41 .HP \w'void\ ne_ssl_trust_default_ca('u
42 .BI "void ne_ssl_trust_default_ca(ne_session\ *" "session" ");"
43 .SH "DESCRIPTION"
44 .PP
45 To indicate that a given certificate is trusted by the user, the certificate object can be passed to
46 \fBne_ssl_trust_cert\fR\&. The certificate object is duplicated internally and can subsequently be destroyed\&.
47 .PP
48 The SSL library in use by neon may include a default set of CA certificates; calling the
49 \fBne_ssl_trust_default_ca\fR
50 function will indicate that these CAs are trusted by the user\&.
51 .SH "EXAMPLES"
52 .PP
53 Load the CA certificate stored in
54 /path/to/cacert\&.pem:
55 .sp
56 .if n \{\
57 .RS 4
58 .\}
59 .nf
60 ne_session *sess = ne_session_create(\&.\&.\&.);
61 ne_ssl_certificate *cert = ne_ssl_cert_read("/path/to/cacert\&.pem");
62
63 if (cert) {
64 ne_ssl_trust_cert(sess, cert);
65 ne_ssl_cert_free(cert);
66 } else {
67 printf("Could not load CA cert: %s\en", ne_get_error(sess));
68 }
69 .fi
70 .if n \{\
71 .RE
72 .\}
73 .SH "SEE ALSO"
74 .PP
75 ne_ssl_cert_read,
76 ne_ssl_cert_import,
77 ne_ssl_cert_free
78 .SH "AUTHOR"
79 .PP
80 \fBJoe Orton\fR <\&[email protected]\&>
81 .RS 4
82 Author.
83 .RE
84 .SH "COPYRIGHT"
85 .br