Skip to content

Commit

Permalink
bump tls' dependency version to include support for TLS-1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
KtorZ committed Aug 5, 2020
1 parent 40a8b5d commit 11078d8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/core/test/unit/Cardano/Wallet/Api/Server/TlsSpec.hs
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ import Network.HTTP.Client.TLS
import Network.HTTP.Types.Status
( Status (..) )
import Network.TLS
( ClientHooks (..)
( AlertDescription (..)
, ClientHooks (..)
, ClientParams (..)
, Credentials (..)
, Shared (..)
, Supported (..)
, TLSError (..)
, TLSException (..)
, noSessionManager
)
Expand Down Expand Up @@ -115,7 +117,8 @@ spec = describe "TLS Client Authentication" $ do
pingHttps tlsCl port `shouldThrow` \case
HttpExceptionRequest _ (InternalException e) ->
case fromException e of
Just HandshakeFailed{} -> True
Just (Terminated _ _ (Error_Protocol (_,_,alert))) ->
alert == CertificateUnknown
_ -> False
_ -> False

Expand Down Expand Up @@ -188,6 +191,7 @@ mkHttpsManagerSettings TlsConfiguration{tlsCaCert,tlsSvCert,tlsSvKey} = do
, clientHooks = clientHooks credentials
, clientSupported = clientSupported
, clientDebug = def
, clientEarlyData = def
}

clientShared caChain credentials = Shared
Expand Down
3 changes: 3 additions & 0 deletions stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ extra-deps:
# 'zip' with an extra flag to disable bzlib2 library
- zip-1.3.0

# Needed for recently introduced support of TLS-1.3
- tls-1.5.4

# persistent-2.10.2 with CASCADE DELETE support for SQLite.
#
# See: https://github.com/input-output-hk/persistent/tree/cardano-wallet
Expand Down

0 comments on commit 11078d8

Please sign in to comment.