Move the test on self.insecure to catch direct calls
Module likes societegenerale includes direct calls on lowsslcheck, and the option -I (insecure) is not tested.
This commit is contained in:
parent
2c0417b2d6
commit
578216b55e
1 changed files with 3 additions and 1 deletions
|
|
@ -439,6 +439,8 @@ class StandardBrowser(mechanize.Browser):
|
|||
return
|
||||
|
||||
def lowsslcheck(self, domain, hsh):
|
||||
if self.INSECURE:
|
||||
return
|
||||
certhash = self._certhash(domain)
|
||||
if self.logger:
|
||||
self.logger.debug('Found %s as certificate hash' % certhash)
|
||||
|
|
@ -538,7 +540,7 @@ class BaseBrowser(StandardBrowser):
|
|||
self.username = username
|
||||
self.password = password
|
||||
|
||||
if not self.INSECURE and self.CERTHASH is not None and self.DOMAIN is not None:
|
||||
if self.CERTHASH is not None and self.DOMAIN is not None:
|
||||
self.lowsslcheck(self.DOMAIN, self.CERTHASH)
|
||||
|
||||
if self.password and get_home:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue