We are working on secure email feature ( Non-OS SDK v1.5.2 ) for ESP8266 using STARTTLS approach.
As step 1,
To check SSL connection , We tried HTTPS client without any certificates and it works.
Now we tried below scenario
1. Do non-secure tcp connect - Works
2. Send EHLO <mail server> - Works
3. Send STARTTLS - Works
4. -----Now do TLS Negotiation without closing connection - ???
5. Send EHLO
6. ......Other smtp email commands ...
After #3, i.e we receive " S: 220 Ready to start TLS " response
How to do a TLS negotiation using Non-OS SDK without closing the non-secure connection ?
Below is the requirement , what we want to achieve using Espressif Non-OS SDK,
- start by creating a normal TCP socket and connect it to smtp.gmail.com:587
- send a "ehlo [127.0.0.1]\r\n" command
- get the answers from the server (Notice: so far everything is in clear)
- send a "STARTTLS\r\n" command
- get the answer (i.e. "220 Ready for TLS")
- at this moment, create your ssl wrapper (method, ctx, etc...) and use "SSL_set_fd" and "SSL_connect" to activate it
- send a new "ehlo [127.0.0.1]\r\n" command but using the SSL socket
From now on, use "SSL_write" and "SSL_read" with the SSL socket to send your authentication information and email.
Please let us know if you have any pointers here...
I am also trying to use the NON_OS SDK (rev 2.0) and have the exact same requirement. I need to support StartTLS authentication, which requires not closing the socket between creating the insecure connection and then adding a secure envelope on it and sending and receiving with SSL.
You said the RTOS version was a possibility. How do you turn an existing insecure connection into a secure one?
Also, are there plans to add this functionality to the non-RTOS SDK? I'm worried that the size and performance overhead of the RTOS SDK will be too great for my needs. What is your experience in comparing an application written using each SDK?
Who is online
Users browsing this forum: No registered users and 6 guests
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
We also have a RTOS version and a MESH version too!
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!