aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorJulien Tanguy <julien.tanguy@jhome.fr>2015-08-17 17:36:35 +0200
committerJulien Tanguy <julien.tanguy@jhome.fr>2015-08-17 17:36:35 +0200
commitbf31e29028a4402ea0d2deefdb3b86efd526acd0 (patch)
treeeaeb9871d201ad092edd901dc4e9091d90166c6d /src
parent7f9f7386fdbe8d19ef30ebd20939e67cc8bb145c (diff)
downloadhmacaroons-bf31e29028a4402ea0d2deefdb3b86efd526acd0.tar.gz
hmacaroons-bf31e29028a4402ea0d2deefdb3b86efd526acd0.tar.zst
hmacaroons-bf31e29028a4402ea0d2deefdb3b86efd526acd0.zip
Typos and stylish-haskell
Diffstat (limited to 'src')
-rw-r--r--src/Crypto/Macaroon/Verifier/Internal.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Crypto/Macaroon/Verifier/Internal.hs b/src/Crypto/Macaroon/Verifier/Internal.hs
index 63d826d..b65b62d 100644
--- a/src/Crypto/Macaroon/Verifier/Internal.hs
+++ b/src/Crypto/Macaroon/Verifier/Internal.hs
@@ -44,7 +44,7 @@ instance Monoid ValidationError where
44 (ValidatorError e) `mappend` (ParseError _) = ValidatorError e 44 (ValidatorError e) `mappend` (ParseError _) = ValidatorError e
45 (ParseError _) `mappend` (ValidatorError e) = ValidatorError e 45 (ParseError _) `mappend` (ValidatorError e) = ValidatorError e
46 46
47 47-- | Check that the given macaroon has a correct signature
48verifySig :: Key -> Macaroon -> Either ValidationError Macaroon 48verifySig :: Key -> Macaroon -> Either ValidationError Macaroon
49verifySig k m = bool (Left SigMismatch) (Right m) $ 49verifySig k m = bool (Left SigMismatch) (Right m) $
50 signature m == foldl' hash (toBytes (hmac derivedKey (identifier m) :: HMAC SHA256)) (caveats m) 50 signature m == foldl' hash (toBytes (hmac derivedKey (identifier m) :: HMAC SHA256)) (caveats m)