Skip to content
Snippets Groups Projects
Commit f5348055 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Make sure that $context doesn't end up undefined

Change-Id: Ieb53bb4f0e15fc82ff6051f5563e1aadabb496ac
parent fff5363f
No related branches found
No related tags found
No related merge requests found
...@@ -1139,6 +1139,8 @@ function _cozaepp_Client() { ...@@ -1139,6 +1139,8 @@ function _cozaepp_Client() {
throw new Exception('System configuration error(2), please contact your provider'); throw new Exception('System configuration error(2), please contact your provider');
} }
# Create SSL context
$context = stream_context_create();
# Are we using ssl? # Are we using ssl?
$use_ssl = false; $use_ssl = false;
if (!empty($params['SSL']) && $params['SSL'] == 'on') { if (!empty($params['SSL']) && $params['SSL'] == 'on') {
...@@ -1149,9 +1151,7 @@ function _cozaepp_Client() { ...@@ -1149,9 +1151,7 @@ function _cozaepp_Client() {
if (!file_exists($params['Certificate'])) { if (!file_exists($params['Certificate'])) {
throw new Exception("System configuration error(3), please contact your provider"); throw new Exception("System configuration error(3), please contact your provider");
} }
# Set client side certificate
# Create SSL context
$context = stream_context_create();
stream_context_set_option($context, 'ssl', 'local_cert', $params['Certificate']); stream_context_set_option($context, 'ssl', 'local_cert', $params['Certificate']);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment