summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2008-03-06 19:03:56 +0000
committerErmal Luçi <eri@pfsense.org>2008-03-06 19:03:56 +0000
commit8be2d6d3dd8c134c850aec37a58e923a68f3ef3f (patch)
tree2a4cfc856b2d5f6cf494b1123e5dddf721be3c0b /usr
parent6300a53dff5b577aff77797fd84214856b654b6a (diff)
downloadpfsense-8be2d6d3dd8c134c850aec37a58e923a68f3ef3f.zip
pfsense-8be2d6d3dd8c134c850aec37a58e923a68f3ef3f.tar.gz
Remove ugly hacks and use propper method for dispalying generated ciphers.
Diffstat (limited to 'usr')
-rw-r--r--usr/local/pkg/openvpn.xml7
-rw-r--r--usr/local/www/vpn_openvpn_certs.php23
-rw-r--r--usr/local/www/vpn_openvpn_certs_create.php21
3 files changed, 1 insertions, 50 deletions
diff --git a/usr/local/pkg/openvpn.xml b/usr/local/pkg/openvpn.xml
index e492f81..622bd66 100644
--- a/usr/local/pkg/openvpn.xml
+++ b/usr/local/pkg/openvpn.xml
@@ -161,12 +161,7 @@
<fielddescr>Certificates to apply</fielddescr>
<description>Certificates generated from the certificate generation tab.</description>
<type>select</type>
- <options>
- <option>
- <value>none</value>
- <name>none</name>
- </option>
- </options>
+ <default_value>none</default_value>
</field>
<field>
<fieldname>dhcp_domainname</fieldname>
diff --git a/usr/local/www/vpn_openvpn_certs.php b/usr/local/www/vpn_openvpn_certs.php
index dd0154c..5bbbb3f 100644
--- a/usr/local/www/vpn_openvpn_certs.php
+++ b/usr/local/www/vpn_openvpn_certs.php
@@ -51,29 +51,6 @@ if ($_GET['delete']) {
write_config();
}
}
- /* XXX: Lets do some hacking now! This implies we are not on embedded platform!!! */
- $pkg_config = parse_xml_config_pkg("/usr/local/pkg/openvpn.xml", "packagegui");
- $options =& $pkg_config['fields']['field'][11]['options']['option'];
- if (is_array($options)) {
- for ($i = 0; $i < count($options); $i++) {
- if ($options[$i]['name'] == $caname) {
- unset($options[$i]);
- break;
- }
- }
-
- conf_mount_rw();
-
- $xmlcf = dump_xml_config_pkg($pkg_config, "packagegui");
- /* write new configuration */
- $fd = fopen("/usr/local/pkg/openvpn.xml", "w");
- if (!$fd)
- die("Unable to open openvpn.xml for writing in write_config()\n");
- fwrite($fd, $xmlcf);
- fclose($fd);
-
- conf_mount_ro();
- }
}
exec("cd ".$g['varetc_path']."/openvpn/certificates && /usr/bin/find . -type d -name \"[a-zA-Z0-9_]*\"", $certificates);
diff --git a/usr/local/www/vpn_openvpn_certs_create.php b/usr/local/www/vpn_openvpn_certs_create.php
index 676810f..f8bf4a6 100644
--- a/usr/local/www/vpn_openvpn_certs_create.php
+++ b/usr/local/www/vpn_openvpn_certs_create.php
@@ -190,27 +190,6 @@ if ($_POST) {
$ovpnkeys[$caname]['dh_params.dh'] = file_get_contents("$ovpncapath/$caname/dh_params.dh");
/* save it */
write_config();
- /* XXX: Lets do some hacking now! This implies we are not on embedded platform!!! */
- $pkg_config = parse_xml_config_pkg("/usr/local/pkg/openvpn.xml", "packagegui");
- $options =& $pkg_config['fields']['field'][11]['options']['option'];
- if (!is_array($options))
- $options = array();
- $opt = array();
- $opt['name'] = $caname;
- $opt['value'] = $caname;
- $options[] = $opt;
-
- conf_mount_rw();
-
- $xmlcf = dump_xml_config_pkg($pkg_config, "packagegui");
- /* write new configuration */
- $fd = fopen("/usr/local/pkg/openvpn.xml", "w");
- if (!$fd)
- die("Unable to open openvpn.xml for writing in write_config()\n");
- fwrite($fd, $xmlcf);
- fclose($fd);
-
- conf_mount_ro();
} else { ?>
<tr>
<td width="35%" valign="top" class="vncell"><B>Certificate Name</td>
OpenPOWER on IntegriCloud