From 399393871ac8d8e3d4ea0e9a8cace0bd41805395 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Dutreve Date: Wed, 20 May 2015 16:34:35 +0200 Subject: [PATCH] SSL not supported anymore Signed-off-by: Jean-Philippe Dutreve --- modules/ganassurances/browser.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/modules/ganassurances/browser.py b/modules/ganassurances/browser.py index 614861f6..bf0ee230 100644 --- a/modules/ganassurances/browser.py +++ b/modules/ganassurances/browser.py @@ -18,6 +18,8 @@ # along with weboob. If not, see . +import ssl + from weboob.browser import LoginBrowser, URL, need_login from weboob.exceptions import BrowserIncorrectPassword @@ -36,6 +38,15 @@ class GanAssurances(LoginBrowser): self.BASEURL = 'https://%s' % website super(GanAssurances, self).__init__(*args, **kwargs) + def prepare_request(self, req): + """ + Gan Assurances does not support SSL anymore. + """ + preq = super(GanAssurances, self).prepare_request(req) + conn = self.session.adapters['https://'].get_connection(preq.url) + conn.ssl_version = ssl.PROTOCOL_TLSv1 + return preq + def do_login(self): """ Attempt to log in.