UPSCLI_SSL_CAPS(3)

πŸ“¦
version 2.8.5 Β· 4 versions
, in arch rolling

✨ UPSCLI_SSL_CAPS(3) ✨

okay so bestie, this is a page from the NUT Manual and it's literally all about finding out whether your libupsclient build can do SSL, and if so, which kind πŸ’… no cap, that's the whole vibe.


🌸 NAME 🌸

upscli_ssl_caps, upscli_ssl_caps_descr β€” report the SSL capabilities of the current libupsclient build, either as a bitmap or as a string πŸŽ€

πŸ¦‹ SYNOPSIS πŸ¦‹

        #include <upsclient.h>

        /* Header above defines bitmap values:
         * UPSCLI_SSL_CAPS_NONE         - No ability to use SSL
         * UPSCLI_SSL_CAPS_OPENSSL      - Can use OpenSSL-specific setup
         * UPSCLI_SSL_CAPS_NSS          - Can use Mozilla NSS-specific setup
         */

        int upscli_ssl_caps(void);
        const char *upscli_ssl_caps_descr(void);

like, the header literally hands you the bitmap values, iykyk β€” UPSCLI_SSL_CAPS_NONE means no SSL ability at all, UPSCLI_SSL_CAPS_OPENSSL means you can do the OpenSSL-specific setup, and UPSCLI_SSL_CAPS_NSS means you can do the Mozilla NSS-specific setup ✨

πŸ’– DESCRIPTION πŸ’–

k so upscli_ssl_caps() returns an int, and that int is a bitmap of SSL capability flags πŸ”₯ like, these are the flags that might actually matter to you if you're consuming the upsclient(3) library β€” think stuff like how to set up your cryptographic material storage, and whether that should even have any effect when you're initializing connections πŸ‘‘

then we have upscli_ssl_caps_descr(), which returns a string with that same kind of info, but this one is primarily intended for humans 🫢 β€” for example, it's the perfect thing to drop into NUT client program banners 🌈

and ngl, if there's no built-in SSL support, you're not stuck β€” you can go explore alternative methods like SSH tunnels or the stunnel tool 🧚 bestie there are options fr fr.

⭐ RETURN VALUE ⭐

so here's the tea β˜• β€” upscli_ssl_caps() effectively returns:

  • 0 β€” if SSL support is missing entirely 😭
  • 1 β€” if OpenSSL can be used πŸ’š
  • 2 β€” if Mozilla NSS can be used πŸ’œ

and the reason it's like this is that, currently, the backends are exclusive β€” and that lowkey matters a lot because they're differently capable πŸ‘€ periodt.

in the future? it may return -1 in the event of an error, or, like, 3 if both OpenSSL and Mozilla NSS could be supported simultaneously β€” but the current code structure does not allow for that though πŸ™ˆ so don't get your hopes up yet.

πŸŽ€ SEE ALSO πŸŽ€


ngl this one's short but she's iconic πŸ’… go read the SEE ALSOs, bestie, they're giving main character energy πŸ‘‘

Network UPS Tools 2.8.5 🌸 06/21/2026 β€” mwah, that's the version and date, love u, bye πŸ«ΆπŸ’œ

πŸ“¦ where this page comes from
  • arch rolling: nut 2.8.5-2 Β· GPL-2.0-or-later AND GPL-3.0-or-later
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms