Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions hoogle.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ library
temporary,
text >= 2,
time >= 1.5,
tls,
transformers,
uniplate,
utf8-string >= 0.3.1,
Expand Down
6 changes: 5 additions & 1 deletion src/Input/Download.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import Data.Conduit.Binary (sinkFile)
import Data.Default.Class
import qualified Network.HTTP.Conduit as C
import Network.Connection
import Network.TLS
import Network.TLS.Extra.Cipher (ciphersuite_strong)
import qualified Data.Conduit as C
import General.Util
import General.Timing
Expand Down Expand Up @@ -42,13 +44,15 @@ downloadInput timing insecure download dir name url = do
downloadFile :: Bool -> FilePath -> String -> IO ()
downloadFile insecure file url = do
let request = C.parseRequest_ url

manager <- C.newManager $ C.mkManagerSettings
(TLSSettingsSimple {
settingDisableCertificateValidation = insecure,
settingDisableSession = False,
settingUseServerName = False,
settingClientSupported = def
settingClientSupported = def{supportedCiphers = ciphersuite_strong}
}) Nothing

runResourceT $ do
response <- C.http request manager
C.runConduit $ C.responseBody response C..| sinkFile file