diff options
author | Julien Tanguy <julien.tanguy@jhome.fr> | 2015-05-13 11:07:46 +0200 |
---|---|---|
committer | Julien Tanguy <julien.tanguy@jhome.fr> | 2015-05-13 11:07:46 +0200 |
commit | 8505c3d3b428f6a31cb2f9665ebefeb3ec117f7c (patch) | |
tree | e8d0da8de8af405d46c137cf881083cdc2a9b9d6 /src/Crypto | |
parent | a5822779f64dcf42a271df7d0043f6665583ea0a (diff) | |
download | hmacaroons-8505c3d3b428f6a31cb2f9665ebefeb3ec117f7c.tar.gz hmacaroons-8505c3d3b428f6a31cb2f9665ebefeb3ec117f7c.tar.zst hmacaroons-8505c3d3b428f6a31cb2f9665ebefeb3ec117f7c.zip |
Remove third party caveats
[ci skip]
Diffstat (limited to 'src/Crypto')
-rw-r--r-- | src/Crypto/Macaroon.hs | 18 | ||||
-rw-r--r-- | src/Crypto/Macaroon/Internal.hs | 1 |
2 files changed, 9 insertions, 10 deletions
diff --git a/src/Crypto/Macaroon.hs b/src/Crypto/Macaroon.hs index f955ab8..bfcf8df 100644 --- a/src/Crypto/Macaroon.hs +++ b/src/Crypto/Macaroon.hs | |||
@@ -44,7 +44,7 @@ module Crypto.Macaroon ( | |||
44 | -- , addThirdPartyCaveat | 44 | -- , addThirdPartyCaveat |
45 | ) where | 45 | ) where |
46 | 46 | ||
47 | import Crypto.Cipher.AES | 47 | -- import Crypto.Cipher.AES |
48 | import Crypto.Hash | 48 | import Crypto.Hash |
49 | import Data.Byteable | 49 | import Data.Byteable |
50 | import qualified Data.ByteString as BS | 50 | import qualified Data.ByteString as BS |
@@ -81,13 +81,13 @@ addFirstPartyCaveat ident m = addCaveat (location m) ident BS.empty m | |||
81 | 81 | ||
82 | -- |Add a third party Caveat to a Macaroon, using its location, identifier and | 82 | -- |Add a third party Caveat to a Macaroon, using its location, identifier and |
83 | -- verification key | 83 | -- verification key |
84 | addThirdPartyCaveat :: Key | 84 | -- addThirdPartyCaveat :: Key |
85 | -> Key | 85 | -- -> Key |
86 | -> Location | 86 | -- -> Location |
87 | -> Macaroon | 87 | -- -> Macaroon |
88 | -> Macaroon | 88 | -- -> Macaroon |
89 | addThirdPartyCaveat key cid loc m = addCaveat loc cid vid m | 89 | -- addThirdPartyCaveat key cid loc m = addCaveat loc cid vid m |
90 | where | 90 | -- where |
91 | vid = encryptECB (initAES (signature m)) key | 91 | -- vid = encryptECB (initAES (signature m)) key |
92 | 92 | ||
93 | 93 | ||
diff --git a/src/Crypto/Macaroon/Internal.hs b/src/Crypto/Macaroon/Internal.hs index 02b7963..116f5ed 100644 --- a/src/Crypto/Macaroon/Internal.hs +++ b/src/Crypto/Macaroon/Internal.hs | |||
@@ -15,7 +15,6 @@ module Crypto.Macaroon.Internal where | |||
15 | 15 | ||
16 | 16 | ||
17 | import Control.DeepSeq | 17 | import Control.DeepSeq |
18 | import Crypto.Cipher.AES | ||
19 | import Crypto.Hash | 18 | import Crypto.Hash |
20 | import Data.Byteable | 19 | import Data.Byteable |
21 | import qualified Data.ByteString as BS | 20 | import qualified Data.ByteString as BS |