summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2010-03-10 20:03:15 +0000
committerErmal Luçi <eri@pfsense.org>2010-03-10 20:03:15 +0000
commit81d3be1fc468468d8f4d5836bf20f75caeb0e8ff (patch)
tree3567ab8b511811cdbddb983adec1c00f6dc86c8c /usr
parent4cd437f2d9dc62e5c12aab36d91980bb703c8086 (diff)
downloadpfsense-81d3be1fc468468d8f4d5836bf20f75caeb0e8ff.zip
pfsense-81d3be1fc468468d8f4d5836bf20f75caeb0e8ff.tar.gz
More fixes.
Diffstat (limited to 'usr')
-rw-r--r--usr/local/www/wizards/openvpn_wizard.inc40
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();
+
+}
?>
OpenPOWER on IntegriCloud