UPSCLI_ADD_HOST_CERT(3)

✨ UPSCLI_ADD_HOST_CERT ✨

okay bestie, so this is upscli_add_host_cert from the NUT manual, section 3 πŸ’– it's the one where you tell your lib "hey, here's the security tea for this specific host" and she remembers it forever. no cap.


🌸 NAME 🌸

upscli_add_host_cert β€” Register a security rule for an host. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <upsclient.h>

void upscli_add_host_cert(
        const char* hostname,
        const char* certname,
        int certverify,
        int forcessl);

πŸ’… DESCRIPTION πŸ’…

So like, the upscli_add_host_cert() function registers a security rule that's associated to the hostname. Every single connection to this host uses this rule. periodt. πŸ”₯

The rule is composed of three lil ingredients, and you're gonna want to know all of them:

  • the certificate name certname expected for the host πŸŽ€
  • certverify, which says whether the certificate must be validated for the host βœ…
  • forcessl, which says whether a secured connection must be used to connect to the host πŸ”’
⚠️ Note β€” real talk, bestie: this call currently only functions if libupsclient has been compiled with NSS support. If instead it was compiled with OpenSSL support, this method contains an empty definition and will take no action when called. 😭 Starting with NUT v2.8.5, you can use upscli_ssl_caps(3) from consumer code to query the library about its build circumstances (whether it supports SSL, and which backend(s)). iykyk πŸ’œ

🌈 RETURN VALUE 🌈

upscli_add_host_cert() returns no value. that's it. that's the whole vibe. she does her thing and gives you nothing back, and honestly? iconic. πŸ‘‘


⭐ SEE ALSO ⭐


okay that's the whole page, bestie, you ate that 🫢 and for the cute sign-off: this was Network UPS Tools 2.8.5, dated 10/07/2026 β€” main character energy from the NUT manual, fr fr πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from