@@ -1,3 +1,4 @@
1+{-# LANGUAGE CPP #-}
12{-# LANGUAGE OverloadedStrings #-}
23{-# LANGUAGE RankNTypes #-}
34{-# LANGUAGE RecordWildCards #-}
@@ -265,8 +266,12 @@ mkConn tlsset s params = do
265266
266267httpOverTls :: TLS.TLSParams params => TLSSettings -> Socket -> I.IORef B.ByteString -> params -> IO (Connection, Transport)
267268httpOverTls TLSSettings{..} s cachedRef params = do
269+#if MIN_VERSION_tls(1,3,0)
270+ ctx <- TLS.contextNew backend params
271+#else
268272 gen <- Crypto.Random.AESCtr.makeSystem
269273 ctx <- TLS.contextNew backend params gen
274+#endif
270275 TLS.contextHookSetLogging ctx tlsLogging
271276 TLS.handshake ctx
272277 writeBuf <- allocateBuffer bufferSize