Skip to content
Permalink
Browse files
8169086: DTLS tests fail intermittently with too much loops or timeout
Reviewed-by: ascarpino
  • Loading branch information
XueleiFan committed Dec 18, 2020
1 parent 71ae05d commit 3c488199c4f7d3fcf806411d4ae3c9088dc18d6e
Showing with 8 additions and 10 deletions.
  1. +8 −8 src/java.base/share/classes/sun/security/ssl/SSLEngineImpl.java
  2. +0 −2 test/jdk/ProblemList.txt
@@ -300,7 +300,7 @@ private Ciphertext encode(
ByteBuffer[] srcs, int srcsOffset, int srcsLength,
ByteBuffer[] dsts, int dstsOffset, int dstsLength) throws IOException {

Ciphertext ciphertext = null;
Ciphertext ciphertext;
try {
ciphertext = conContext.outputRecord.encode(
srcs, srcsOffset, srcsLength, dsts, dstsOffset, dstsLength);
@@ -570,7 +570,7 @@ private SSLEngineResult readRecord(
}

if (hsStatus == SSLEngineResult.HandshakeStatus.NEED_UNWRAP_AGAIN) {
Plaintext plainText = null;
Plaintext plainText;
try {
plainText = decode(null, 0, 0,
dsts, dstsOffset, dstsLength);
@@ -607,7 +607,7 @@ private SSLEngineResult readRecord(
* Check the packet to make sure enough is here.
* This will also indirectly check for 0 len packets.
*/
int packetLen = 0;
int packetLen;
try {
packetLen = conContext.inputRecord.bytesInCompletePacket(
srcs, srcsOffset, srcsLength);
@@ -619,16 +619,16 @@ private SSLEngineResult readRecord(
}

// invalid, discard the entire data [section 4.1.2.7, RFC 6347]
int deltaNet = 0;
// int deltaNet = netData.remaining();
// netData.position(netData.limit());
for (int i = srcsOffset; i < srcsOffset + srcsLength; i++) {
srcs[i].position(srcs[i].limit());
}

Status status = (isInboundDone() ? Status.CLOSED : Status.OK);
if (hsStatus == null) {
hsStatus = getHandshakeStatus();
}

return new SSLEngineResult(status, hsStatus, deltaNet, 0, -1L);
return new SSLEngineResult(status, hsStatus, srcsRemains, 0, -1L);
} else {
throw ssle;
}
@@ -686,7 +686,7 @@ private SSLEngineResult readRecord(
/*
* We're now ready to actually do the read.
*/
Plaintext plainText = null;
Plaintext plainText;
try {
plainText = decode(srcs, srcsOffset, srcsLength,
dsts, dstsOffset, dstsLength);
@@ -667,8 +667,6 @@ sun/security/tools/keytool/ListKeychainStore.sh 8156889 macosx-a
sun/security/tools/jarsigner/warnings/BadKeyUsageTest.java 8026393 generic-all

javax/net/ssl/ServerName/SSLEngineExplorerMatchedSNI.java 8212096 generic-all
javax/net/ssl/DTLS/PacketLossRetransmission.java 8169086 macosx-x64
javax/net/ssl/DTLS/RespondToRetransmit.java 8169086 macosx-x64
javax/net/ssl/DTLS/CipherSuite.java 8202059 macosx-x64

sun/security/provider/KeyStore/DKSTest.sh 8180266 windows-all

1 comment on commit 3c48819

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 3c48819 Dec 18, 2020

Please sign in to comment.