Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8277970: Test jdk/sun/security/ssl/SSLSessionImpl/NoInvalidateSocketE…
…xception.java fails with "tag mismatch"

Reviewed-by: jnimeh, xuelei
  • Loading branch information
djelinski committed Oct 12, 2022
1 parent 0475c34 commit d125265
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Expand Up @@ -255,7 +255,11 @@ private Plaintext[] decodeInputRecord() throws IOException, BadPaddingException
// Decrypt the fragment
//
ByteBuffer fragment;
recordLock.lock();
try {
if (isClosed) {
return null;
}
Plaintext plaintext =
readCipher.decrypt(contentType, recordBody, null);
fragment = plaintext.fragment;
Expand All @@ -264,6 +268,8 @@ private Plaintext[] decodeInputRecord() throws IOException, BadPaddingException
throw bpe;
} catch (GeneralSecurityException gse) {
throw new SSLProtocolException("Unexpected exception", gse);
} finally {
recordLock.unlock();
}

if (contentType != ContentType.HANDSHAKE.id &&
Expand Down
1 change: 0 additions & 1 deletion test/jdk/ProblemList.txt
Expand Up @@ -616,7 +616,6 @@ com/sun/security/sasl/gsskerb/NoSecurityLayer.java 8039280 generic-
sun/security/provider/PolicyFile/GrantAllPermToExtWhenNoPolicy.java 8039280 generic-all
sun/security/provider/PolicyParser/ExtDirsChange.java 8039280 generic-all
sun/security/provider/PolicyParser/PrincipalExpansionError.java 8039280 generic-all
sun/security/ssl/SSLSessionImpl/NoInvalidateSocketException.java 8277970 linux-all,macosx-x64

############################################################################

Expand Down
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -30,7 +30,7 @@

/*
* @test
* @bug 8274736
* @bug 8274736 8277970
* @summary Concurrent read/close of SSLSockets causes SSLSessions to be
* invalidated unnecessarily
* @library /javax/net/ssl/templates
Expand Down

7 comments on commit d125265

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@RealCLanger
Copy link
Contributor

Choose a reason for hiding this comment

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

/backport jdk19u

@openjdk
Copy link

@openjdk openjdk bot commented on d125265 Oct 19, 2022

Choose a reason for hiding this comment

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

@RealCLanger the backport was successfully created on the branch RealCLanger-backport-d1252653 in my personal fork of openjdk/jdk19u. To create a pull request with this backport targeting openjdk/jdk19u: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 d1252653 from the openjdk/jdk repository.

The commit being backported was authored by Daniel Jeliński on 12 Oct 2022 and was reviewed by Jamil Nimeh and Xue-Lei Andrew Fan.

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/jdk19u:

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

@RealCLanger
Copy link
Contributor

Choose a reason for hiding this comment

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

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on d125265 Nov 3, 2022

Choose a reason for hiding this comment

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

@RealCLanger Could not automatically backport d1252653 to openjdk/jdk17u-dev due to conflicts in the following files:

  • src/java.base/share/classes/sun/security/ssl/SSLSocketInputRecord.java

Please fetch the appropriate branch/commit and manually resolve these conflicts by using the following commands in your personal fork of openjdk/jdk17u-dev. Note: these commands are just some suggestions and you can use other equivalent commands you know.

# Fetch the up-to-date version of the target branch
$ git fetch --no-tags https://git.openjdk.org/jdk17u-dev master:master

# Check out the target branch and create your own branch to backport
$ git checkout master
$ git checkout -b RealCLanger-backport-d1252653

# Fetch the commit you want to backport
$ git fetch --no-tags https://git.openjdk.org/jdk d1252653b07ee3d0347b39b96f734e45772b5b36

# Backport the commit
$ git cherry-pick --no-commit d1252653b07ee3d0347b39b96f734e45772b5b36
# Resolve conflicts now

# Commit the files you have modified
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport d1252653b07ee3d0347b39b96f734e45772b5b36'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk17u-dev with the title Backport d1252653b07ee3d0347b39b96f734e45772b5b36.

@RealCLanger
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 d125265 Nov 3, 2022

Choose a reason for hiding this comment

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

@RealCLanger Could not automatically backport d1252653 to openjdk/jdk11u-dev due to conflicts in the following files:

  • src/java.base/share/classes/sun/security/ssl/SSLSocketInputRecord.java

Please fetch the appropriate branch/commit and manually resolve these conflicts by using the following commands in your personal fork of openjdk/jdk11u-dev. Note: these commands are just some suggestions and you can use other equivalent commands you know.

# Fetch the up-to-date version of the target branch
$ git fetch --no-tags https://git.openjdk.org/jdk11u-dev master:master

# Check out the target branch and create your own branch to backport
$ git checkout master
$ git checkout -b RealCLanger-backport-d1252653

# Fetch the commit you want to backport
$ git fetch --no-tags https://git.openjdk.org/jdk d1252653b07ee3d0347b39b96f734e45772b5b36

# Backport the commit
$ git cherry-pick --no-commit d1252653b07ee3d0347b39b96f734e45772b5b36
# Resolve conflicts now

# Commit the files you have modified
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport d1252653b07ee3d0347b39b96f734e45772b5b36'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk11u-dev with the title Backport d1252653b07ee3d0347b39b96f734e45772b5b36.

Please sign in to comment.