8240871: SSLEngine handshake status immediately after the handshake can be NOT_HANDSHAKING rather than FINISHED with TLSv1.3

Reviewed-by: ascarpino
This commit is contained in:
Xue-Lei Andrew Fan 2020-05-29 13:48:13 -07:00
parent 1d4bd253e4
commit 7514ad9ad0
8 changed files with 165 additions and 69 deletions

View file

@ -482,7 +482,8 @@ final class Finished {
shc.conContext.inputRecord.expectingFinishFlight();
} else {
// Set the session's context based on stateless/cache status
if (shc.handshakeSession.isStatelessable(shc)) {
if (shc.statelessResumption &&
shc.handshakeSession.isStatelessable()) {
shc.handshakeSession.setContext((SSLSessionContextImpl)
shc.sslContext.engineGetServerSessionContext());
} else {
@ -1140,12 +1141,7 @@ final class Finished {
//
// produce
if (SSLLogger.isOn && SSLLogger.isOn("ssl,handshake")) {
SSLLogger.fine(
"Sending new session ticket");
}
NewSessionTicket.kickstartProducer.produce(shc);
NewSessionTicket.t13PosthandshakeProducer.produce(shc);
}
}