luci-base: add system cert bundle detection 3513/head
authorDavid Lam <david@thedavid.net>
Thu, 16 Jan 2020 09:15:40 +0000 (01:15 -0800)
committerDavid Lam <david@thedavid.net>
Thu, 16 Jan 2020 09:15:40 +0000 (01:15 -0800)
Add detection mechanism for system cert CA bundle installed by the
ca-bundle package. Used by LuCI to detect whether the "Use system
certificates" certificate validation option should be enabled.

Signed-off-by: David Lam <david@thedavid.net>
modules/luci-base/root/usr/libexec/rpcd/luci [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index 56cb7bc..75afd27
@@ -216,6 +216,7 @@ local methods = {
                        rv.sysntpd       = fs.readlink("/usr/sbin/ntpd") and true
                        rv.ipv6          = fs.access("/proc/net/ipv6_route")
                        rv.dropbear      = fs.access("/usr/sbin/dropbear")
+                       rv.cabundle      = fs.access("/etc/ssl/certs/ca-certificates.crt")
 
                        local wifi_features = { "eap", "11n", "11ac", "11r", "11w", "acs", "sae", "owe", "suiteb192" }