summary refs log tree commit diff
path: root/synapse/crypto
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2014-10-27 11:14:11 +0000
committerMark Haines <mark.haines@matrix.org>2014-10-27 11:14:11 +0000
commitacb2d171e88f7e5a60f6468e5b4f39fdb1ce94a3 (patch)
tree98b171bd5303e03ee123708f6ed96932f29db558 /synapse/crypto
parentAdd script to hash exisitng history (diff)
parentTest pyflakes jenikns integration (diff)
downloadsynapse-acb2d171e88f7e5a60f6468e5b4f39fdb1ce94a3.tar.xz
Merge branch 'develop' into event_signing
Diffstat (limited to 'synapse/crypto')
-rw-r--r--synapse/crypto/context_factory.py5
-rw-r--r--synapse/crypto/keyclient.py1
-rw-r--r--synapse/crypto/keyring.py1
3 files changed, 5 insertions, 2 deletions
diff --git a/synapse/crypto/context_factory.py b/synapse/crypto/context_factory.py
index f86bd19255..f402c795bb 100644
--- a/synapse/crypto/context_factory.py
+++ b/synapse/crypto/context_factory.py
@@ -16,6 +16,9 @@ from twisted.internet import ssl
 from OpenSSL import SSL
 from twisted.internet._sslverify import _OpenSSLECCurve, _defaultCurveName
 
+import logging
+
+logger = logging.getLogger(__name__)
 
 class ServerContextFactory(ssl.ContextFactory):
     """Factory for PyOpenSSL SSL contexts that are used to handle incoming
@@ -31,7 +34,7 @@ class ServerContextFactory(ssl.ContextFactory):
             _ecCurve = _OpenSSLECCurve(_defaultCurveName)
             _ecCurve.addECKeyToContext(context)
         except:
-            pass
+            logger.exception("Failed to enable eliptic curve for TLS")
         context.set_options(SSL.OP_NO_SSLv2 | SSL.OP_NO_SSLv3)
         context.use_certificate(config.tls_certificate)
         context.use_privatekey(config.tls_private_key)
diff --git a/synapse/crypto/keyclient.py b/synapse/crypto/keyclient.py
index 5949ea0573..7cfec5148e 100644
--- a/synapse/crypto/keyclient.py
+++ b/synapse/crypto/keyclient.py
@@ -17,7 +17,6 @@
 from twisted.web.http import HTTPClient
 from twisted.internet.protocol import Factory
 from twisted.internet import defer, reactor
-from twisted.internet.endpoints import connectProtocol
 from synapse.http.endpoint import matrix_endpoint
 import json
 import logging
diff --git a/synapse/crypto/keyring.py b/synapse/crypto/keyring.py
index 015f76ebe3..2440d604c3 100644
--- a/synapse/crypto/keyring.py
+++ b/synapse/crypto/keyring.py
@@ -38,6 +38,7 @@ class Keyring(object):
 
     @defer.inlineCallbacks
     def verify_json_for_server(self, server_name, json_object):
+        logger.debug("Verifying for %s", server_name)
         key_ids = signature_ids(json_object, server_name)
         if not key_ids:
             raise SynapseError(