Skip to content

Commit

Permalink
Disable certificate validation (as if PYASN1 were not installed)
Browse files Browse the repository at this point in the history
  • Loading branch information
OverloadUT committed Apr 18, 2019
1 parent f96de1c commit de73c44
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions sleekxmpp/xmlstream/cert.py → sleekxmppfs/xmlstream/cert.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ def extract_names(raw_cert):


def extract_dates(raw_cert):
# !!!! HACK HACK HACK HACK HACK !!!!
# For this sucks-only version of SleekXMPP, we avoid validating the certs due to Ecovacs' servers having invalid certs
return None, None


if not HAVE_PYASN1:
log.warning("Could not find pyasn1 and pyasn1_modules. " + \
"SSL certificate expiration COULD NOT BE VERIFIED.")
Expand Down Expand Up @@ -125,6 +130,12 @@ def get_ttl(raw_cert):


def verify(expected, raw_cert):
# !!!! HACK HACK HACK HACK HACK !!!!
# For this sucks-only version of SleekXMPP, we avoid validating the certs due to Ecovacs' servers having invalid certs
return



if not HAVE_PYASN1:
log.warning("Could not find pyasn1 and pyasn1_modules. " + \
"SSL certificate COULD NOT BE VERIFIED.")
Expand Down

0 comments on commit de73c44

Please sign in to comment.