Skip to content
Permalink
Browse files
8271560: sun/security/ssl/DHKeyExchange/LegacyDHEKeyExchange.java sti…
…ll fails due to "An established connection was aborted by the software in your host machine"

Backport-of: f18c0fac11aac833edfdc484e221518c55daa9a7
  • Loading branch information
thejasviv authored and Sibabrata Sahoo committed Sep 9, 2021
1 parent 271403b commit ea6e678c957c9a96743b64a29d7e2b5f0c9cb938
Showing with 10 additions and 0 deletions.
  1. +10 −0 test/jdk/sun/security/ssl/DHKeyExchange/LegacyDHEKeyExchange.java
@@ -32,8 +32,10 @@
* @run main/othervm -Djdk.tls.ephemeralDHKeySize=legacy LegacyDHEKeyExchange
*/

import javax.net.ssl.SSLException;
import javax.net.ssl.SSLHandshakeException;
import javax.net.ssl.SSLSocket;
import java.net.SocketException;
import java.util.concurrent.CountDownLatch;

public class LegacyDHEKeyExchange extends SSLSocketTemplate{
@@ -53,6 +55,10 @@ protected void runServerApplication(SSLSocket socket) throws Exception {
throw she;
}
System.out.println("Expected exception thrown in server");
} catch (SSLException | SocketException se) {
// The client side may have closed the socket.
System.out.println("Server exception:");
se.printStackTrace(System.out);
} finally {
connDoneLatch.countDown();
connDoneLatch.await();
@@ -75,6 +81,10 @@ protected void runClientApplication(SSLSocket socket) throws Exception {
throw she;
}
System.out.println("Expected exception thrown in client");
} catch (SSLException | SocketException se) {
// The server side may have closed the socket.
System.out.println("Client exception:");
se.printStackTrace(System.out);
} finally {
connDoneLatch.countDown();
connDoneLatch.await();

1 comment on commit ea6e678

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on ea6e678 Sep 9, 2021

Please sign in to comment.