From 6c4ee8337dff6e9b680dbff0796038948d718b5a Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Thu, 13 Feb 2014 17:16:42 +0100 Subject: ose: Fix support for crypto To enable it you have to modify the OSESSL variable in the ose xcomp file. --- lib/crypto/test/crypto_SUITE.erl | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'lib/crypto/test') diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl index d1be7cea68..d05277390a 100644 --- a/lib/crypto/test/crypto_SUITE.erl +++ b/lib/crypto/test/crypto_SUITE.erl @@ -104,7 +104,21 @@ groups() -> init_per_suite(Config) -> try crypto:start() of ok -> - Config + try crypto:strong_rand_bytes(1) of + _ -> + Config + catch error:low_entropy -> + %% Make sure we are on OSE, otherwise we want to crash + {ose,_} = os:type(), + + %% This is NOT how you want to seed this, it is just here + %% to make the tests pass. Check your OS manual for how you + %% really want to seed. + {H,M,L} = erlang:now(), + Bin = <>, + crypto:rand_seed(<< <> || _ <- lists:seq(1,16) >>), + Config + end catch _:_ -> {skip, "Crypto did not start"} end. -- cgit v1.2.3