-}
-
-func TestVerifySignature(t *testing.T) {
- PermissionSecret = []byte(known_key)
- defer func() { PermissionSecret = nil }()
-
- if VerifySignature(known_signed_locator, known_token) != nil {
- t.Fail()
- }
-}
-
-func TestVerifySignatureExtraHints(t *testing.T) {
- PermissionSecret = []byte(known_key)
- defer func() { PermissionSecret = nil }()
-
- if VerifySignature(known_locator+"+K@xyzzy"+known_sig_hint, known_token) != nil {
- t.Fatal("Verify cannot handle hint before permission signature")
- }
-
- if VerifySignature(known_locator+known_sig_hint+"+Zfoo", known_token) != nil {
- t.Fatal("Verify cannot handle hint after permission signature")
- }
-
- if VerifySignature(known_locator+"+K@xyzzy"+known_sig_hint+"+Zfoo", known_token) != nil {
- t.Fatal("Verify cannot handle hints around permission signature")
- }
-}
-
-// The size hint on the locator string should not affect signature validation.
-func TestVerifySignatureWrongSize(t *testing.T) {
- PermissionSecret = []byte(known_key)
- defer func() { PermissionSecret = nil }()