From acc0d14f65b7698dfeb6d68e58d46fd2c3f3b6b9 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 4 Jun 2018 16:08:43 +0100 Subject: [PATCH] Fix elliptic curve setup as per https://github.com/matrix-org/synapse/pull/3157 --- sydent/http/httpclient.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sydent/http/httpclient.py b/sydent/http/httpclient.py index a325cbfa..837bc11e 100644 --- a/sydent/http/httpclient.py +++ b/sydent/http/httpclient.py @@ -84,8 +84,8 @@ class FederationPolicyForHTTPS(object): def creatorForNetloc(self, hostname, port): context = SSL.Context(SSL.SSLv23_METHOD) try: - _ecCurve = _OpenSSLECCurve(_defaultCurveName) - _ecCurve.addECKeyToContext(context) + _ecCurve = crypto.get_elliptic_curve(_defaultCurveName) + context.set_tmp_ecdh(_ecCurve) except Exception: logger.exception("Failed to enable elliptic curve for TLS") context.set_options(SSL.OP_NO_SSLv2 | SSL.OP_NO_SSLv3)