void fips_set_rand_check(void *rand_check)
	{
	int owning_thread = fips_is_owning_thread();

	if (fips_is_started())
		{
		if (!owning_thread) CRYPTO_w_lock(CRYPTO_LOCK_FIPS);
		fips_rand_check = rand_check;
		if (!owning_thread) CRYPTO_w_unlock(CRYPTO_LOCK_FIPS);
		}
	}
Пример #2
0
static void fips_set_mode(int onoff)
	{
	int owning_thread = fips_is_owning_thread();

	if (fips_started)
		{
		if (!owning_thread) fips_w_lock();
		fips_mode = onoff;
		if (!owning_thread) fips_w_unlock();
		}
	}
void fips_set_mode(int onoff)
	{
	int owning_thread = fips_is_owning_thread();

	if (fips_is_started())
		{
		if (!owning_thread) CRYPTO_w_lock(CRYPTO_LOCK_FIPS);
		fips_mode = onoff;
		if (!owning_thread) CRYPTO_w_unlock(CRYPTO_LOCK_FIPS);
		}
	}
Пример #4
0
int FIPS_selftest_failed(void)
    {
    int ret = 0;
    if (fips_started)
	{
	int owning_thread = fips_is_owning_thread();

	if (!owning_thread) fips_r_lock();
	ret = fips_selftest_fail;
	if (!owning_thread) fips_r_unlock();
	}
    return ret;
    }
Пример #5
0
int FIPS_module_mode(void)
	{
	int ret = 0;
	int owning_thread = fips_is_owning_thread();

	if (fips_started)
		{
		if (!owning_thread) fips_r_lock();
		ret = fips_mode;
		if (!owning_thread) fips_r_unlock();
		}
	return ret;
	}
void *FIPS_rand_check(void)
	{
	void *ret = 0;
	int owning_thread = fips_is_owning_thread();

	if (fips_is_started())
		{
		if (!owning_thread) CRYPTO_r_lock(CRYPTO_LOCK_FIPS);
		ret = fips_rand_check;
		if (!owning_thread) CRYPTO_r_unlock(CRYPTO_LOCK_FIPS);
		}
	return ret;
	}
int FIPS_mode(void)
	{
	int ret = 0;
	int owning_thread = fips_is_owning_thread();

	if (fips_is_started())
		{
		if (!owning_thread) CRYPTO_r_lock(CRYPTO_LOCK_FIPS);
		ret = fips_mode;
		if (!owning_thread) CRYPTO_r_unlock(CRYPTO_LOCK_FIPS);
		}
	return ret;
	}