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

urllib3 complains with a SecurityWarning #39

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

urllib3 complains with a SecurityWarning #39

YarekTyshchenko opened this issue Dec 24, 2014 · 6 comments
Assignees
Labels
Milestone

Comments

@YarekTyshchenko
Copy link

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
Copy link
Member

@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 this to the 0.10.0 milestone Dec 24, 2014
@ivankravets ivankravets self-assigned this Dec 24, 2014
@YarekTyshchenko
Copy link
Author

@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
Copy link
Member

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
Copy link
Member

Can you upgrade development version of PlatformIO?

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

@YarekTyshchenko
Copy link
Author

@ivankravets legend! That fixes the problem

@ivankravets
Copy link
Member

Happy coding with PlatformIO 😄

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

No branches or pull requests

2 participants