Skip to content
Closed
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
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.3.6.5

* 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.3.6.5
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
, 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
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
12 changes: 12 additions & 0 deletions stack.yaml.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file was autogenerated by Stack.
# You should not edit this file by hand.
# For more information, please see the documentation at:
# https://docs.haskellstack.org/en/stable/topics/lock_files

packages: []
snapshots:
- completed:
sha256: a8cfaae441160430cdde558cb80d4f9d60746e7417b275250e4e0af57ee14f36
size: 728954
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/24/33.yaml
original: lts-24.33
Loading