@@ -4,7 +4,8 @@ Module: NutUpsdConf
4
4
5
5
Author: Raphael Pinson <raphink@gmail.com>
6
6
Frederic Bohe <fredericbohe@eaton.com>
7
- Arnaud Quette <arnaud.quette@gmail.com>
7
+ Arnaud Quette <arnaud.quette@gmail.com>
8
+ Jim Klimov <jimklimov+nut@gmail.com>
8
9
9
10
About: License
10
11
This file is licensed under the GPL.
@@ -37,24 +38,36 @@ let word = /[^"#; \t\n]+/
37
38
let empty = Util.empty
38
39
let comment = Util.comment
39
40
let path = word
41
+ (* TOTHINK: What if we have spaces? Is "word" good? *)
42
+ let certname = word
43
+ let dbpass = word
40
44
45
+ let upsd_debug_min = [ opt_spc . key "DEBUG_MIN" . sep_spc . store num . eol ]
41
46
let upsd_maxage = [ opt_spc . key "MAXAGE" . sep_spc . store num . eol ]
42
47
let upsd_trackingdelay = [ opt_spc . key "TRACKINGDELAY" . sep_spc . store num . eol ]
43
48
let upsd_allow_no_device = [ opt_spc . key "ALLOW_NO_DEVICE" . sep_spc . store num . eol ]
44
49
let upsd_allow_not_all_listeners = [ opt_spc . key "ALLOW_NOT_ALL_LISTENERS" . sep_spc . store num . eol ]
50
+ let upsd_disable_weak_ssl = [ opt_spc . key "DISABLE_WEAK_SSL" . sep_spc . store num . eol ]
45
51
let upsd_statepath = [ opt_spc . key "STATEPATH" . sep_spc . store path . eol ]
46
52
let upsd_listen = [ opt_spc . key "LISTEN" . sep_spc
47
53
. [ label "interface" . store ip ]
48
54
. [ sep_spc . label "port" . store num]? ]
49
55
let upsd_listen_list = upsd_listen . eol
50
- let upsd_maxconn = [ opt_spc . key "MAXCONN" . sep_spc . store num . eol ]
56
+ let upsd_maxconn = [ opt_spc . key "MAXCONN" . sep_spc . store num . eol ]
51
57
let upsd_certfile = [ opt_spc . key "CERTFILE" . sep_spc . store path . eol ]
58
+ let upsd_certpath = [ opt_spc . key "CERTPATH" . sep_spc . store path . eol ]
59
+ let upsd_certident = [ opt_spc . key "CERTIDENT" . sep_spc
60
+ . [ label "certname" . store certname ]
61
+ . [ sep_spc . label "dbpass" . store dbpass ] . eol ]
62
+ let upsd_certrequest = [ opt_spc . key "CERTREQUEST" . sep_spc . store num . eol ]
52
63
53
64
(************************************************************************
65
+ * DEBUG_MIN level
54
66
* MAXAGE seconds
55
67
* TRACKINGDELAY seconds
56
68
* ALLOW_NO_DEVICE Boolean
57
69
* ALLOW_NOT_ALL_LISTENERS Boolean
70
+ * DISABLE_WEAK_SSL Boolean
58
71
* STATEPATH path
59
72
* LISTEN interface port
60
73
* Multiple lines each with one LISTEN address (or host name) and an optional
@@ -65,9 +78,23 @@ let upsd_certfile = [ opt_spc . key "CERTFILE" . sep_spc . store path . eol ]
65
78
* LISTEN 192.168.50.1
66
79
* LISTEN ::1
67
80
* LISTEN 2001:0db8:1234:08d3:1319:8a2e:0370:7344
81
+ * MAXCONN count
82
+ * CERTFILE path
83
+ * Single certificate file (SSL with OpenSSL)
84
+ * CERTPATH path
85
+ * Path to certificate database split into 3 files (SSL with NSS)
86
+ * CERTIDENT certname dbpass
87
+ * Certificate identity to use by the server, and database password
88
+ * as needed to read it (SSL with NSS)
89
+ * CERTREQUEST level
90
+ * Request or require client cert? (SSL with NSS)
91
+ * Possible values are :
92
+ * - 0 to not request to clients to provide any certificate
93
+ * - 1 to require to all clients a certificate
94
+ * - 2 to require to all clients a valid certificate
68
95
*
69
96
*************************************************************************)
70
- let upsd_other = upsd_maxage | upsd_trackingdelay | upsd_allow_no_device | upsd_allow_not_all_listeners | upsd_statepath | upsd_listen_list | upsd_maxconn | upsd_certfile
97
+ let upsd_other = upsd_debug_min | upsd_maxage | upsd_trackingdelay | upsd_allow_no_device | upsd_allow_not_all_listeners | upsd_disable_weak_ssl | upsd_statepath | upsd_listen_list | upsd_maxconn | upsd_certfile | upsd_certpath | upsd_certident | upsd_certrequest
71
98
72
99
let upsd_lns = (upsd_other|comment|empty)*
73
100
0 commit comments