NE_SSL_CERT_CMP(3)
π NE_SSL_CERT_CMP(3) β the neon API reference, bestie edition π
okay so this is a page straight out of the neon manual (yes, that neon, the API reference one), and it's literally all about certificate objects β comparing them, freeing them, fingerprinting them, checking their validity window. six functions, one page, zero skips. let's go β¨
πΈ NAME πΈ
ne_ssl_cert_cmp, ne_ssl_cert_free, ne_ssl_cert_digest, ne_ssl_cert_hdigest, ne_ssl_cert_validity, ne_ssl_cert_validity_time β the girlies that operate on certificate objects π«Ά
β¨ SYNOPSIS β¨
#include <ne_header.h>
int ne_ssl_cert_cmp(const ne_ssl_certificate *c1,
const ne_ssl_certificate *c2);
void ne_ssl_cert_free(ne_ssl_certificate *cert);
int ne_ssl_cert_digest(const ne_ssl_certificate *c1, char *digest);
char *ne_ssl_cert_hdigest(const ne_ssl_certificate *c1,
unsigned int flags);
void ne_ssl_cert_validity_time(const ne_ssl_certificate *cert,
time_t *from, time_t *until);
void ne_ssl_cert_validity(const ne_ssl_certificate *cert, char *from,
char *until);
like, screenshot this, it's the whole cast π
π DESCRIPTION π
ne_ssl_cert_cmp β the vibe check πͺ
you use ne_ssl_cert_cmp to compare two certificate objects. it returns zero if they refer to the same certificate, and non-zero otherwise. that's it, that's the whole function, no cap.
ne_ssl_cert_free β the goodbye π
ne_ssl_cert_free destroys a certificate object once you're done with it and it's no longer needed. be a good citizen and actually call it, bestie. π§
ne_ssl_cert_digest β fingerprint reveal π
ne_ssl_cert_digest writes a human-readable fingerprint as a NUL-terminated string into the digest buffer you hand it, formatted like "aa:bb...:ff". the digest buffer must be at least NE_SSL_DIGESTLEN bytes in length. queen of precision, we stan. π
ne_ssl_cert_hdigest β the malloc'd twin π
ne_ssl_cert_hdigest returns a human-readable fingerprint for the certificate object. the flags parameter specifies the hash formatting options as if passed to ne_strhash(3) (iykyk). the returned string is malloc-allocated and must be freed after use β not me having to remind you to free() your stuff π
ne_ssl_cert_validity_time β when's the window β°
ne_ssl_cert_validity_time retrieves both the time from which the certificate is valid from and until. each time comes back through the from and until parameters, and they're written as (time_t)-1 if either time cannot be represented as a time_t value. tragic, but that's the rule.
ne_ssl_cert_validity β same energy, but strings π
ne_ssl_cert_validity similarly writes the validity times into the string buffers you provide, using RFC 1123-style date formatting (not localized β we're keeping it universal, periodt). the output parameters must be at least NE_SSL_VDATELEN bytes in length. and the best part: either parameter can be passed as NULL. flexible icon behavior β¨
π₯ RETURN VALUE π₯
ne_ssl_cert_cmpreturns0if the certificates are the same, and non-zero otherwise.ne_ssl_cert_digestreturns0on success or non-zero on error.- the return value of
ne_ssl_cert_hdigestis a NUL-terminated malloc-allocated string, orNULLif the hash cannot be created. π
lowkey important:ne_ssl_cert_freeandne_ssl_cert_validity/ne_ssl_cert_validity_timereturn nothing β they'revoid, so don't go checking them for status, bestie. π
π¦ HISTORY π¦
ne_ssl_cert_hdigest is available in in neon 0.32.0 and later. (yes it says "in in", we're keeping it, it's iconic, the manpage said it first π)
β SEE ALSO β
ne_strhash(3)β go read it, it's giving main character energy π
π COPYRIGHT π
Copyright Β© 2001-2026 Joe Orton
okay that's the whole page, you're officially a certificate object expert now, no notes π«Άβ¨
β from the neon manual, dated 03/20/2026 π (that's the source/version and date, folded in cute so the footer stays slay) π
π¦ 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