mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8277970: Test jdk/sun/security/ssl/SSLSessionImpl/NoInvalidateSocketException.java fails with "tag mismatch"
Reviewed-by: jnimeh, xuelei
This commit is contained in:
parent
0475c34120
commit
d1252653b0
3 changed files with 8 additions and 3 deletions
|
@ -255,7 +255,11 @@ final class SSLSocketInputRecord extends InputRecord implements SSLRecord {
|
|||
// Decrypt the fragment
|
||||
//
|
||||
ByteBuffer fragment;
|
||||
recordLock.lock();
|
||||
try {
|
||||
if (isClosed) {
|
||||
return null;
|
||||
}
|
||||
Plaintext plaintext =
|
||||
readCipher.decrypt(contentType, recordBody, null);
|
||||
fragment = plaintext.fragment;
|
||||
|
@ -264,6 +268,8 @@ final class SSLSocketInputRecord extends InputRecord implements SSLRecord {
|
|||
throw bpe;
|
||||
} catch (GeneralSecurityException gse) {
|
||||
throw new SSLProtocolException("Unexpected exception", gse);
|
||||
} finally {
|
||||
recordLock.unlock();
|
||||
}
|
||||
|
||||
if (contentType != ContentType.HANDSHAKE.id &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue