Browse Source

luci-proto-openconnect: make PEM values optional

Fixes: #3191
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Jo-Philipp Wich 4 years ago
parent
commit
7a010b1178

+ 3 - 0
protocols/luci-proto-openconnect/htdocs/luci-static/resources/protocol/openconnect.js

@@ -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;