8210334: TLS 1.3 server fails if ClientHello doesn't have pre_shared_key and psk_key_exchange_modes

Reviewed-by: ascarpino, wetmore
This commit is contained in:
Xue-Lei Andrew Fan 2018-09-05 21:01:39 -07:00
parent d256eb923b
commit b7fdc4943f

View File

@ -323,7 +323,7 @@ final class PskKeyExchangeModesExtension {
// servers MUST abort the handshake.
SSLExtensionSpec spec =
shc.handshakeExtensions.get(SSLExtension.CH_PRE_SHARED_KEY);
if (spec == null) {
if (spec != null) {
shc.conContext.fatal(Alert.HANDSHAKE_FAILURE,
"pre_shared_key key extension is offered " +
"without a psk_key_exchange_modes extension");