From 013dbec80cf01445950ec84ef422a98c930cd420 Mon Sep 17 00:00:00 2001 From: Ben Millwood Date: Sat, 21 Sep 2024 19:26:42 +0100 Subject: [PATCH 1/2] Use better default TLS settings On versions of tls pre-2.0.6, the default `Supported` had an empty list of `supportedCiphers`. Per discussion on [their issue][1], it seems like everyone was overriding it to `ciphersuite_default` anyway, hence the change at version 2.0.6 to make that default. But we're not doing that here! Luckily, the [default for `TLSSettings`][2] does do that override, so we can use that to get the right behaviour regardless of tls version. [1]: https://github.com/haskell-tls/hs-tls/pull/471 [2]: https://hackage.haskell.org/package/crypton-connection-0.4.0/docs/src/Network.Connection.Types.html#line-86 --- Network/HTTP/Req.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Network/HTTP/Req.hs b/Network/HTTP/Req.hs index 2286e36..62444f7 100644 --- a/Network/HTTP/Req.hs +++ b/Network/HTTP/Req.hs @@ -607,7 +607,7 @@ globalManager = unsafePerformIO $ do let settings = L.mkManagerSettingsContext (Just context) - (NC.TLSSettingsSimple False False False def) + def Nothing manager <- L.newManager settings newIORef manager From c369df0d85f32abfa67a545204f204c759082cff Mon Sep 17 00:00:00 2001 From: Ben Millwood Date: Sat, 28 Sep 2024 21:39:35 +0100 Subject: [PATCH 2/2] Version bump (3.13.4) --- CHANGELOG.md | 6 ++++++ req.cabal | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10916a1..3788ebb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## Req 3.13.4 + +* Fixed empty ciphersuite list when compiling against `tls < 2.0.6` + (see [PR 175](https://github.com/mrkkrp/req/pull/175)). As a side effect, now + compatible with older versions of `crypton-connection` (>= 0.3). + ## Req 3.13.3 * Works with `crypton-connection-0.4` and newer. diff --git a/req.cabal b/req.cabal index 8baa19a..407c280 100644 --- a/req.cabal +++ b/req.cabal @@ -1,6 +1,6 @@ cabal-version: 2.4 name: req -version: 3.13.3 +version: 3.13.4 license: BSD-3-Clause license-file: LICENSE.md maintainer: Mark Karpov @@ -40,7 +40,7 @@ library bytestring >=0.10.8 && <0.13, case-insensitive >=0.2 && <1.3, containers >=0.5 && <0.7, - crypton-connection >=0.4 && <0.5, + crypton-connection >=0.3 && <0.5, data-default-class, exceptions >=0.6 && <0.11, http-api-data >=0.2 && <0.7,