Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
push:
branches:
- master
- ci
pull_request:
branches:
- master
Expand Down
5 changes: 5 additions & 0 deletions http-client-tls/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog for http-client-tls

## 0.4.0

* For MD5 hashes in Base16 format, depend on packages `cryptohash-md5` and
`base16` rather than `crypton` and `memory` (the latter is unmaintained).

## 0.3.6.4

* data-default-class -> data-default [#546](https://github.com/snoyberg/http-client/pull/546/files)
Expand Down
7 changes: 4 additions & 3 deletions http-client-tls/Network/HTTP/Client/TLS.hs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ import Control.Monad (guard, unless)
import qualified Data.CaseInsensitive as CI
import Data.Maybe (fromMaybe, isJust)
import Network.HTTP.Types (status401)
import Crypto.Hash (hash, Digest, MD5)
import qualified Crypto.Hash.MD5 as MD5
import Control.Arrow ((***))
import Data.ByteArray.Encoding (convertToBase, Base (Base16))
import Data.Base16.Types (extractBase16)
import Data.ByteString.Base16 (encodeBase16')
import Data.Typeable (Typeable)
import Control.Monad.Catch (MonadThrow, throwM)
import qualified Data.Map as Map
Expand Down Expand Up @@ -361,7 +362,7 @@ applyDigestAuth user pass req0 man = liftIO $ do
-- we always use no qop or qop=auth
ha2 = md5 $ S.concat [method req, ":", path req]

md5 bs = convertToBase Base16 (hash bs :: Digest MD5)
md5 = extractBase16 . encodeBase16' . MD5.hash
key = "Authorization"
val = S.concat
[ "Digest username=\""
Expand Down
6 changes: 3 additions & 3 deletions http-client-tls/http-client-tls.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: http-client-tls
version: 0.3.6.4
version: 0.4.0
synopsis: http-client backend using the connection package and tls library
description: Hackage documentation generation is not reliable. For up to date documentation, please see: <https://www.stackage.org/package/http-client-tls>.
homepage: https://github.com/snoyberg/http-client
Expand All @@ -17,6 +17,8 @@ library
exposed-modules: Network.HTTP.Client.TLS
other-extensions: ScopedTypeVariables
build-depends: base >= 4.10 && < 5
, base16 >= 1.0
, cryptohash-md5
, data-default
, http-client >= 0.7.11
, crypton-connection
Expand All @@ -26,8 +28,6 @@ library
, case-insensitive
, transformers
, http-types
, crypton
, memory
, exceptions
, containers
, text
Expand Down
1 change: 1 addition & 0 deletions http-conduit/http-conduit.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ test-suite test
, warp-tls
, tls < 1.5 || >= 1.5.2
, time
, time-manager < 0.3
, blaze-builder
, bytestring
, text
Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolver: nightly-2025-03-20
snapshot: lts-24.33 # GHC 9.10.3
packages:
- http-client
- http-client-tls
Expand Down
Loading