protected function createStreamOpts($verb, $url, $blob, $headers) { $result = parent::createStreamOpts($verb, $url, $blob, $headers); $caConfig = CA_Config_Stream::probe(array('verify_peer' => (bool) Civi::settings()->get('verifySSL'))); if ($caConfig->isEnableSSL()) { $result['ssl'] = $caConfig->toStreamOptions(); } if (!$caConfig->isEnableSSL() && preg_match('/^https:/', $url)) { CRM_Core_Error::fatal('Cannot fetch document - system does not support SSL'); } return $result; }
protected function createStreamOpts($verb, $url, $blob, $headers) { $result = parent::createStreamOpts($verb, $url, $blob, $headers); $caConfig = CA_Config_Stream::probe(array('verify_peer' => (bool) CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'verifySSL', NULL, TRUE))); if ($caConfig->isEnableSSL()) { $result['ssl'] = $caConfig->toStreamOptions(); } if (!$caConfig->isEnableSSL() && preg_match('/^https:/', $url)) { CRM_Core_Error::fatal('Cannot fetch document - system does not support SSL'); } return $result; }