protected function setCAOptionAndValue($ch)
	{
		if (isset($this->options['curl.certpath']))
		{
			// Option is passed to a .PEM file.
			curl_setopt($ch, CURLOPT_CAINFO, $this->options['curl.certpath']);

			return;
		}

		$caPathOrFile = CaBundle::getSystemCaRootBundlePath();

		if (is_dir($caPathOrFile) || (is_link($caPathOrFile) && is_dir(readlink($caPathOrFile))))
		{
			curl_setopt($ch, CURLOPT_CAPATH, $caPathOrFile);

			return;
		}

		curl_setopt($ch, CURLOPT_CAINFO, $caPathOrFile);
	}