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

Curious whether MicroWebSrv supports https? #48

Closed
tshead2 opened this issue Jan 26, 2019 · 6 comments
Closed

Curious whether MicroWebSrv supports https? #48

tshead2 opened this issue Jan 26, 2019 · 6 comments

Comments

@tshead2
Copy link

tshead2 commented Jan 26, 2019

I’ve been wanting to handle web requests using https on a PyCom WiPy 3.0 for awhile now without success. Maybe this is asking too much of the hardware?

Thanks in advance,
Tim

@jczic
Copy link
Owner

jczic commented Jan 26, 2019

SSL/TLS (https) isn't implemented on MicroWebSrv, but it's simple with a pycom.
Just wrap socket with the goods parameters after socket creation :)

@tshead
Copy link

tshead commented Jan 28, 2019

@jczic - Thanks for the response! I thought that this would be easy too, but I've tried calling ssl.wrap_socket(...) after both bind() and accept(), and in both cases the client hangs while making a request. This was with my own minimalist http server, but I think I'll try hacking on MicroWebSrv instead. I'm curious if you have a working example?

Cheers,
Tim

@jczic
Copy link
Owner

jczic commented Jan 28, 2019

Hi,
I have an another http(s) server with that but it's dedicated to a special usage and uses I/O directly (TLS's handshake doesn't works with asynchrone mode in micropython/esp32...).
You can see that in : https://github.com/jczic/IoTSocket-Concentrator or directly in my sockets layer file in : https://github.com/jczic/xAsyncSockets.
But this code doesn't use normal/synchrone TLS mode.
Also, don't forget the argument to enable "server side" TLS usage on ssl.wrap_socket.
Good luck and have a nice day.

@tshead
Copy link

tshead commented Jan 29, 2019

Thanks for all the help, I’ll check it out!

Cheers,
Tim

@jczic jczic closed this as completed Feb 3, 2019
@jczic
Copy link
Owner

jczic commented Oct 20, 2019 via email

@tshead
Copy link

tshead commented Oct 20, 2019

Thanks for the followup on this … I will check the new version out!

Cheers,
Tim

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