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

SSL library #18

Closed
sniperini opened this issue Nov 29, 2019 · 3 comments
Closed

SSL library #18

sniperini opened this issue Nov 29, 2019 · 3 comments

Comments

@sniperini
Copy link

Hello,

I am trying to enable SSL on my ESP32 Micropython latest compiled FW, but unfortunately your following requirements for SSL python library are hard to comply:

The ssl library must be implements SSLContext on Python 
version to support secured web server

The ussl (https://github.com/micropython/micropython-lib/blob/master/ssl/ssl.py) library that Micropython uses doesn't have create_default_context method and SSLContext class and , only wrap_socket method from it.

Same goes for Pycom: https://docs.pycom.io/firmwareapi/micropython/ussl/

The only one I found that has everything, is CPython full implementation of SSL.
https://github.com/python/cpython/blob/master/Lib/ssl.py

But then again, micropython doesn't have all those dependencies to even load it, starting from importing Enum module... Basically it needs to be rewritten how it was done with USSL.

Could you please clarify which library are you using that has that SSLContext class and create_default_context method?

Is it possible to adopt MicroWebSrv2 to comply with Micropython implementation of SSL somehow?

Thanks!

@jczic
Copy link
Owner

jczic commented Nov 29, 2019

Hello @sniperini, and thank you for your interest 👍

About SSL, I know very well that SSLContext doesn't exists on MicroPython but the standard wrap_socket method and other implementations with a differed handshake do not works correctly in asynchronous mode and moreover, supported SSL versions are old.
For the moment, it is therefore intentionally that there is no support.

@MinaDarsh
Copy link

I was reading into this, still learning, and it throws a wrench in the plan I had. I want to run a little server on a Pycom Wipy 3.0, with secure log in.

Is there a way this could still be realized?

@jczic
Copy link
Owner

jczic commented Jan 22, 2020

Hi,
I'm sorry but on MicroPython for Pycom, SSL client support is ok but the server mode is restricted and causes problems with web browsers to properly negotiate the TLS layer...
I was also disappointed. :(

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