8210334: TLS 1.3 server fails if ClientHello doesn't have pre_shared_key and psk_key_exchange_modes
Reviewed-by: ascarpino, wetmore
--- a/src/java.base/share/classes/sun/security/ssl/PskKeyExchangeModesExtension.java Wed Sep 05 19:40:52 2018 -0700
+++ b/src/java.base/share/classes/sun/security/ssl/PskKeyExchangeModesExtension.java Wed Sep 05 21:01:39 2018 -0700
@@ -323,7 +323,7 @@
// 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");