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       void ne_ssl_trust_cert(ne_session *session,
13                              const ne_ssl_certificate *cert);
14
15       void ne_ssl_trust_default_ca(ne_session *session);
16

DESCRIPTION

18       To indicate that a given certificate is trusted by the user, the
19       certificate object can be passed to ne_ssl_trust_cert. The certificate
20       object is duplicated internally and can subsequently be destroyed.
21
22       The SSL library in use by neon may include a default set of CA
23       certificates; calling the ne_ssl_trust_default_ca function will
24       indicate that these CAs are trusted by the user.
25

EXAMPLES

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

SEE ALSO

40       ne_ssl_cert_read, ne_ssl_cert_import, ne_ssl_cert_free
41

AUTHOR

43       Joe Orton <neon@lists.manyfish.co.uk>
44           Author.
45
47neon 0.29.3                     11 January 2010           NE_SSL_TRUST_CERT(3)
Impressum