1NE_SSL_TRUST_CERT(3)          neon API reference          NE_SSL_TRUST_CERT(3)
2
3
4

NAME

6       ne_ssl_trust_cert, ne_ssl_trust_default_ca - functions to indicate that
7       certificates are trusted
8

SYNOPSIS

10       #include <ne_session.h>
11
12
13       void ne_ssl_trust_cert (ne_session *session,
14                               const ne_ssl_certificate *cert);
15
16       void ne_ssl_trust_default_ca (ne_session *session);
17
18

DESCRIPTION

20       To  indicate  that a given certificate is trusted by the user, the cer‐
21       tificate object can be passed to ne_ssl_trust_cert. The certificate ob‐
22       ject is duplicated internally and can subequently be destroyed.
23
24
25       The SSL library in use by neon may include a default set of CA certifi‐
26       cates; calling the ne_ssl_trust_default_ca function will indicate  that
27       these CAs are trusted by the user.
28
29

EXAMPLES

31       Load the CA certificate stored in /path/to/cacert.pem:
32
33       ne_session *sess = ne_session_create(...);
34       ne_ssl_certificate *cert = ne_ssl_cert_read("/path/to/cacert.pem");
35
36       if (cert) {
37          ne_ssl_trust_cert(sess, cert);
38          ne_ssl_cert_free(cert);
39       } else {
40          printf("Could not load CA cert: %s\n", ne_get_error(sess));
41       }
42
43

SEE ALSO

45       ne_ssl_cert_read(3), ne_ssl_cert_import(3), ne_ssl_cert_free(3)
46
47

AUTHOR

49       Joe Orton <neon@webdav.org>.
50
51
52
53neon 0.25.5                     20 January 2006           NE_SSL_TRUST_CERT(3)
Impressum