1UPSCLI_INIT(3) NUT Manual UPSCLI_INIT(3)
2
3
4
6 upscli_init - Initialize upsclient module specifying security
7 properties.
8
10 #include <upsclient.h>
11
12 int upscli_init(int certverify, const char *certpath,
13 const char *certname, const char *certpasswd);
14
16 The upscli_init() function initialize upsclient module and set many
17 SSL-related properties: certverify to 1 makes certificate verification
18 required for all SSL connections and certpath is the location of
19 certificate database.
20
21 If compiled with OpenSSL, certpath refers to a .pem file containing
22 certificates and if compiled with NSS, certpath refers to a directory
23 containing database files.
24
25 If compiled with NSS and using SSL, you can specify certname the name
26 of the certificate to send to upsd and certpasswd the password used to
27 decrypt certificate private key.
28
29 You can call upscli_add_host_cert(3) to register specific host security
30 policy before initialize connections to them.
31
32 You must call upscli_cleanup(3) when exiting application.
33
35 The upscli_init() function returns 1 on success, or -1 if an error
36 occurs.
37
39 upscli_add_host_cert(3), upscli_cleanup(3), upscli_disconnect(3),
40 upscli_fd(3), upscli_splitaddr(3), upscli_splitname(3), upscli_ssl(3),
41 upscli_strerror(3), upscli_upserror(3)
42
43
44
45Network UPS Tools 2.7.3. 03/02/2016 UPSCLI_INIT(3)