move to crypto-random
This commit is contained in:
parent
77abffceb3
commit
982a484598
2 changed files with 9 additions and 9 deletions
|
@ -52,7 +52,7 @@ import Network.TLS.Types (Role(..))
|
|||
import qualified Data.ByteString as B
|
||||
import Control.Monad.State
|
||||
import Control.Monad.Error
|
||||
import Crypto.Random.API
|
||||
import Crypto.Random
|
||||
import Data.X509 (CertificateChain)
|
||||
|
||||
data TLSState = TLSState
|
||||
|
@ -192,7 +192,7 @@ isClientContext = gets stClientContext
|
|||
genRandom :: Int -> TLSSt Bytes
|
||||
genRandom n = do
|
||||
st <- get
|
||||
case withTLSRNG (stRandomGen st) (genRandomBytes n) of
|
||||
case withTLSRNG (stRandomGen st) (cprgGenerate n) of
|
||||
(bytes, rng') -> put (st { stRandomGen = rng' }) >> return bytes
|
||||
|
||||
withRNG :: (forall g . CPRG g => g -> (a, g)) -> TLSSt a
|
||||
|
|
|
@ -37,8 +37,8 @@ Library
|
|||
, cereal >= 0.3
|
||||
, bytestring
|
||||
, network
|
||||
, crypto-random-api >= 0.2 && < 0.3
|
||||
, crypto-pubkey
|
||||
, crypto-random >= 0.0 && < 0.1
|
||||
, crypto-pubkey >= 0.2
|
||||
, asn1-types >= 0.2.0
|
||||
, asn1-encoding
|
||||
, x509 >= 1.4.3 && < 1.5.0
|
||||
|
@ -95,13 +95,13 @@ Test-Suite test-tls
|
|||
, QuickCheck >= 2
|
||||
, test-framework
|
||||
, test-framework-quickcheck2
|
||||
, cprng-aes
|
||||
, crypto-pubkey
|
||||
, cprng-aes >= 0.5
|
||||
, crypto-pubkey >= 0.2
|
||||
, bytestring
|
||||
, x509
|
||||
, tls
|
||||
, time
|
||||
, crypto-random-api
|
||||
, crypto-random
|
||||
ghc-options: -Wall -fno-warn-orphans -fno-warn-missing-signatures
|
||||
|
||||
Benchmark bench-tls
|
||||
|
@ -111,12 +111,12 @@ Benchmark bench-tls
|
|||
Build-depends: base >= 4 && < 5
|
||||
, tls
|
||||
, x509
|
||||
, crypto-random-api
|
||||
, crypto-random
|
||||
, criterion
|
||||
, cprng-aes
|
||||
, mtl
|
||||
, bytestring
|
||||
, crypto-pubkey
|
||||
, crypto-pubkey >= 0.2
|
||||
, time
|
||||
, QuickCheck >= 2
|
||||
|
||||
|
|
Loading…
Reference in a new issue