Skip to content

Commit

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

Reviewed-by: xuelei, rhalade
  • Loading branch information
fguallini authored and rhalade committed Aug 30, 2021
1 parent 5aaa20f commit f18c0fa
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/jdk/sun/security/ssl/DHKeyExchange/LegacyDHEKeyExchange.java
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -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();
Expand All @@ -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();
Expand Down

3 comments on commit f18c0fa

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TheRealMDoerr
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jdk11u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on f18c0fa Sep 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TheRealMDoerr the backport was successfully created on the branch TheRealMDoerr-backport-f18c0fac in my personal fork of openjdk/jdk11u-dev. To create a pull request with this backport targeting openjdk/jdk11u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

this pull request contains a backport of commit f18c0fac from the openjdk/jdk repository.

The commit being backported was authored by Fernando Guallini on 30 Aug 2021 and was reviewed by Xue-Lei Andrew Fan and Rajan Halade.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk11u-dev:

$ git fetch https://github.com/openjdk-bots/jdk11u-dev TheRealMDoerr-backport-f18c0fac:TheRealMDoerr-backport-f18c0fac
$ git checkout TheRealMDoerr-backport-f18c0fac
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk11u-dev TheRealMDoerr-backport-f18c0fac

Please sign in to comment.