RFR: 8298381: Improve handling of session tickets for multiple SSLContexts [v3]

Volker Simonis simonis at openjdk.org
Thu Dec 22 13:41:56 UTC 2022


On Wed, 21 Dec 2022 20:23:25 GMT, Xue-Lei Andrew Fan <xuelei at openjdk.org> wrote:

>> Volker Simonis has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Optimized initialisation of currentKeyID and deletion of expired session keys as proposed by @schlosna
>
> src/java.base/share/classes/sun/security/ssl/SSLSessionContextImpl.java line 187:
> 
>> 185: 
>> 186:     // Package-private, used only from SSLContextImpl::getKey() to create a new session key.
>> 187:     int getCurrentKeyID() {
> 
> This method could be removed if you want to move SSLContextImpl.getKey() into this class.

Done.

> src/java.base/share/classes/sun/security/ssl/SSLSessionContextImpl.java line 191:
> 
>> 189:     }
>> 190: 
>> 191:     private void cleanupSessionKeys() {
> 
> What do you think if using CleanupStatelessKeys as the method name?

Fine for me.

> src/java.base/share/classes/sun/security/ssl/SSLSessionContextImpl.java line 226:
> 
>> 224:         return keyHashMap.get(id);
>> 225:     }
>> 226: 
> 
> It may need to reconsider these 3 methods you want to move SSLContextImpl.getKey() into this class.

Refactored as proposed.

-------------

PR: https://git.openjdk.org/jdk/pull/11590



More information about the security-dev mailing list