packages feed

crypton-connection 0.3.2 → 0.4.0

raw patch · 4 files changed

+12/−4 lines, 4 filesdep ~tlsPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: tls

API changes (from Hackage documentation)

+ Network.Connection: [settingClientSupported] :: TLSSettings -> Supported
- Network.Connection: TLSSettingsSimple :: Bool -> Bool -> Bool -> TLSSettings
+ Network.Connection: TLSSettingsSimple :: Bool -> Bool -> Bool -> Supported -> TLSSettings

Files

CHANGELOG.md view
@@ -1,3 +1,8 @@+## Version 0.4.0++* Add support for overriding the TLS clientSupported member in TLSSettingsSimple+  [#3](https://github.com/kazu-yamamoto/crypton-connection/pull/3)+ ## Version 0.3.2  * Supporting tls v2.0.0.
Network/Connection.hs view
@@ -57,7 +57,6 @@ import qualified System.IO.Error as E (mkIOError, eofErrorType)  import qualified Network.TLS as TLS-import qualified Network.TLS.Extra as TLS  import System.X509 (getSystemCertificateStore) @@ -123,7 +122,7 @@ makeTLSParams :: ConnectionContext -> ConnectionID -> TLSSettings -> TLS.ClientParams makeTLSParams cg cid ts@(TLSSettingsSimple {}) =     (TLS.defaultParamsClient (fst cid) portString)-        { TLS.clientSupported = def { TLS.supportedCiphers = TLS.ciphersuite_default }+        { TLS.clientSupported = settingClientSupported ts         , TLS.clientShared    = def             { TLS.sharedCAStore         = globalCertificateStore cg             , TLS.sharedValidationCache = validationCache
Network/Connection/Types.hs view
@@ -18,6 +18,7 @@  import Network.Socket (PortNumber, Socket) import qualified Network.TLS as TLS+import qualified Network.TLS.Extra as TLS  import System.IO (Handle) @@ -75,12 +76,15 @@                                                            --   will always re-established their context.                                                            --   Not Implemented Yet.              , settingUseServerName                :: Bool -- ^ Use server name extension. Not Implemented Yet.+             , settingClientSupported              :: TLS.Supported+                                                           -- ^ Used for the 'TLS.clientSupported'+                                                           --   member of 'TLS.ClientParams'.              } -- ^ Simple TLS settings. recommended to use.     | TLSSettings TLS.ClientParams -- ^ full blown TLS Settings directly using TLS.Params. for power users.     deriving (Show)  instance Default TLSSettings where-    def = TLSSettingsSimple False False False+    def = TLSSettingsSimple False False False def { TLS.supportedCiphers = TLS.ciphersuite_default }  type ConnectionID = (HostName, PortNumber) 
crypton-connection.cabal view
@@ -1,5 +1,5 @@ Name:                crypton-connection-Version:             0.3.2+Version:             0.4.0 Description:     Simple network library for all your connection need.     .