UPSCLI_SSL_CAPS(3)
β¨ 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