diff --git a/libp2p/transports/wstransport.nim b/libp2p/transports/wstransport.nim index 1bb86c4afb..dd42a10fd9 100644 --- a/libp2p/transports/wstransport.nim +++ b/libp2p/transports/wstransport.nim @@ -27,7 +27,8 @@ import transport, ../utility, ../stream/connection, ../upgrademngrs/upgrade, - websock/websock + websock/websock, + bearssl/rand logScope: topics = "libp2p wstransport" @@ -111,7 +112,7 @@ type flags: set[ServerFlags] handshakeTimeout: Duration factories: seq[ExtFactory] - rng: Rng + rng: ref HmacDrbgContext proc secure*(self: WsTransport): bool = not (isNil(self.tlsPrivateKey) or isNil(self.tlsCertificate)) @@ -327,7 +328,7 @@ proc new*( tlsFlags: set[TLSFlags] = {}, flags: set[ServerFlags] = {}, factories: openArray[ExtFactory] = [], - rng: Rng = nil, + rng: ref HmacDrbgContext = nil, handshakeTimeout = DefaultHeadersTimeout): T {.public.} = ## Creates a secure WebSocket transport @@ -346,7 +347,7 @@ proc new*( upgrade: Upgrade, flags: set[ServerFlags] = {}, factories: openArray[ExtFactory] = [], - rng: Rng = nil, + rng: ref HmacDrbgContext = nil, handshakeTimeout = DefaultHeadersTimeout): T {.public.} = ## Creates a clear-text WebSocket transport