force use of TLSv1 on lowsslcheck as the web server's support of SSLv3 is broken
This commit is contained in:
parent
552a0b2351
commit
4cbb7591fa
1 changed files with 7 additions and 0 deletions
|
|
@ -18,6 +18,8 @@
|
|||
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
import ssl
|
||||
import hashlib
|
||||
from urlparse import urlsplit
|
||||
|
||||
from weboob.tools.browser import BaseBrowser, BrowserIncorrectPassword
|
||||
|
|
@ -43,6 +45,11 @@ class CaisseEpargne(BaseBrowser):
|
|||
self.nuser = nuser
|
||||
BaseBrowser.__init__(self, *args, **kwargs)
|
||||
|
||||
def _certhash(self, domain, port=443):
|
||||
# XXX overload the BaseBrowser method to force use of TLSv1.
|
||||
certs = ssl.get_server_certificate((domain, port), ssl_version=ssl.PROTOCOL_TLSv1)
|
||||
return hashlib.sha256(certs).hexdigest()
|
||||
|
||||
def is_logged(self):
|
||||
return self.page is not None and not self.is_on_page((LoginPage,ErrorPage))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue