summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/vpn_openvpn_server.php
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2015-09-10 16:29:21 -0400
committerStephen Beaver <sbeaver@netgate.com>2015-09-10 16:29:21 -0400
commit1bd0b20a2ff197b036ff126ef54e2bdcbe1d2d8b (patch)
tree5ee0bd039ea9dbe33b92c843c9462c22c46a55c3 /src/usr/local/www/vpn_openvpn_server.php
parentc80e6a6acab3fd81e081aeb4e5ab2a247fdb42ab (diff)
downloadpfsense-1bd0b20a2ff197b036ff126ef54e2bdcbe1d2d8b.zip
pfsense-1bd0b20a2ff197b036ff126ef54e2bdcbe1d2d8b.tar.gz
vpn_openvpn_server.php: Corrected display of CA list
Diffstat (limited to 'src/usr/local/www/vpn_openvpn_server.php')
-rw-r--r--src/usr/local/www/vpn_openvpn_server.php49
1 files changed, 35 insertions, 14 deletions
diff --git a/src/usr/local/www/vpn_openvpn_server.php b/src/usr/local/www/vpn_openvpn_server.php
index e125d65..23660dc 100644
--- a/src/usr/local/www/vpn_openvpn_server.php
+++ b/src/usr/local/www/vpn_openvpn_server.php
@@ -697,6 +697,8 @@ require_once('classes/Form.class.php');
$form = new Form();
if($act=="new" || $act=="edit") :
+
+
$section = new Form_Section('General Information');
$section->addInput(new Form_checkbox(
@@ -767,19 +769,38 @@ if($act=="new" || $act=="edit") :
$pconfig['tls']
))->setHelp('Paste your shared key here');
- $section->addInput(new Form_Select(
- 'caref',
- 'Peer Certifiacte Authority',
- $pconfig['caref'],
- count($a_ca) ? array_combine($a_ca, $a_ca) : ['' => 'None']
- ))->setHelp(count($a_ca) ? '':sprintf('No Certificate Authorities defined. You may create one here: %s', '<a href="system_camanager.php">System &gt; Cert Manager</a>'));
-
- $section->addInput(new Form_Select(
- 'crlref',
- 'Peer Certifiacte Revocation list',
- $pconfig['crlref'],
- build_crl_list()
- ))->setHelp(count($a_crl) ? '':sprintf('No Certificate Revocation Lists defined. You may create one here: %s', '<a href="system_camanager.php">System &gt; Cert Manager</a>'));
+ if (count($a_ca)) {
+
+ $list = array();
+ foreach ($a_ca as $ca)
+ $list[$ca['refid']] = $ca['descr'];
+
+ $section->addInput(new Form_Select(
+ 'caref',
+ 'Peer Certifiacte Authority',
+ $pconfig['caref'],
+ $list
+ ));
+ } else {
+ $section->addInput(new Form_StaticText(
+ 'Peer Certifiacte Authority',
+ sprintf('No Certificate Authorities defined. You may create one here: %s', '<a href="system_camanager.php">System &gt; Cert Manager</a>')
+ ));
+ }
+
+ if (count($a_crl)) {
+ $section->addInput(new Form_Select(
+ 'crlref',
+ 'Peer Certificate Revocation list',
+ $pconfig['crlref'],
+ build_crl_list()
+ ));
+ } else {
+ $section->addInput(new Form_StaticText(
+ 'Peer Certificate Revocation list',
+ sprintf('No Certificate Revocation Lists defined. You may create one here: %s', '<a href="system_camanager.php">System &gt; Cert Manager</a>')
+ ));
+ }
$section->addInput(new Form_Select(
'certref',
@@ -1256,7 +1277,7 @@ endif;
// Note:
// The following *_change() functions were converted from Javascript/DOM to JQuery but otherwise
-// mostly left unchanged. The logic on this form is complex andthis works!
+// mostly left unchanged. The logic on this form is complex and this works!
?>
<script type="text/javascript">
OpenPOWER on IntegriCloud