X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=applications%2Fluci-app-openvpn%2Fluasrc%2Fmodel%2Fcbi%2Fopenvpn-advanced.lua;h=1bbee83c35d4c195f2fb7fc9bbf944da94da75ff;hp=1508493f3e5f71643fff7d49821c02cb35d0213d;hb=52de960bb538cdd279d882cd7e23494b077d9989;hpb=3bae3c7f5e8c383e481667fcfeae7765a1dacc75 diff --git a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua index 1508493f3..1bbee83c3 100644 --- a/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua +++ b/applications/luci-app-openvpn/luasrc/model/cbi/openvpn-advanced.lua @@ -154,7 +154,7 @@ local knownParams = { } }, { "Cryptography", { - { Value, "secret", "/etc/openvpn/secret.key 1", translate("Enable Static Key encryption mode (non-TLS)") }, + { FileUpload, "secret", "/etc/openvpn/secret.key", translate("Enable Static Key encryption mode (non-TLS)") }, { Value, "auth", "SHA1", translate("HMAC authentication for packets") }, -- parse { Value, "cipher", "BF-CBC", translate("Encryption cipher for packets") }, -- parse { Value, "keysize", 1024, translate("Size of cipher key") }, -- parse @@ -182,13 +182,16 @@ local knownParams = { { Value, "tran_window", 3600, translate("Key transition window") }, { Flag, "single_session", 0, translate("Allow only one session") }, { Flag, "tls_exit", 0, translate("Exit on TLS negotiation failure") }, - { Value, "tls_auth", "/etc/openvpn/tlsauth.key 1", translate("Additional authentication over TLS") }, + { Value, "tls_auth", "/etc/openvpn/tlsauth.key", translate("Additional authentication over TLS") }, --{ Value, "askpass", "[file]", translate("Get PEM password from controlling tty before we daemonize") }, { Flag, "auth_nocache", 0, translate("Don't cache --askpass or --auth-user-pass passwords") }, { Value, "tls_remote", "remote_x509_name", translate("Only accept connections from given X509 name") }, { ListValue, "ns_cert_type", { "client", "server" }, translate("Require explicit designation on certificate") }, { ListValue, "remote_cert_tls", { "client", "server" }, translate("Require explicit key usage on certificate") }, { Value, "crl_verify", "/etc/easy-rsa/keys/crl.pem", translate("Check peer certificate against a CRL") }, + { Value, "tls_version_min", "1.0", translate("The lowest supported TLS version") }, + { Value, "tls_version_max", "1.2", translate("The highest supported TLS version") }, + { Value, "key_direction", "1", translate("The key direction for 'tls-auth' and 'secret' options") }, } } } @@ -232,7 +235,6 @@ for _, option in ipairs(params) do o.value = option[3] else if option[1] == DynamicList then - o.cast = nil function o.cfgvalue(...) local val = AbstractValue.cfgvalue(...) return ( val and type(val) ~= "table" ) and { val } or val