aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/Crypto/Macaroon
diff options
context:
space:
mode:
authorJulien Tanguy <julien.tanguy@jhome.fr>2015-04-14 17:47:05 +0200
committerJulien Tanguy <julien.tanguy@jhome.fr>2015-04-14 17:47:05 +0200
commit26d38f73993db56811d198a3e0b5c710722dd472 (patch)
tree433b28f99826251ea19ea0c1c56e52bd78a61414 /test/Crypto/Macaroon
parent30c4b9252064ed044adf1776ff9501841c4de2fe (diff)
downloadhmacaroons-26d38f73993db56811d198a3e0b5c710722dd472.tar.gz
hmacaroons-26d38f73993db56811d198a3e0b5c710722dd472.tar.zst
hmacaroons-26d38f73993db56811d198a3e0b5c710722dd472.zip
Disable third party caveats
Diffstat (limited to 'test/Crypto/Macaroon')
-rw-r--r--test/Crypto/Macaroon/Tests.hs30
1 files changed, 15 insertions, 15 deletions
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