From 5b13cfe38a78e5b0b5ea5d94f1ba6fc3e24c495e Mon Sep 17 00:00:00 2001 From: Vincent Hanquez Date: Wed, 18 Sep 2013 07:20:28 +0100 Subject: [PATCH] adapt tests to new crypto-random --- core/Tests/PubKey.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/Tests/PubKey.hs b/core/Tests/PubKey.hs index 31a4892..539a810 100644 --- a/core/Tests/PubKey.hs +++ b/core/Tests/PubKey.hs @@ -6,6 +6,7 @@ module PubKey import Test.QuickCheck +import Crypto.Random (createTestEntropyPool) import qualified Crypto.Random.AESCtr as RNG import qualified Crypto.PubKey.RSA as RSA @@ -16,7 +17,7 @@ import System.IO.Unsafe arbitraryRSAPair :: Gen (RSA.PublicKey, RSA.PrivateKey) arbitraryRSAPair = do - rng <- (maybe (error "making rng") id . RNG.make . B.pack) `fmap` vector 64 + rng <- (RNG.make . createTestEntropyPool . B.pack) `fmap` vector 64 arbitraryRSAPairWithRNG rng arbitraryRSAPairWithRNG rng = return $ fst $ RSA.generate rng 128 0x10001