Remove unnecessary checks when TLS 1.3
@@ -380,8 +380,17 @@ public void processServerExtensions(Hashtable serverExtensions)
return;
}
- // TODO[tls13] Adapt for when TLS 1.3 is negotiated
+ SecurityParameters securityParameters = context.getSecurityParametersHandshake();
+ boolean isTLSv13 = TlsUtils.isTLSv13(securityParameters.getNegotiatedVersion());
+ if (isTLSv13)
+ {
+ /*
+ * NOTE: From TLS 1.3 the protocol classes are strict about what extensions can appear.
+ */
+ }
+ else
+ {
/*
* RFC 5246 7.4.1.4.1. Servers MUST NOT send this extension.
*/
@@ -407,6 +416,7 @@ public void processServerExtensions(Hashtable serverExtensions)
*/
checkForUnexpectedServerExtension(serverExtensions, TlsExtensionsUtils.EXT_padding);
}
+ }
public void processServerSupplementalData(Vector serverSupplementalData)
throws IOException
