.\"Generated by db2man.xsl. Don't modify this, modify the source.
.de Sh \" Subsection
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Ip \" List item
.br
.ie \\n(.$>=3 .ne \\$3
.el .ne 3
.IP "\\$1" \\$2
..
.TH "NE_SSL_TRUST_CERT" 3 "20 January 2006" "neon 0.25.5" "neon API reference"
.SH NAME
ne_ssl_trust_cert, ne_ssl_trust_default_ca \- functions to indicate that certificates are trusted
.SH "SYNOPSIS"
.ad l
.hy 0

#include <ne_session\&.h>
.sp
.HP 24
void\ \fBne_ssl_trust_cert\fR\ (ne_session\ *\fIsession\fR, const\ ne_ssl_certificate\ *\fIcert\fR);
.HP 30
void\ \fBne_ssl_trust_default_ca\fR\ (ne_session\ *\fIsession\fR);
.ad
.hy

.SH "DESCRIPTION"

.PP
To indicate that a given certificate is trusted by the user, the certificate object can be passed to \fBne_ssl_trust_cert\fR\&. The certificate object is duplicated internally and can subequently be destroyed\&.

.PP
The SSL library in use by neon may include a default set of CA certificates; calling the \fBne_ssl_trust_default_ca\fR function will indicate that these CAs are trusted by the user\&.

.SH "EXAMPLES"

.PP
Load the CA certificate stored in \fI/path/to/cacert\&.pem\fR:

.nf
ne_session *sess = ne_session_create(\&.\&.\&.);
ne_ssl_certificate *cert = ne_ssl_cert_read("/path/to/cacert\&.pem");

if (cert) {
   ne_ssl_trust_cert(sess, cert);
   ne_ssl_cert_free(cert);
} else {
   printf("Could not load CA cert: %s\\n", ne_get_error(sess));
}
.fi

.SH "SEE ALSO"

.PP
\fBne_ssl_cert_read\fR(3), \fBne_ssl_cert_import\fR(3), \fBne_ssl_cert_free\fR(3)

.SH AUTHOR
Joe Orton <neon@webdav\&.org>.
