how to close a TCP TLS socket

accacca
Posts: 34
Joined: Mon Aug 06, 2018 4:59 pm

how to close a TCP TLS socket

Postby accacca » Sun Mar 31, 2024 4:39 pm

I want to implement an FTPS server For testing it I use filezilla.
The FTP version of the server works now I was adding TLS handshaking.
When I open a session, the client asks me for the list of files in the root folder butwhen data socket but when closing data socket I get this error message

Code: Select all

Risposta:	226 Closing data connection - Transfer complete
Errore:	Errore GnuTLS -110 in gnutls_record_recv: The TLS connection was non-properly terminated.
Stato:	Il server non ha correttamente chiuso la connessione TLS (The server did not properly close the TLS connection)
I was initially closing the socket only with

Code: Select all

esp_tls_server_session_delete
Then I added this call to send the close message

Code: Select all

mbedtls_ssl_close_notify
So it works but is this the correct solution ? should I explicitly call the function that sends the close_notify message ?

Who is online

Users browsing this forum: No registered users and 87 guests