Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit 9202fc8

Browse files
authored
Merge pull request #3620 from input-output-hk/KtorZ/CO-389/cardano-sl-x509-as-library
[CO-389] Write properties for cardano-sl-x509
2 parents 27a9644 + 48a1957 commit 9202fc8

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

cardano-sl-wallet-new.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ library
191191
, cardano-sl-node-ipc
192192
, cardano-sl-util
193193
, cardano-sl-wallet
194+
, cardano-sl-x509
194195
, cereal
195196
, conduit
196197
, connection

src/Cardano/Wallet/Client/Http.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ module Cardano.Wallet.Client.Http
88
, module Servant.Client
99
-- * Helper to load X509 certificates and private key
1010
, credentialLoadX509
11+
, readSignedObject
1112
, newManager
1213
, Manager
1314
) where
@@ -20,6 +21,8 @@ import Data.ByteString (ByteString)
2021
import Data.Default.Class (Default (..))
2122
import Data.X509 (CertificateChain, SignedCertificate)
2223
import Data.X509.CertificateStore (makeCertificateStore)
24+
import Data.X509.Extra (validateDefaultWithIP)
25+
import Data.X509.File (readSignedObject)
2326
import Network.Connection (TLSSettings (..))
2427
import Network.HTTP.Client (Manager, ManagerSettings,
2528
defaultManagerSettings, newManager)
@@ -73,6 +76,7 @@ mkHttpsManagerSettings serverId caChain credentials =
7376
}
7477
clientHooks = def
7578
{ onCertificateRequest = const . return . Just $ credentials
79+
, onServerCertificate = validateDefaultWithIP
7680
}
7781
clientSupported = def
7882
{ supportedCiphers = ciphersuite_default

0 commit comments

Comments
 (0)