NE_SSL_TRUST_CERT(3)
π NE_SSL_TRUST_CERT(3) β neon API reference π
okay bestie, welcome to the neon API reference page for ne_ssl_trust_cert and ne_ssl_trust_default_ca. Itβs literally all about telling neon βyes, this certificate is trusted by the user,β no cap. π
πΈ NAME πΈ
ne_ssl_trust_cert,ne_ssl_trust_default_caβ functions to indicate that certificates are trusted. Thatβs the whole vibe check: youβre handing neon a trust signal. π«Ά
β¨ SYNOPSIS β¨
#include <ne_session.h>
void ne_ssl_trust_cert(ne_session *session,
const ne_ssl_certificate *cert);
void ne_ssl_trust_default_ca(ne_session *session);
π¦ DESCRIPTION π¦
So hereβs the tea: when you want to say a given certificate is trusted by the user, you pass that certificate object into ne_ssl_trust_cert. The certificate object gets duplicated internally, so you can destroy it afterwards and still be fine. Slay. π
The SSL library that neon is using may already include a default set of CA certificates. If you call ne_ssl_trust_default_ca, that tells neon those CAs are trusted by the user. Itβs giving βdefault trust set, but make it official.β π
π EXAMPLES π
Load the CA certificate stored in /path/to/cacert.pem:
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));
}
π§ HISTORY π§
Okay, important lore: ne_ssl_trust_default_ca is not safe to call for non-SSL sessions in versions of neon before 0.33.0. In 0.33.0 and later, this function is a no-op for non-SSL sessions. So if youβre on old neon, donβt be messy with it. π
π SEE ALSO π
π COPYRIGHT π
Copyright Β© 2001-2026 Joe Orton
π«Ά Thatβs the whole manual page, bestie β from neon, dated 03/20/2026. Bye! π
π¦ where this page comes from
- arch rolling: neon 0.37.1-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms