mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-28 06:13:31 +01:00
Make crypto/rng_engine test pass on libressl. Bug not in any released tor.
This commit is contained in:
parent
27582325dc
commit
c1c3e45eab
@ -147,8 +147,14 @@ test_crypto_rng_engine(void *arg)
|
|||||||
|
|
||||||
/* We should correct the method if it's a dummy. */
|
/* We should correct the method if it's a dummy. */
|
||||||
RAND_set_rand_method(&dummy_method);
|
RAND_set_rand_method(&dummy_method);
|
||||||
|
#ifdef LIBRESSL_VERSION_NUMBER
|
||||||
|
/* On libressl, you can't override the RNG. */
|
||||||
|
tt_assert(RAND_get_rand_method() == RAND_OpenSSL());
|
||||||
|
tt_int_op(0, ==, crypto_force_rand_ssleay());
|
||||||
|
#else
|
||||||
tt_assert(RAND_get_rand_method() == &dummy_method);
|
tt_assert(RAND_get_rand_method() == &dummy_method);
|
||||||
tt_int_op(1, ==, crypto_force_rand_ssleay());
|
tt_int_op(1, ==, crypto_force_rand_ssleay());
|
||||||
|
#endif
|
||||||
tt_assert(RAND_get_rand_method() == RAND_OpenSSL());
|
tt_assert(RAND_get_rand_method() == RAND_OpenSSL());
|
||||||
|
|
||||||
/* Make sure we aren't calling dummy_method */
|
/* Make sure we aren't calling dummy_method */
|
||||||
|
Loading…
Reference in New Issue
Block a user