diff options
author | jim-p <jim@pingle.org> | 2010-05-08 12:13:58 -0400 |
---|---|---|
committer | jim-p <jim@pingle.org> | 2010-05-08 12:13:58 -0400 |
commit | 6180c3ae355ef2b69d4962ae90141d1d9082b201 (patch) | |
tree | f2ce7fcbd6001abe003cdffc268a7f0ec5b7fe11 /usr/local | |
parent | 21c776dd85331afd178dd322de6d092f3c427b9c (diff) | |
download | pfsense-6180c3ae355ef2b69d4962ae90141d1d9082b201.zip pfsense-6180c3ae355ef2b69d4962ae90141d1d9082b201.tar.gz |
Fix the same problem with sharing an OpenVPN instance w/existing shared key on the client page this time.
Diffstat (limited to 'usr/local')
-rw-r--r-- | usr/local/www/vpn_openvpn_client.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr/local/www/vpn_openvpn_client.php b/usr/local/www/vpn_openvpn_client.php index 831be25..2d7197d 100644 --- a/usr/local/www/vpn_openvpn_client.php +++ b/usr/local/www/vpn_openvpn_client.php @@ -186,12 +186,14 @@ if ($_POST) { !strstr($pconfig['tls'], "-----END OpenVPN Static key V1-----")) $input_errors[] = "The field 'TLS Authentication Key' does not appear to be valid"; - if (!$tls_mode && !$pconfig['autokey_enable']) { - $reqdfields = array('shared_key'); - $reqdfieldsn = array('Shared key'); - } else { + /* If we are not in shared key mode, then we need the CA/Cert. */ + if ($pconfig['mode'] != "p2p_shared_key") { $reqdfields = explode(" ", "caref certref"); $reqdfieldsn = explode(",", "Certificate Authority,Certificate");; + } elseif (!$pconfig['autokey_enable']) { + /* We only need the shared key filled in if we are in shared key mode and autokey is not selected. */ + $reqdfields = array('shared_key'); + $reqdfieldsn = array('Shared key'); } do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); |