'\" t
.\" Title: upscli_ssl_caps
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot
.\" Date: 04/07/2026
.\" Manual: NUT Manual
.\" Source: Network UPS Tools 2.8.5
.\" Language: English
.\"
.TH "UPSCLI_SSL_CAPS" "3" "04/07/2026" "Network UPS Tools 2\&.8\&.5" "NUT Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
upscli_ssl_caps, upscli_ssl_caps_descr \- Report SSL capabilities of the current libupsclient build as a bitmap or string
.SH "SYNOPSIS"
.sp
.nf
#include
/* 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);
.fi
.SH "DESCRIPTION"
.sp
The \fBupscli_ssl_caps\fR() function returns an int as a bitmap of SSL capability flags which may be of interest to the consumer of the \fBupsclient\fR(3) library (e\&.g\&. how to set up cryptographic material storage, and whether that should have any effect when initializing connections)\&.
.sp
The \fBupscli_ssl_caps_descr\fR() function returns a string with such information primarily intended for humans, e\&.g\&. to be used in NUT client program banners\&.
.sp
If there is no built\-in SSL support, alternative methods like SSH tunnels or the stunnel tool can be explored\&.
.SH "RETURN VALUE"
.sp
The \fBupscli_ssl_caps\fR() function effectively returns \fI0\fR if SSL support is missing, \fI1\fR if OpenSSL can be used, or \fI2\fR if Mozilla NSS can be used, since currently the backends are exclusive and it matters because they are differently capable\&.
.sp
In the future it may return \fI\-1\fR in the event of an error, or e\&.g\&. \fI3\fR if both OpenSSL and Mozilla NSS could be supported simultaneously (current code structure does not allow for that though)\&.
.SH "SEE ALSO"
.sp
\fBupscli_ssl\fR(3), \fBupscli_report_build_details\fR(3)