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
10 changes: 6 additions & 4 deletions stubs/haskell-http-client-tls/src/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import Data.ByteString.Char8 (unpack)
import System.Environment (getArgs, getProgName)
import System.Exit (exitFailure, exitSuccess)

import Network.HTTP.Client (HttpException (..), httpLbs,
import Network.HTTP.Client (HttpException (..),
HttpExceptionContent(..),
httpLbs,
newManager, parseRequest,
responseStatus)
import Network.HTTP.Client.TLS (mkManagerSettings)
Expand All @@ -23,7 +25,7 @@ import Network.TLS (ClientParams, clientShared,
clientSupported,
defaultParamsClient, sharedCAStore,
supportedCiphers)
import Network.TLS.Extra.Cipher (ciphersuite_all)
import Network.TLS.Extra.Cipher (ciphersuite_default)

main :: IO ()
main = do
Expand Down Expand Up @@ -54,7 +56,7 @@ main = do

_ <- catch (doGet request manager)
(\exp' -> case exp' of
TlsExceptionHostPort e _ _ -> do
HttpExceptionRequest _req (InternalException e) -> do
print e
putStrLn "REJECT"
exitSuccess
Expand Down Expand Up @@ -84,6 +86,6 @@ injectCA caBundle p =

injectCiphers :: ClientParams -> ClientParams
injectCiphers p =
p { clientSupported = supported { supportedCiphers = ciphersuite_all } }
p { clientSupported = supported { supportedCiphers = ciphersuite_default } }
where
supported = clientSupported p
5 changes: 4 additions & 1 deletion stubs/haskell-http-client-tls/stack.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
resolver: lts-7.15
resolver: lts-12.17
packages:
- .
- /Users/kazu/work/hs-tls/core
2 changes: 1 addition & 1 deletion stubs/haskell-http-client-tls/test-http-client-tls.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ executable test-http-client-tls
build-depends: base >= 4.7 && < 5
, bytestring
, connection
, http-client
, http-client >= 0.5
, http-client-tls
, http-types
, tls
Expand Down