RFR: 8339356: Test javax/net/ssl/SSLSocket/Tls13PacketSize.java failed with java.net.SocketException: An established connection was aborted by the software in your host machine [v2]

Daniel Jeliński djelinski at openjdk.org
Fri Dec 13 11:07:36 UTC 2024


On Thu, 12 Dec 2024 16:57:13 GMT, Matthew Donovan <mdonovan at openjdk.org> wrote:

>> I was unable to reproduce the error but I suspect the error is caused by the server-side closing the socket as soon as the write operation is done. I added a read() call on the server to ensure the client initiates connection close
>
> Matthew Donovan has updated the pull request incrementally with one additional commit since the last revision:
> 
>   fixed read call on the server side.

test/jdk/javax/net/ssl/SSLSocket/Tls13PacketSize.java line 75:

> 73:         sslOS.write(appData);
> 74:         sslOS.flush();
> 75:         sslIS.read(appData, 1, appData.length-1);

Suggestion:

        int drained = 1;
        while (drained < appData.length) {
            drained += sslIS.read(appData, drained, appData.length - drained);
        }

this one actually works, I checked.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/22591#discussion_r1883766017


More information about the security-dev mailing list