packages feed

jose-jwt 0.9.6 → 0.11.0

raw patch · 7 files changed

Files

CHANGELOG.md view
@@ -1,3 +1,13 @@+0.11.0+------++* Update `crypton` version to >= 1.1.0 and replace the `memory` package with the `ram` package to match `crypton` changes.++0.10.0+------++* Change to using crypton (see #41).+ 0.9.6 ----- 
Jose/Jwa.hs view
@@ -1,12 +1,12 @@ {-# LANGUAGE OverloadedStrings #-} {-# OPTIONS_HADDOCK prune #-}+{-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns #-}  module Jose.Jwa     ( Alg (..)     , JwsAlg (..)     , JweAlg (..)     , Enc (..)-    , encName     ) where 
Jose/Jwe.hs view
@@ -140,12 +140,13 @@     -> ExceptT JwtError m Jwt doEncode hdr e encryptKey claims = do     (cmk, iv) <- lift (generateCmkAndIV e)-    let Just (AuthTag sig, ct) = encryptPayload e cmk iv aad claims+    let aad = B64.encode hdr+        (signature, ciphertext) = case encryptPayload e cmk iv aad claims of+                        Just (AuthTag sig, ct) -> (sig, ct)+                        Nothing -> error "encryptPayload failed! Shouldn't happen with valid key and iv"     jweKey <- encryptKey cmk-    let jwe = B.intercalate "." $ map B64.encode [hdr, jweKey, BA.convert iv, BA.convert ct, BA.convert sig]+    let jwe = B.intercalate "." $ map B64.encode [hdr, jweKey, BA.convert iv, BA.convert ciphertext, BA.convert signature]     return (Jwt jwe)-  where-    aad = B64.encode hdr  -- | Creates a JWE with the content key encoded using RSA. rsaEncode :: MonadRandom m
jose-jwt.cabal view
@@ -1,5 +1,5 @@ Name:               jose-jwt-Version:            0.9.6+Version:            0.11.0 Synopsis:           JSON Object Signing and Encryption Library Homepage:           http://github.com/tekul/jose-jwt Bug-Reports:        http://github.com/tekul/jose-jwt/issues@@ -50,19 +50,16 @@     Buildable: False   else     Build-depends:    base >= 4.9 && < 5-                    , aeson >= 1.5 && < 2.3+                    , aeson >= 2 && < 2.4                     , attoparsec >= 0.12.0.0                     , bytestring >= 0.9                     , cereal >= 0.4-                    , containers >= 0.4-                    , cryptonite >= 0.19-                    , memory >= 0.10+                    , crypton >= 1.1.0+                    , ram >= 0.21                     , mtl >= 2.1.3.1-                    , text  >= 0.11-                    , time  >= 1.4+                    , text >= 0.11+                    , time >= 1.4                     , transformers >= 0.3-                    , transformers-compat >= 0.4-                    , unordered-containers >= 0.2                     , vector >= 0.10   Ghc-Options:        -Wall @@ -76,11 +73,8 @@                     , base >= 4.9 && < 5                     , aeson                     , bytestring-                    , cryptonite-                    , memory-                    , mtl-                    , text-                    , unordered-containers+                    , crypton+                    , ram                     , vector                     , hspec >= 1.6                     , HUnit >= 1.2@@ -98,9 +92,9 @@   if !flag(doctest)     Buildable: False   else-    Build-depends:    base  >= 4.9 && < 5+    Build-depends:    base >= 4.9 && < 5                     , doctest >= 0.9.11-                    , cryptonite+                    , crypton  Benchmark bench-jwt   Default-Language:   Haskell2010@@ -112,6 +106,6 @@                     , base >= 4.9 && < 5                     , bytestring                     , criterion-                    , cryptonite+                    , crypton    Ghc-Options:        -Wall -fno-warn-missing-signatures
tests/Tests/JweSpec.hs view
@@ -1,6 +1,6 @@ {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-}-{-# OPTIONS_GHC -fno-warn-missing-signatures -fno-warn-orphans #-}+{-# OPTIONS_GHC -fno-warn-missing-signatures -fno-warn-orphans -fno-warn-incomplete-uni-patterns #-}  module Tests.JweSpec where 
tests/Tests/JwkSpec.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE OverloadedStrings, CPP #-}+{-# OPTIONS_GHC -fno-warn-incomplete-uni-patterns #-}  module Tests.JwkSpec where 
tests/Tests/JwsSpec.hs view
@@ -1,5 +1,5 @@ {-# LANGUAGE OverloadedStrings #-}-{-# OPTIONS_GHC -fno-warn-missing-signatures #-}+{-# OPTIONS_GHC -fno-warn-missing-signatures -fno-warn-incomplete-uni-patterns #-}  module Tests.JwsSpec where