summaryrefslogtreecommitdiffstats
path: root/usr/local/www/vpn_openvpn_client.php
diff options
context:
space:
mode:
authorjim-p <jim@pingle.org>2010-05-08 12:13:58 -0400
committerjim-p <jim@pingle.org>2010-05-08 12:13:58 -0400
commit6180c3ae355ef2b69d4962ae90141d1d9082b201 (patch)
treef2ce7fcbd6001abe003cdffc268a7f0ec5b7fe11 /usr/local/www/vpn_openvpn_client.php
parent21c776dd85331afd178dd322de6d092f3c427b9c (diff)
downloadpfsense-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/www/vpn_openvpn_client.php')
-rw-r--r--usr/local/www/vpn_openvpn_client.php10
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);
OpenPOWER on IntegriCloud