mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8226338: Updates to Stateless Resumption
Reviewed-by: xuelei, jnimeh
This commit is contained in:
parent
e352e9327c
commit
200254b479
11 changed files with 677 additions and 113 deletions
|
@ -1264,6 +1264,11 @@ public final class SSLSocketImpl
|
|||
conContext.outputRecord.writeCipher.atKeyLimit()) {
|
||||
tryKeyUpdate();
|
||||
}
|
||||
// Check if NewSessionTicket PostHandshake message needs to be sent
|
||||
if (conContext.conSession.updateNST) {
|
||||
conContext.conSession.updateNST = false;
|
||||
tryNewSessionTicket();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1499,6 +1504,25 @@ public final class SSLSocketImpl
|
|||
}
|
||||
}
|
||||
|
||||
// Try to generate a PostHandshake NewSessionTicket message. This is
|
||||
// TLS 1.3 only.
|
||||
private void tryNewSessionTicket() throws IOException {
|
||||
// Don't bother to kickstart if handshaking is in progress, or if the
|
||||
// connection is not duplex-open.
|
||||
if (!conContext.sslConfig.isClientMode &&
|
||||
conContext.protocolVersion.useTLS13PlusSpec() &&
|
||||
conContext.handshakeContext == null &&
|
||||
!conContext.isOutboundClosed() &&
|
||||
!conContext.isInboundClosed() &&
|
||||
!conContext.isBroken) {
|
||||
if (SSLLogger.isOn && SSLLogger.isOn("ssl")) {
|
||||
SSLLogger.finest("trigger new session ticket");
|
||||
}
|
||||
NewSessionTicket.kickstartProducer.produce(
|
||||
new PostHandshakeContext(conContext));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the handshaker and socket streams.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue