From 7a59f4d08dd07a25fc4de7c59948f41c8d3b8882 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 19 Apr 2015 11:05:32 -0400 Subject: Removed dependency on haskell SHA library, instead using cryptohash >= 0.11.0. --- Utility/Verifiable.hs | 11 ++++++----- debian/changelog | 2 ++ debian/control | 1 - git-annex.cabal | 2 +- standalone/android/cabal.config | 1 - standalone/linux/cabal.config | 1 - 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Utility/Verifiable.hs b/Utility/Verifiable.hs index a861416e2..278c320ae 100644 --- a/Utility/Verifiable.hs +++ b/Utility/Verifiable.hs @@ -7,11 +7,12 @@ module Utility.Verifiable where -import Data.Digest.Pure.SHA -import Data.ByteString.Lazy.UTF8 (fromString) -import qualified Data.ByteString.Lazy as L +import Data.ByteString.UTF8 (fromString) +import qualified Data.ByteString as S -type Secret = L.ByteString +import Utility.Hash + +type Secret = S.ByteString type HMACDigest = String {- A value, verifiable using a HMAC digest and a secret. -} @@ -28,7 +29,7 @@ verify :: (Eq a, Show a) => Verifiable a -> Secret -> Bool verify v secret = v == mkVerifiable (verifiableVal v) secret calcDigest :: String -> Secret -> HMACDigest -calcDigest v secret = showDigest $ hmacSha1 secret $ fromString v +calcDigest v secret = calcMac HmacSha1 secret (fromString v) {- for quickcheck -} prop_verifiable_sane :: String -> String -> Bool diff --git a/debian/changelog b/debian/changelog index 53de77cc8..ba498e0a1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -23,6 +23,8 @@ git-annex (5.20150410) UNRELEASED; urgency=medium * fsck --from remote: Avoid downloading a key if it would go over the annex.diskreserve limit. * required: New command, like wanted, but for required content. + * Removed dependency on haskell SHA library, + instead using cryptohash >= 0.11.0. -- Joey Hess Thu, 09 Apr 2015 20:59:43 -0400 diff --git a/debian/control b/debian/control index 11f42a8c1..85a3e67e6 100644 --- a/debian/control +++ b/debian/control @@ -10,7 +10,6 @@ Build-Depends: libghc-data-default-dev, libghc-hslogger-dev, libghc-pcre-light-dev, - libghc-sha-dev, libghc-cryptohash-dev (>= 0.11.0), libghc-dataenc-dev, libghc-utf8-string-dev, diff --git a/git-annex.cabal b/git-annex.cabal index 9b0407e1a..99601f2a3 100644 --- a/git-annex.cabal +++ b/git-annex.cabal @@ -105,7 +105,7 @@ Executable git-annex Main-Is: git-annex.hs Build-Depends: MissingH, hslogger, directory, filepath, containers (>= 0.5.0.0), utf8-string, mtl (>= 2), - bytestring, old-locale, time, dataenc, SHA, process, json, + bytestring, old-locale, time, dataenc, process, json, base (>= 4.5 && < 4.9), monad-control, exceptions (>= 0.6), transformers, IfElse, text, QuickCheck >= 2.1, bloomfilter, edit-distance, SafeSemaphore, uuid, random, dlist, unix-compat, async, stm (>= 2.3), diff --git a/standalone/android/cabal.config b/standalone/android/cabal.config index 5ba5bacc2..f39dee91f 100644 --- a/standalone/android/cabal.config +++ b/standalone/android/cabal.config @@ -6,7 +6,6 @@ constraints: Crypto ==4.2.5.1, MissingH ==1.2.1.0, MonadRandom ==0.1.13, QuickCheck ==2.7.6, - SHA ==1.6.1, SafeSemaphore ==0.10.1, aeson ==0.7.0.6, ansi-terminal ==0.6.1.1, diff --git a/standalone/linux/cabal.config b/standalone/linux/cabal.config index 5ba5bacc2..f39dee91f 100644 --- a/standalone/linux/cabal.config +++ b/standalone/linux/cabal.config @@ -6,7 +6,6 @@ constraints: Crypto ==4.2.5.1, MissingH ==1.2.1.0, MonadRandom ==0.1.13, QuickCheck ==2.7.6, - SHA ==1.6.1, SafeSemaphore ==0.10.1, aeson ==0.7.0.6, ansi-terminal ==0.6.1.1, -- cgit v1.2.3