From 3fad8ef7d05c4366caef215a541bed352753cfd0 Mon Sep 17 00:00:00 2001 From: kali kaneko Date: Mon, 17 Jul 2017 15:05:17 -0400 Subject: fix import leap.common 0.6.0 renamed this method. we should think about not using the factory directly, since we want to deprecate leap.common.http --- src/leap/soledad/client/_http.py | 2 +- src/leap/soledad/client/http_target/__init__.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/leap/soledad/client') diff --git a/src/leap/soledad/client/_http.py b/src/leap/soledad/client/_http.py index 2a6b9e39..aa856de6 100644 --- a/src/leap/soledad/client/_http.py +++ b/src/leap/soledad/client/_http.py @@ -28,7 +28,7 @@ from treq.client import HTTPClient as _HTTPClient from zope.interface import implementer -from leap.common.certs import get_compatible_ssl_context_factory +from leap.common.http import getPolicyForHTTPS __all__ = ['HTTPClient', 'PinnedTokenAgent'] diff --git a/src/leap/soledad/client/http_target/__init__.py b/src/leap/soledad/client/http_target/__init__.py index b67d03f6..db6e9cef 100644 --- a/src/leap/soledad/client/http_target/__init__.py +++ b/src/leap/soledad/client/http_target/__init__.py @@ -27,7 +27,7 @@ import os from twisted.web.client import Agent from twisted.internet import reactor -from leap.common.certs import get_compatible_ssl_context_factory +from leap.common.http import getPolicyForHTTPS from leap.soledad.common.log import getLogger from leap.soledad.client.http_target.send import HTTPDocSender from leap.soledad.client.http_target.api import SyncTargetAPI @@ -87,7 +87,7 @@ class SoledadHTTPSyncTarget(SyncTargetAPI, HTTPDocSender, HTTPDocFetcher): self._insert_doc_cb = None # Twisted default Agent with our own ssl context factory - factory = get_compatible_ssl_context_factory(cert_file) + factory = getPolicyForHTTPS(cert_file) self._http = Agent(reactor, factory) if DO_STATS: -- cgit v1.2.3