summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/vpn_openvpn_client.php
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2015-09-10 16:33:02 -0400
committerStephen Beaver <sbeaver@netgate.com>2015-09-10 16:33:02 -0400
commitf37a29b0fcc206321740f352662fb5a6e9dfe013 (patch)
tree78c00ac7dac5b97b61b07cc269571b97426abe05 /src/usr/local/www/vpn_openvpn_client.php
parent1bd0b20a2ff197b036ff126ef54e2bdcbe1d2d8b (diff)
downloadpfsense-f37a29b0fcc206321740f352662fb5a6e9dfe013.zip
pfsense-f37a29b0fcc206321740f352662fb5a6e9dfe013.tar.gz
vpn_openvpn_client.php: Corrected issue with CA list
Diffstat (limited to 'src/usr/local/www/vpn_openvpn_client.php')
-rw-r--r--src/usr/local/www/vpn_openvpn_client.php47
1 files changed, 33 insertions, 14 deletions
diff --git a/src/usr/local/www/vpn_openvpn_client.php b/src/usr/local/www/vpn_openvpn_client.php
index 241e379..03f27d7 100644
--- a/src/usr/local/www/vpn_openvpn_client.php
+++ b/src/usr/local/www/vpn_openvpn_client.php
@@ -613,20 +613,39 @@ 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(
- 'certref',
- 'Peer Certifiacte Authority',
- $pconfig['certref'],
- build_cert_list()
- ))->setHelp(count($a_cert) ? '':sprintf('No Certificates 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>')
+ ));
+ }
+
if (!$pconfig['shared_key']) {
$section->addInput(new Form_checkbox(
'autokey_enable',
OpenPOWER on IntegriCloud