upgrade tls package to 2.1.8

This commit is contained in:
Evgeny Poberezkin committed 2025-09-02 10:00:58 +01:00
1 parent 3e7aea986b
commit 5ab13ad401
1 file changed
+4 -3
+4 -3
View File
@@ -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],