Skip to content

Commit

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

Backport-of: d1252653b07ee3d0347b39b96f734e45772b5b36
  • Loading branch information
RealCLanger committed Nov 7, 2022
1 parent 21c52e3 commit 18c4c25
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 @@ -265,6 +269,8 @@ private Plaintext[] decodeInputRecord() throws IOException, BadPaddingException
} catch (GeneralSecurityException gse) {
throw (SSLProtocolException)(new SSLProtocolException(
"Unexpected exception")).initCause(gse);
} finally {
recordLock.unlock();
}

if (contentType != ContentType.HANDSHAKE.id &&
Expand Down
1 change: 0 additions & 1 deletion test/jdk/ProblemList.txt
Expand Up @@ -672,7 +672,6 @@ javax/security/auth/kerberos/KerberosTixDateTest.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

1 comment on commit 18c4c25

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

Please sign in to comment.