Mbed TLS is now part of TrustedFirmware.org.

Socket Timeout


Nov 21, 2017 15:04
Dundic

Dear all,

I run tests with the help of another program against a local mbed TLS via a specific port (4433) but after a few automated executions I get the error:

Caused by: java.net.ConnectException: Operation timed out (Connection timed out) at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at java.net.Socket.connect(Socket.java:538) at java.net.Socket.<init>(Socket.java:434) at java.net.Socket.<init>(Socket.java:211) at de.rub.nds.tlsattacker.transport.SimpleTransportHandler.initialize(SimpleTransportHandler.java:64) at de.rub.nds.tlsattacker.tls.config.ClientConfigHandler.initializeTransportHandler(ClientConfigHandler.java:47) ... 1 more

What might be the problem here? I guess, that the timeout is on the side of the server? Because I do not get it when testing other programs (at least not that soon...). Thank you.

 
Nov 21, 2017 16:31
Ron Eldor

Hi Dundic,
From your description, I understand you have a Java TLS client application running over Mbed TLS.
Assuming your bio callback function porting is done correct, using the mbedtls_ssl_set_bio(), the connection timeout is probably the socket on the server side closed. You should check the status of the server.
I suggestyou have a server you control, and have access to logs. You could use the server sample application for this purpose.
Regards,
Mbed TLS Team member
Ron