diff options
author | Lukas Larsson <[email protected]> | 2014-02-13 17:16:42 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2014-02-24 15:16:06 +0100 |
commit | 6c4ee8337dff6e9b680dbff0796038948d718b5a (patch) | |
tree | 049f8b8b93353547141de24c0a294674f477d565 /lib/crypto/test | |
parent | d58602adef3412b354fd521bbd4bda24a0b1a789 (diff) | |
download | otp-6c4ee8337dff6e9b680dbff0796038948d718b5a.tar.gz otp-6c4ee8337dff6e9b680dbff0796038948d718b5a.tar.bz2 otp-6c4ee8337dff6e9b680dbff0796038948d718b5a.zip |
ose: Fix support for crypto
To enable it you have to modify the OSESSL variable in the
ose xcomp file.
Diffstat (limited to 'lib/crypto/test')
-rw-r--r-- | lib/crypto/test/crypto_SUITE.erl | 16 |
1 files changed, 15 insertions, 1 deletions
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 = <<H:24,M:20,L:20>>, + crypto:rand_seed(<< <<Bin/binary>> || _ <- lists:seq(1,16) >>), + Config + end catch _:_ -> {skip, "Crypto did not start"} end. |