summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscipiojr <benedikt@puettbach.de>2016-05-16 00:54:59 +0200
committerscipiojr <benedikt@puettbach.de>2016-05-16 00:54:59 +0200
commitb4f400a448b01db0aeb8f15b954784464e9fa0ae (patch)
tree6619f1ec353f0b4ec377fc80a7fb25a95a2900ef
parentbc5ab7afcaf4d1ec9a02d03ad2d0c84e1dea3554 (diff)
downloadpfsense-b4f400a448b01db0aeb8f15b954784464e9fa0ae.zip
pfsense-b4f400a448b01db0aeb8f15b954784464e9fa0ae.tar.gz
Update openvpn.inc
-rw-r--r--src/etc/inc/openvpn.inc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/etc/inc/openvpn.inc b/src/etc/inc/openvpn.inc
index 4ee5864..03fb0f5 100644
--- a/src/etc/inc/openvpn.inc
+++ b/src/etc/inc/openvpn.inc
@@ -1007,9 +1007,16 @@ function openvpn_reconfigure($mode, $settings) {
case 'server_tls':
case 'server_tls_user':
case 'server_user':
- $ca = ca_chain(array('caref' => $settings['caref']));
+ // ca_chain() expects parameter to be passed by reference.
+ // avoid passing the whole settinsg array, as param names or
+ // types might change in future releases.
+ $param = array('caref' => $settings['caref']);
+ $ca = ca_chain($param);
$ca = base64_encode($ca);
+
openvpn_add_keyfile($ca, $conf, $mode_id, "ca");
+
+ unset($ca, $param);
if (!empty($settings['certref'])) {
$cert = lookup_cert($settings['certref']);
OpenPOWER on IntegriCloud