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.