Skip to content

Commit

Permalink
Fixes #286: More changes to mispclient
Browse files Browse the repository at this point in the history
  • Loading branch information
3c7 committed Jun 11, 2018
1 parent 08c59b6 commit e94f6f6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions analyzers/MISP/mispclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,10 @@ def __init__(self, url, key, ssl=True, name='Unnamed', proxies=None):
else:
raise TypeError('SSL parameter is a not expected type: {}'.format(type(ssl[idx])))
# Do the same checks again, for the non-list type
elif isinstance(ssl, str):
if os.path.isfile(ssl):
verify = ssl
elif isinstance(ssl, str) and os.path.isfile(ssl):
verify = ssl
elif isinstance(ssl, str) and not os.path.isfile(ssl):
raise CertificateNotFoundError('Certificate not found under {}.'.format(ssl))
elif isinstance(ssl, bool):
verify = ssl
else:
Expand All @@ -66,7 +67,7 @@ def __init__(self, url, key, ssl=True, name='Unnamed', proxies=None):
verify = True
if isinstance(ssl, str) and os.path.isfile(ssl):
verify = ssl
elif isinstance(ssl, str):
elif isinstance(ssl, str)and not os.path.isfile(ssl):
raise CertificateNotFoundError('Certificate not found under {}.'.format(ssl))
elif isinstance(ssl, bool):
verify = ssl
Expand Down

0 comments on commit e94f6f6

Please sign in to comment.