• Модуль: security
  • Путь к файлу: ~/bitrix/modules/security/classes/general/tests/php_configuration.php
  • Класс: CSecurityPhpConfigurationTest
  • Вызов: CSecurityPhpConfigurationTest::checkPhpEntropyConfigs
protected function checkPhpEntropyConfigs()
{
	$entropyFile = ini_get("session.entropy_file");
	$entropyLength = ini_get("session.entropy_length");

	if(!in_array($entropyFile, array("/dev/random", "/dev/urandom"), true))
	{
		return self::STATUS_FAILED;
	}

	if(self::isRunOnWin() && !$entropyLength)
	{
		return self::STATUS_FAILED;
	}
	elseif ($entropyLength < 128)
	{
		return self::STATUS_FAILED;
	}

	return self::STATUS_PASSED;
}