diff options
author | Ermal Luçi <eri@pfsense.org> | 2010-03-10 20:03:15 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2010-03-10 20:03:15 +0000 |
commit | 81d3be1fc468468d8f4d5836bf20f75caeb0e8ff (patch) | |
tree | 3567ab8b511811cdbddb983adec1c00f6dc86c8c /usr/local/www/wizards/openvpn_wizard.inc | |
parent | 4cd437f2d9dc62e5c12aab36d91980bb703c8086 (diff) | |
download | pfsense-81d3be1fc468468d8f4d5836bf20f75caeb0e8ff.zip pfsense-81d3be1fc468468d8f4d5836bf20f75caeb0e8ff.tar.gz |
More fixes.
Diffstat (limited to 'usr/local/www/wizards/openvpn_wizard.inc')
-rw-r--r-- | usr/local/www/wizards/openvpn_wizard.inc | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/usr/local/www/wizards/openvpn_wizard.inc b/usr/local/www/wizards/openvpn_wizard.inc index 7ec7cfa..d534a29 100644 --- a/usr/local/www/wizards/openvpn_wizard.inc +++ b/usr/local/www/wizards/openvpn_wizard.inc @@ -108,11 +108,11 @@ function step5_submitphpaction() { } function step6_submitphpaction() { - if ($_POST['uselist'] == "yes" && !empty($_POST['cert'])) { + if ($_POST['uselist'] == "yes" && !empty($_POST['certname'])) { $message = "Please choose an certificate or create a new one."; header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=4&message={$message}"); exit; - } else if (!$_POST['uselist'] && !empty($_POST['cert'])) { + } else if (!$_POST['uselist'] && !empty($_POST['certname'])) { header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=5"); exit; } @@ -130,4 +130,40 @@ function step6_submitphpaction() { function step7_submitphpaction() { } +function step8_submitphpaction() { +} + +function step9_submitphpaction() { + global $config; + + $pconfig = $config['ovpnserver']; + + if (!is_array($config['ovpnserver'])) { + $message = "No configuration found please retry again."; + header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=1&message={$message}"); + exit; + } + + if (empty($pconfig['step5']['certca'])) { + $message = "Please choose a CA authority."; + header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=3&message={$message}"); + exit; + } else if (!($ca = lookup_ca($pconfig['step5']['certca']))) { + $message = "Not a valid CA authority specified."; + header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=3&message={$message}"); + exit; + } + if (empty($pconfig['step5']['certname'])) { + $message = "Please choose a Certificate."; + header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=4&message={$message}"); + exit; + } else if (!($cert = lookup_cert($pconfig['step5']['certname']))) { + $message = "Not a valid Certificate specified."; + header("Location:wizard.php?xml=openvpn_wizard.xml&stepid=4&message={$message}"); + exit; + } + $server = array(); + $server['vpnid'] = openvpn_vpnid_next(); + +} ?> |