summary refs log tree commit diff
path: root/synapse/federation/federation_server.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-02-10 15:46:48 +0000
committerErik Johnston <erik@matrix.org>2015-02-10 15:46:48 +0000
commit093e34e30141268b193d4aa9d14311a5e3fba3a6 (patch)
tree69b2ae540184bd71c7632b8d98db42bd6cdb8e24 /synapse/federation/federation_server.py
parentRemove unnecessary logging (diff)
parentSign auth_chains when returned by /state/ requests (diff)
downloadsynapse-093e34e30141268b193d4aa9d14311a5e3fba3a6.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into state-chache
Diffstat (limited to 'synapse/federation/federation_server.py')
-rw-r--r--synapse/federation/federation_server.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/synapse/federation/federation_server.py b/synapse/federation/federation_server.py
index 4742ca9390..b23f72c7fa 100644
--- a/synapse/federation/federation_server.py
+++ b/synapse/federation/federation_server.py
@@ -25,6 +25,8 @@ from synapse.events import FrozenEvent
 
 from synapse.api.errors import FederationError, SynapseError
 
+from synapse.crypto.event_signing import compute_event_signature
+
 import logging
 
 
@@ -156,6 +158,15 @@ class FederationServer(FederationBase):
             auth_chain = yield self.store.get_auth_chain(
                 [pdu.event_id for pdu in pdus]
             )
+
+            for event in auth_chain:
+                event.signatures.update(
+                    compute_event_signature(
+                        event,
+                        self.hs.hostname,
+                        self.hs.config.signing_key[0]
+                    )
+                )
         else:
             raise NotImplementedError("Specify an event")