mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-01 17:06:10 -04:00
Sign federation transactions
This commit is contained in:
parent
bf4b224fcf
commit
52ca867670
8 changed files with 73 additions and 10 deletions
|
@ -108,6 +108,21 @@ class MockHttpResource(HttpServer):
|
|||
self.callbacks.append((method, path_pattern, callback))
|
||||
|
||||
|
||||
class MockKey(object):
|
||||
alg = "mock_alg"
|
||||
version = "mock_version"
|
||||
|
||||
@property
|
||||
def verify_key(self):
|
||||
return self
|
||||
|
||||
def sign(self, message):
|
||||
return b"\x9a\x87$"
|
||||
|
||||
def verify(self, message, sig):
|
||||
assert sig == b"\x9a\x87$"
|
||||
|
||||
|
||||
class MockClock(object):
|
||||
now = 1000
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue