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

urllib3 complains with a SecurityWarning #39

Closed
YarekTyshchenko opened this Issue Dec 24, 2014 · 6 comments

Comments

Projects
None yet
2 participants
@YarekTyshchenko

YarekTyshchenko commented Dec 24, 2014

Having a problem with urllib3 and SSL it seems. This is just following the quickstart, empty project, adding arduino micro into platforms and doing run.

$ platformio run
Processing arduino_micro environment:
The platform 'atmelavr' has not been installed yet. Would you like to install it now? [y/N]: y
Installing toolchain-atmelavr package:
/Library/Python/2.7/site-packages/requests/packages/urllib3/connection.py:251: SecurityWarning: Certificate has no `subjectAltName`, falling back to check for a `commonName` for now. This feature is being removed by major browsers and deprecated by RFC 2818. (See https://github.com/shazow/urllib3/issues/497 for details.)
  SecurityWarning
Error: [API] Could not connect to PlatformIO Registry Service

I'm on OSX 10.8.5, Python 2.7.2. Reinstalled urllib3 with latest version from pip.

@ivankravets

This comment has been minimized.

Member

ivankravets commented Dec 24, 2014

@yarekt Thanks a lot for your report! 👍

This problem is linked with your version of Python. See here: urllib3/urllib3#497

Note that false SSL certificate warnings may be seen if using Python 2.7.2 or older.

This is because in older Python versions the _ssl module does not return 'subjectAltName' in the set of fields in the SSL certificate. That the field isn't returned even if present means that even if the SSL certificate is valid, the check will fail and the warning logged.

I've just disabled this urllib3's warning directly from PlatformIO. Try development version of PlatformIO, because this fix will be released under the next release:

$ pip uninstall platformio
$ pip install https://github.com/ivankravets/platformio/archive/develop.zip

P.S: Please don't forget to upgrade to the new release when it will be available. You can be informed about it via Twitter - follow PlatformIOTool.

@ivankravets ivankravets added the bug label Dec 24, 2014

@ivankravets ivankravets added this to the 0.10.0 milestone Dec 24, 2014

@ivankravets ivankravets self-assigned this Dec 24, 2014

@YarekTyshchenko

This comment has been minimized.

YarekTyshchenko commented Dec 24, 2014

@ivankravets Thanks for looking into this so quickly!

I've tried out the change, it does get rid of the SSL warning, but the error about the API is still there:

MacBook-Pro:Tubeclock yarek$ platformio run

If you like PlatformIO, please:
- follow us on Twitter to stay up-to-date on the latest project news > https://twitter.com/platformiotool
- give us a star on GitHub > https://github.com/ivankravets/platformio
Thanks a lot!

Please wait while upgrading PlatformIO ...
PlatformIO has been successfully upgraded to 0.10.0-dev!


Processing arduino_micro environment:
The platform 'atmelavr' has not been installed yet. Would you like to install it now? [y/N]: y
Installing toolchain-atmelavr package:
Error: [API] Could not connect to PlatformIO Registry Service

What does the error mean?

Error: [API] Could not connect to PlatformIO Registry Service

Could this be something related to my python installation? Is there any way to find out what URL is it trying?

@ivankravets ivankravets reopened this Dec 24, 2014

@ivankravets

This comment has been minimized.

Member

ivankravets commented Dec 24, 2014

Could this be something related to my python installation? Is there any way to find out what URL is it trying?

I've just installed Python 2.7.2 in the virtualenv and I reproduced this bug. Give me a few minutes... Sorry.

@ivankravets

This comment has been minimized.

Member

ivankravets commented Dec 24, 2014

Can you upgrade development version of PlatformIO?

$ pip install https://github.com/ivankravets/platformio/archive/develop.zip
@YarekTyshchenko

This comment has been minimized.

YarekTyshchenko commented Dec 24, 2014

@ivankravets legend! That fixes the problem

@ivankravets

This comment has been minimized.

Member

ivankravets commented Dec 24, 2014

Happy coding with PlatformIO 😄

ivankravets added a commit that referenced this issue Jan 1, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment