Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8169086: DTLS tests fail intermittently with too much loops or timeout #1832

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/java.base/share/classes/sun/security/ssl/SSLEngineImpl.java
Original file line number Diff line number Diff line change
@@ -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);
2 changes: 0 additions & 2 deletions test/jdk/ProblemList.txt
Original file line number Diff line number Diff line change
@@ -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