-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Is there any support for HTTPS (SSL) in esp8266? #2733
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
Comments
Hi Fortunately you could use the Olivier. |
@jmiguels when you say:
..are you saying you're running a HTTP server on your widget and you want to run it as HTTPS / over TLS to enable you to access it securely from a client over the internet? |
Thank you Olivier (olileger) and jjssoftware for your reactions to my post, Best regards |
ok cool that's clear thanks, please see open issue #1740 There is TLS support built into ESPAsyncTCP which would suggest that ESPAsyncWebServer also has TLS support since it's built on ESPAsyncTCP. I must say I've no experience of implementing either of these so I'm unable to comment on stability. @me-no-dev might have more info about how to get this going / if it's possible. Another option might be to stick with HTTP but offload TLS onto some other box / device external to your WEMOS device. This option does sort of swerve the problem completely but it does work and it's also stable. If this sounds like a viable option, take a look here: |
I do not recommend using TLS in a server. While I have it implemented and working in my async libs, it's turned off by default and requires a define switch in ESPAsyncTCP to turn TLS on. What I can tell you is that it's not at all possible to serve more than one client at a time because the ESP does not have enough memory and you will get into trouble quite fast. I have even artificially limited the clients that get handled by the server to one if TLS is on. |
@me-no-dev thanks for that, it sounds limited but great work nonetheless. Perhaps TLS offload to some other box/device is indeed the best option to solve this problem. It's what I do anyway ;) |
thanks for these clarification. +1 for offloading SSL from a public endpoint exposed by your network. You should also implement a little bit of routing (port forwarding, path-based routing...depending on your needs). Olivier. |
I personally do it with nginx :) If you need only one client to connect to remote SSL endpoint (that is not ESP8266), you can surely use TLS directly on the device, but still lots of memory will be eaten and you could easily trigger WDT or memory issue |
Thank you Joe Lippa for your article about nginx! |
You're welcome I hope it helps. As an aside but sort of related, I've seen wdt reset issues when attempting to use Everything TLS related seems to be right on the edge of being able to work reliably on the ESP8266. I hope we'll get there one day with the ESP32 :) |
Interestingly I've just run into issues with outbound secure calls. Looked like memory corruption in the heap and only appeared when the code started 'doing more' (I've got it running perfectly happily on a simple task) |
Closing due to off-topic (question instead of issue). |
@me-no-dev Thanks for you work. But I checked ESP32 implementation. I don't see SSL enabled even it is considered more powerful chip than ESP8266. Any reason why? Thanks! |
@me-no-dev any hints about that? I'm considering ESP32 for next project because it is more powerful, but if TLS support is same as ESP8266 then I'll stay with ESP8266. |
Since the time this issue was opened, some things have changed. ESP8266 Arduino includes BearSSL library, which is much more feature complete than axTLS. It is also more robust because it doesn't rely on heap memory allocations. If you don't have enough memory to handle the request, it will fail gracefully instead of panic-ing. Please check the included BearSLL based examples, client and server side. ESP32 Arduino uses mbedTLS library which is also very feature complete and regularly updated. |
@igrr thanks for quick update. |
Thanks Ivan! I will take a look at that library. |
read this : |
I have a domotic project and I want to access from the internet in a secure way. Currently I am using HTTP just for testing.
I have a gateway between internet and my RF24 home network buided using a WEMOS.
Is there any support for HTTPS (SSL) in esp8266?
Can anyone help me with the correct library to use?
Thanks in advance
jmiguels
The text was updated successfully, but these errors were encountered: