summary refs log tree commit diff
path: root/synapse/storage/__init__.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2014-10-16 00:09:48 +0100
committerMark Haines <mark.haines@matrix.org>2014-10-16 00:09:48 +0100
commit66104da10c4191aa1e048f2379190574755109e6 (patch)
tree6b98f50ebaef2b75c78368174ddb939c3e95200e /synapse/storage/__init__.py
parentpersist hashes and origin signatures for PDUs (diff)
downloadsynapse-66104da10c4191aa1e048f2379190574755109e6.tar.xz
Sign outgoing PDUs.
Diffstat (limited to 'synapse/storage/__init__.py')
-rw-r--r--synapse/storage/__init__.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index bfeab7d1e8..b2a3f0b56c 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -42,6 +42,7 @@ from .transactions import TransactionStore
 from .keys import KeyStore
 from .signatures import SignatureStore
 
+from syutil.base64util import decode_base64
 
 import json
 import logging
@@ -168,11 +169,11 @@ class DataStore(RoomMemberStore, RoomStore,
                 txn, pdu.pdu_id, pdu.origin, hash_alg, hash_bytes,
             )
 
-        signatures = pdu.sigatures.get(pdu.orgin, {})
+        signatures = pdu.signatures.get(pdu.origin, {})
 
-        for key_id, signature_base64 in signatures:
+        for key_id, signature_base64 in signatures.items():
             signature_bytes = decode_base64(signature_base64)
-            self.store_pdu_origin_signatures_txn(
+            self._store_pdu_origin_signature_txn(
                 txn, pdu.pdu_id, pdu.origin, key_id, signature_bytes,
             )