From 5ab13ad401eeb48a7e3b7f599bcd1561c11f8de1 Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin Date: Tue, 2 Sep 2025 10:00:58 +0100 Subject: [PATCH] upgrade tls package to 2.1.8 --- src/Simplex/Messaging/Transport.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Simplex/Messaging/Transport.hs b/src/Simplex/Messaging/Transport.hs index 0b2eb3b75..1c00ec261 100644 --- a/src/Simplex/Messaging/Transport.hs +++ b/src/Simplex/Messaging/Transport.hs @@ -132,6 +132,7 @@ import GHC.IO.Handle.Internals (ioe_EOF) import Network.Socket import qualified Network.TLS as T import qualified Network.TLS.Extra as TE +import qualified Network.TLS.Internal as TI import qualified Paths_simplexmq as SMQ import qualified Simplex.Messaging.Crypto as C import Simplex.Messaging.Encoding @@ -369,7 +370,7 @@ getTLS cfg tlsCertSent tlsPeerCert cxt = withTlsUnique @TLS @p cxt newTLS withTlsUnique :: forall c p. TransportPeerI p => T.Context -> (ByteString -> IO (c p)) -> IO (c p) withTlsUnique cxt f = cxtFinished cxt - >>= maybe (closeTLS cxt >> ioe_EOF) f + >>= maybe (closeTLS cxt >> ioe_EOF) (\(TI.VerifyData d) -> f d) where cxtFinished = case sTransportPeer @p of STServer -> T.getPeerFinished @@ -386,8 +387,8 @@ defaultSupportedParams = def { T.supportedVersions = [T.TLS13, T.TLS12], T.supportedCiphers = - [ TE.cipher_TLS13_CHACHA20POLY1305_SHA256, -- for TLS13 - TE.cipher_ECDHE_ECDSA_CHACHA20POLY1305_SHA256 -- for TLS12 + [ TE.cipher13_CHACHA20_POLY1305_SHA256, -- for TLS13 + TE.cipher_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 -- for TLS12 ], T.supportedHashSignatures = [(T.HashIntrinsic, T.SignatureEd448), (T.HashIntrinsic, T.SignatureEd25519)], T.supportedGroups = [T.X448, T.X25519],