From b4f400a448b01db0aeb8f15b954784464e9fa0ae Mon Sep 17 00:00:00 2001 From: scipiojr Date: Mon, 16 May 2016 00:54:59 +0200 Subject: Update openvpn.inc --- src/etc/inc/openvpn.inc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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']); -- cgit v1.1