Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove SSL warnings when not veryfing certs #43

Open
maaaaz opened this issue Feb 11, 2018 · 2 comments
Open

Remove SSL warnings when not veryfing certs #43

maaaaz opened this issue Feb 11, 2018 · 2 comments

Comments

@maaaaz
Copy link

maaaaz commented Feb 11, 2018

Hello @taraslayshchuk,

By default, certs are not verified and a lot of warnings are displayed and spam the console.

Could you just print at the beginning of the execution a simple warning like "[!] certs are not verified, use --verify-certs instead" and disable original warnings with the directive like urllib3.disable_warnings()

Cheers !

@nwhobart
Copy link

@maaaaz I had a similar problem and sudo pip install certifi.

@ikonst
Copy link

ikonst commented Aug 15, 2018

Since the library is using urllib3, the main workaround is to use pyopenssl when available.

To do this, add this to the beginning of the code:

try:
  import urllib3.contrib.pyopenssl
  urllib3.contrib.pyopenssl.inject_into_urllib3()
except ImportError:
  pass

This will allow interested parties to pip install urllib3[secure] in addition to es2csv and ensure they can validate certificates.

See https://urllib3.readthedocs.io/en/latest/user-guide.html#certificate-verification-in-python-2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants