aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--README.md1
-rw-r--r--src/Crypto/Macaroon.hs2
-rw-r--r--test/Crypto/Macaroon/Tests.hs30
3 files changed, 17 insertions, 16 deletions
diff --git a/README.md b/README.md
index 97fc53e..ea1a1e6 100644
--- a/README.md
+++ b/README.md
@@ -33,6 +33,7 @@ Implementations
33TODO 33TODO
34==== 34====
35 35
36- Third party caveats
36- Verify Macaroons 37- Verify Macaroons
37- Discharge Macaroons 38- Discharge Macaroons
38- JSON serialization 39- JSON serialization
diff --git a/src/Crypto/Macaroon.hs b/src/Crypto/Macaroon.hs
index 36aecf9..f955ab8 100644
--- a/src/Crypto/Macaroon.hs
+++ b/src/Crypto/Macaroon.hs
@@ -41,7 +41,7 @@ module Crypto.Macaroon (
41 , create 41 , create
42 , inspect 42 , inspect
43 , addFirstPartyCaveat 43 , addFirstPartyCaveat
44 , addThirdPartyCaveat 44 -- , addThirdPartyCaveat
45 ) where 45 ) where
46 46
47import Crypto.Cipher.AES 47import Crypto.Cipher.AES
diff --git a/test/Crypto/Macaroon/Tests.hs b/test/Crypto/Macaroon/Tests.hs
index 6fa6504..244ec50 100644
--- a/test/Crypto/Macaroon/Tests.hs
+++ b/test/Crypto/Macaroon/Tests.hs
@@ -24,7 +24,7 @@ tests :: TestTree
24tests = testGroup "Crypto.Macaroon" [ basic 24tests = testGroup "Crypto.Macaroon" [ basic
25 , minted 25 , minted
26 , minted2 26 , minted2
27 , minted3 27 -- , minted3
28 ] 28 ]
29 29
30 30
@@ -93,20 +93,20 @@ mint2Trimmed = testCase "Serialization" $
93mint2Des = testCase "Deserialization" $ 93mint2Des = testCase "Deserialization" $
94 Right m3 @=? (deserialize . serialize) m3 94 Right m3 @=? (deserialize . serialize) m3
95 95
96m4 :: Macaroon 96-- m4 :: Macaroon
97m4 = addThirdPartyCaveat caveat_key caveat_id caveat_loc n 97-- m4 = addThirdPartyCaveat caveat_key caveat_id caveat_loc n
98 where 98-- where
99 n = addFirstPartyCaveat "account = 3735928559" $ create sec key loc 99-- n = addFirstPartyCaveat "account = 3735928559" $ create sec key loc
100 key = B8.pack "we used our other secret key" 100-- key = B8.pack "we used our other secret key"
101 loc = B8.pack "http://mybank/" 101-- loc = B8.pack "http://mybank/"
102 sec = B8.pack "this is a different super-secret key; never use the same secret twice" 102-- sec = B8.pack "this is a different super-secret key; never use the same secret twice"
103 caveat_key = B8.pack "4; guaranteed random by a fair toss of the dice" 103-- caveat_key = B8.pack "4; guaranteed random by a fair toss of the dice"
104 caveat_id = B8.pack "this was how we remind auth of key/pred" 104-- caveat_id = B8.pack "this was how we remind auth of key/pred"
105 caveat_loc = B8.pack "http://auth.mybank/" 105-- caveat_loc = B8.pack "http://auth.mybank/"
106 106
107minted3 :: TestTree 107-- minted3 :: TestTree
108minted3 = testGroup "Macaroon with first and third party caveats" [ mint3sig ] 108-- minted3 = testGroup "Macaroon with first and third party caveats" [ mint3sig ]
109 109
110 110
111mint3sig = testCase "Signature" $ 111-- mint3sig = testCase "Signature" $
112 "6B99EDB2EC6D7A4382071D7D41A0BF7DFA27D87D2F9FEA86E330D7850FFDA2B2" @=? (hex . signature) m4 112-- "6B99EDB2EC6D7A4382071D7D41A0BF7DFA27D87D2F9FEA86E330D7850FFDA2B2" @=? (hex . signature) m4