I am developping a FTPS client in a Embedded system with LWIP and mbedTLS stacks.
For now, what I do is :
- Get an IP adress with DHCP
- Get IP address of the server with DNS
- Start a TCP connection to the server ( the control connection)
- Telling the FTP server that I want to work with the TLS protocol with the command AUTH TLS
- Handshake of the TLS protocol with the server
- Validate the x509 certificate that the server sends
- Telling the client that I want to work in passive mode and that i want to read a file with the command RETR.
Now, I need to open a data connection to read my file. So what I wanted to know is does the data connection is secured in the same way the control connection is ? That means do I have a certificate to validate ? Is the handshake the same ?
If this isn't clear let me know i'm not an expert at all in this area.
Thank you for your future responses