Revision 21c776dd
Added by Jim Pingle over 15 years ago
usr/local/www/vpn_openvpn_server.php | ||
---|---|---|
244 | 244 |
if ($pconfig['maxclients'] && !is_numeric($pconfig['maxclients'])) |
245 | 245 |
$input_errors[] = "The field 'Concurrent connections' must be numeric."; |
246 | 246 |
|
247 |
if (!$tls_mode && !$pconfig['autokey_enable']) { |
|
248 |
$reqdfields = array('shared_key'); |
|
249 |
$reqdfieldsn = array('Shared key'); |
|
250 |
} else { |
|
247 |
/* If we are not in shared key mode, then we need the CA/Cert. */ |
|
248 |
if ($pconfig['mode'] != "p2p_shared_key") { |
|
251 | 249 |
$reqdfields = explode(" ", "caref certref"); |
252 | 250 |
$reqdfieldsn = explode(",", "Certificate Authority,Certificate");; |
251 |
} elseif (!$pconfig['autokey_enable']) { |
|
252 |
/* We only need the shared key filled in if we are in shared key mode and autokey is not selected. */ |
|
253 |
$reqdfields = array('shared_key'); |
|
254 |
$reqdfieldsn = array('Shared key'); |
|
253 | 255 |
} |
254 | 256 |
|
255 | 257 |
$reqdfields[] = 'tunnel_network'; |
Also available in: Unified diff
Fix OpenVPN server validation logic. It was failing if you tried to save a shared key server instance with an existing shared key.