Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

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"

Backport-of: d1252653b07ee3d0347b39b96f734e45772b5b36
  • Loading branch information
RealCLanger committed Oct 26, 2022
1 parent 16fbf7b commit 56da7e2
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 @@ -623,7 +623,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 56da7e2

@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.