Check version before exporting session parameters
@@ -866,11 +866,17 @@ protected boolean isResumable(ProvSSLSession provSSLSession, TlsSession tlsSessi
{
SecurityParameters securityParameters = context.getSecurityParametersHandshake();
+ ProtocolVersion negotiatedVersion = securityParameters.getNegotiatedVersion();
+ if (TlsUtils.isTLSv13(negotiatedVersion))
+ {
+ return false;
+ }
+
// TODO[resumption] Avoid the copy somehow?
SessionParameters sessionParameters = tlsSession.exportSessionParameters();
if (null == sessionParameters ||
- !securityParameters.getNegotiatedVersion().equals(sessionParameters.getNegotiatedVersion()) ||
+ !negotiatedVersion.equals(sessionParameters.getNegotiatedVersion()) ||
!Arrays.contains(getCipherSuites(), sessionParameters.getCipherSuite()) ||
!Arrays.contains(offeredCipherSuites, sessionParameters.getCipherSuite()))
{
@@ -882,12 +888,6 @@ protected boolean isResumable(ProvSSLSession provSSLSession, TlsSession tlsSessi
{
return false;
}
-
- // TODO[tls13] Resumption/PSK
- if (TlsUtils.isTLSv13(sessionParameters.getNegotiatedVersion()))
- {
- return false;
- }
}
{
