8277307: Pre shared key sent under both session_ticket and pre_shared_key extensions

Reviewed-by: coffeys, ascarpino
This commit is contained in:
Daniel Jeliński 2022-06-08 06:33:40 +00:00
parent 7df48f97d2
commit 4662e06bff
2 changed files with 19 additions and 7 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -403,11 +403,13 @@ final class SessionTicketExtension {
chc.statelessResumption = true;
// If resumption is not in progress, return an empty value
if (!chc.isResumption || chc.resumingSession == null) {
if (!chc.isResumption || chc.resumingSession == null
|| chc.resumingSession.getPskIdentity() == null
|| chc.resumingSession.getProtocolVersion().useTLS13PlusSpec()) {
if (SSLLogger.isOn && SSLLogger.isOn("ssl,handshake")) {
SSLLogger.fine("Stateless resumption supported");
}
return new SessionTicketSpec().getEncoded();
return new byte[0];
}
if (chc.localSupportedSignAlgs == null) {