Browse Source

Merge pull request #14 from matrix-org/daniel/oops

sign_json is on sign, not key
Daniel Wagner-Hall 8 years ago
parent
commit
449ea0c7a9

+ 2 - 2
sydent/http/servlets/lookupservlet.py

@@ -18,7 +18,7 @@ from twisted.web.resource import Resource
 from sydent.db.threepid_associations import GlobalAssociationStore
 
 import json
-import signedjson.key
+import signedjson.sign
 
 from sydent.http.servlets import require_args, jsonwrap, send_cors
 
@@ -63,7 +63,7 @@ class LookupServlet(Resource):
             # We do this when we return assocs, not when we receive them over
             # replication, so that we can undo this decision in the future if
             # we wish, without having destroyed the raw underlying data.
-            sgassoc = signedjson.key.sign_json(
+            sgassoc = signedjson.sign.sign_json(
                 sgassoc,
                 self.sydent.server_name,
                 self.sydent.keyring.ed25519

+ 2 - 2
sydent/threepid/assocsigner.py

@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-import signedjson.key
+import signedjson.sign
 
 class AssociationSigner:
     def __init__(self, sydent):
@@ -29,5 +29,5 @@ class AssociationSigner:
                     'not_after': assoc.not_after
                   }
         sgassoc.update(assoc.extra_fields)
-        sgassoc = signedjson.key.sign_json(sgassoc, self.sydent.server_name, self.sydent.keyring.ed25519)
+        sgassoc = signedjson.sign.sign_json(sgassoc, self.sydent.server_name, self.sydent.keyring.ed25519)
         return sgassoc

+ 2 - 2
sydent/threepid/bind.py

@@ -18,7 +18,7 @@ import json
 import logging
 import math
 import random
-import signedjson.key
+import signedjson.sign
 from sydent.db.invite_tokens import JoinTokenStore
 
 from sydent.db.valsession import ThreePidValSessionStore
@@ -71,7 +71,7 @@ class ThreepidBinder:
                 "mxid": mxid,
                 "token": token["token"],
             }
-            token["signed"] = signedjson.key.sign_json(token["signed"], self.sydent.server_name, self.sydent.keyring.ed25519)
+            token["signed"] = signedjson.sign.sign_json(token["signed"], self.sydent.server_name, self.sydent.keyring.ed25519)
             invites.append(token)
         if invites:
             assoc.extra_fields["invites"] = invites