Re: Gateway 2.0 web server issues
Posted by vysocan on
URL: http://ohs.356.s1.nabble.com/Gateway-2-0-web-server-issues-tp237p243.html
You are right, lwip smtp client does stuck the lwip (network) thread until remote server close the connection. I run lwip debug and got:
smtp_tcp_recv: connection closed by remote host
Mail (0) sent with results: 0x04, 0x0000, 0x00000000
smtp_dns_found: hostname resolved, connecting
smtp_connected: Waiting for 220
As I think about it, I feel it has wrong order?
Moving to TLS is definitely on my task list. But it is quite a complex task. First there is surprisingly no easy way to do it for embedded. In ChibiOS there is example how to build simple HTTPS static server by using WOLFSSL, and on the other hand lwip does support only MbedTLS. MbedTLS then what I see requires loads of memory.
I've managed with great effort to port the existing WolfSSL demo HTTPS to OHS, but the implementation of TLS is not great (both WolfSSL and MbedTLS), as it uses malloc/free a lot. Something you do not like to see on embedded platform.