Skip to content
Snippets Groups Projects
Commit 382ea023 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

task-1462: disable ssl verification per config value

parent 9ff97ff3
Branches
No related tags found
No related merge requests found
......@@ -78,6 +78,7 @@ $aConfig = array(
'api'=>'<%= @replace["foreman-url"] %>', // with ending "/"
'user'=>'<%= @replace["foreman-user"] %>',
'password'=>'<%= @replace["foreman-password"] %>',
'verify-ssl'=><%= @replace["foreman-verify-ssl"] %>,
// 'varname-replace'=>'ci-replacement',
),
// where to store project data
......
......@@ -246,7 +246,12 @@ class ForemanApi {
}
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
if (array_key_exists('verify-ssl', $this->_aCfg) && !$this->_aCfg['verify-ssl']){
$this->log(__FUNCTION__ . " WARNING: SSL verifify was disabled in the config.", 'warning');
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
}
curl_setopt($ch, CURLOPT_TIMEOUT, $iTimeout);
curl_setopt($ch, CURLOPT_USERAGENT, 'IML Deployment GUI :: ' . __CLASS__);
if ($sApiUser){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment