upscli_add_host_cert - Man Page

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

The upscli_add_host_cert() function registers a security rule associated to the hostname​. All connections to this host use this rule​.

The rule is composed of the certificate name certname expected for the host, certverify if the certificate must be validated for the host and forcessl if a secured connection must be used to connect to the host​.

Note

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))​.

Return Value

upscli_add_host_cert() returns no value​.

See Also

upscli_init(3), upscli_connect(3), upscli_ssl(3), upscli_ssl_caps(3), upscli_strerror(3), upscli_upserror(3)

Referenced By

nut(7), upscli_connect(3), upsclient(3), upscli_init(3).

08/25/2026 Network UPS Tools 2.8.5 NUT Manual