summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-03-18 12:49:48 +0000
committerErmal <eri@pfsense.org>2010-03-18 12:49:48 +0000
commit47aa4fc48cc02ead267a3e0586c884e349966a7c (patch)
treee04281d38222293d20046aa5eac6277410e3f9e1 /usr
parentdb67053af0da5e1ceebc60a3d5435a53bcec353f (diff)
downloadpfsense-47aa4fc48cc02ead267a3e0586c884e349966a7c.zip
pfsense-47aa4fc48cc02ead267a3e0586c884e349966a7c.tar.gz
Merge common name fields with descriptive name. Default to 3650 days of lifetime and 2048 bits key length.
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/wizard.php5
-rw-r--r--usr/local/www/wizards/openvpn_wizard.inc8
-rw-r--r--usr/local/www/wizards/openvpn_wizard.xml19
3 files changed, 12 insertions, 20 deletions
diff --git a/usr/local/www/wizard.php b/usr/local/www/wizard.php
index d84f692..5415479 100755
--- a/usr/local/www/wizard.php
+++ b/usr/local/www/wizard.php
@@ -562,8 +562,9 @@ function showchange() {
echo "<select class='formselect' " . $onchange . $multiple . $size . "id='" . $name . "' name='" . $name . "'>\n";
foreach ($field['options']['option'] as $opt) {
$selected = "";
- if($value == $opt['value']) $selected = " SELECTED";
- echo "\t<option name='" . $opt['name'] . "' value='" . $opt['value'] . "'" . $selected . ">";
+ if($value == $opt['value'])
+ $selected = " SELECTED";
+ echo "\t<option name='" . $opt['name'] . "' value='" . $opt['value'] . "'" . $selected . ">";
if ($opt['displayname'])
echo $opt['displayname'];
else
diff --git a/usr/local/www/wizards/openvpn_wizard.inc b/usr/local/www/wizards/openvpn_wizard.inc
index 9b8d52a..956c559 100644
--- a/usr/local/www/wizards/openvpn_wizard.inc
+++ b/usr/local/www/wizards/openvpn_wizard.inc
@@ -161,7 +161,7 @@ function step7_submitphpaction() {
if (empty($_POST['name']) || empty($_POST['keylength']) || empty($_POST['lifetime']) ||
empty($_POST['country']) || empty($_POST['state']) || empty($_POST['city']) ||
- empty($_POST['organization']) || empty($_POST['email']) || empty($_POST['cn'])) {
+ empty($_POST['organization']) || empty($_POST['email'])) {
$stepid--;
$savemsg = "Please enter all information for the new Certificate Authority.";
} else {
@@ -193,7 +193,7 @@ function step9_submitphpaction() {
if (empty($_POST['name']) || empty($_POST['keylength']) || empty($_POST['lifetime']) ||
empty($_POST['country']) || empty($_POST['state']) || empty($_POST['city']) ||
- empty($_POST['organization']) || empty($_POST['email']) || empty($_POST['cn'])) {
+ empty($_POST['organization']) || empty($_POST['email'])) {
$stepid--;
$savemsg = "Please enter all information for the new certificate.";
} else {
@@ -348,7 +348,7 @@ function step12_submitphpaction() {
'localityName' => $pconfig['step6']['city'],
'organizationName' => $pconfig['step6']['organization'],
'emailAddress' => $pconfig['step6']['email'],
- 'commonName' => $pconfig['step6']['cn']);
+ 'commonName' => $pconfig['step6']['certca']);
ca_create($ca, $pconfig['step6']['keylength'], $pconfig['step6']['lifetime'], $dn);
if (!is_array($config['system']['ca']))
@@ -375,7 +375,7 @@ function step12_submitphpaction() {
'localityName' => $pconfig['step9']['city'],
'organizationName' => $pconfig['step9']['organization'],
'emailAddress' => $pconfig['step9']['email'],
- 'commonName' => $pconfig['step9']['cn']);
+ 'commonName' => $pconfig['step9']['certname']);
cert_create($cert, $ca['refid'], $pconfig['step9']['keylength'], $pconfig['step9']['lifetime'], $dn);
if (!is_array($config['system']['cert']))
diff --git a/usr/local/www/wizards/openvpn_wizard.xml b/usr/local/www/wizards/openvpn_wizard.xml
index 86ce1c2..01b0f9e 100644
--- a/usr/local/www/wizards/openvpn_wizard.xml
+++ b/usr/local/www/wizards/openvpn_wizard.xml
@@ -318,6 +318,7 @@
<field>
<name>name</name>
<displayname>Descriptive name</displayname>
+ <description>This is the same as common-name for Certificates</description>
<type>input</type>
<bindstofield>ovpnserver->step6->certca</bindstofield>
</field>
@@ -325,6 +326,7 @@
<name>keylength</name>
<displayname>Key length</displayname>
<type>select</type>
+ <value>2048</value>
<bindstofield>ovpnserver->step6->keylength</bindstofield>
<options>
<option>
@@ -350,6 +352,7 @@
<displayname>Lifetime</displayname>
<type>input</type>
<size>10</size>
+ <value>3650</value>
<description>Lifetime in days</description>
<bindstofield>ovpnserver->step6->lifetime</bindstofield>
</field>
@@ -389,13 +392,6 @@
<bindstofield>ovpnserver->step6->email</bindstofield>
</field>
<field>
- <name>cn</name>
- <displayname>Common name</displayname>
- <type>input</type>
- <size>20</size>
- <bindstofield>ovpnserver->step6->cn</bindstofield>
- </field>
- <field>
<name>Add new CA</name>
<type>submit</type>
</field>
@@ -451,6 +447,7 @@
<name>keylength</name>
<displayname>Key length</displayname>
<type>select</type>
+ <value>2048</value>
<bindstofield>ovpnserver->step9->keylength</bindstofield>
<options>
<option>
@@ -476,6 +473,7 @@
<displayname>Lifetime</displayname>
<type>input</type>
<size>10</size>
+ <value>3650</value>
<description>Lifetime in days</description>
<bindstofield>ovpnserver->step9->lifetime</bindstofield>
</field>
@@ -515,13 +513,6 @@
<bindstofield>ovpnserver->step9->email</bindstofield>
</field>
<field>
- <name>cn</name>
- <displayname>Common name</displayname>
- <type>input</type>
- <size>20</size>
- <bindstofield>ovpnserver->step9->cn</bindstofield>
- </field>
- <field>
<name>Create new Certificate</name>
<type>submit</type>
</field>
OpenPOWER on IntegriCloud