luci-proto-openconnect: make PEM values optional
[project/luci.git] / protocols / luci-proto-openconnect / htdocs / luci-static / resources / protocol / openconnect.js
index 14fc8f6d3576be01f62a8a14b93661b9cb26e72e..0490ceb5ea53049b31846ab3845d39d190e193b5 100644 (file)
@@ -43,6 +43,9 @@ function validateCert(priv, section_id, value) {
            start = false,
            i;
 
+       if (value === null || value === '')
+               return true;
+
        for (i = 0; i < lines.length; i++) {
                if (lines[i].match(beg))
                        start = true;