summary refs log tree commit diff
path: root/synapse/handlers/device.py
diff options
context:
space:
mode:
authorHubert Chathi <hubert@uhoreg.ca>2019-05-22 16:42:00 -0400
committerHubert Chathi <hubert@uhoreg.ca>2019-10-22 19:04:35 -0400
commit8d3542a64e2689a00ed87f9bd58fe3e1d3b10ed8 (patch)
treed96814f4ae9fa1f54defd9336889c3a3a36d5a63 /synapse/handlers/device.py
parentMerge pull request #5726 from matrix-org/uhoreg/e2e_cross-signing2-part2 (diff)
downloadsynapse-8d3542a64e2689a00ed87f9bd58fe3e1d3b10ed8.tar.xz
implement federation parts of cross-signing
Diffstat (limited to 'synapse/handlers/device.py')
-rw-r--r--synapse/handlers/device.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/synapse/handlers/device.py b/synapse/handlers/device.py
index 5f23ee4488..cd6eb52316 100644
--- a/synapse/handlers/device.py
+++ b/synapse/handlers/device.py
@@ -458,7 +458,18 @@ class DeviceHandler(DeviceWorkerHandler):
     @defer.inlineCallbacks
     def on_federation_query_user_devices(self, user_id):
         stream_id, devices = yield self.store.get_devices_with_keys_by_user(user_id)
-        return {"user_id": user_id, "stream_id": stream_id, "devices": devices}
+        master_key = yield self.store.get_e2e_cross_signing_key(user_id, "master")
+        self_signing_key = yield self.store.get_e2e_cross_signing_key(
+            user_id, "self_signing"
+        )
+
+        return {
+            "user_id": user_id,
+            "stream_id": stream_id,
+            "devices": devices,
+            "master_key": master_key,
+            "self_signing_key": self_signing_key
+        }
 
     @defer.inlineCallbacks
     def user_left_room(self, user, room_id):