On Thu, 22 Dec 2022 19:13:21 GMT, Xue-Lei Andrew Fan <xue...@openjdk.org> wrote:
>> Volker Simonis has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Moved stateless key logic from SSLContextImpl to SSLSessionContextImpl and >> addressed comments by @XueleiFan and @ascarpino > > src/java.base/share/classes/sun/security/ssl/SessionTicketExtension.java line > 163: > >> 161: SSLSessionContextImpl serverCache = >> 162: >> (SSLSessionContextImpl)hc.sslContext.engineGetServerSessionContext(); >> 163: return serverCache.getKey(); > > I think the `HandshakeContext hc` could be passed as a parameter for the > getKey() method, and thus you have a way to get the secure random for > StatelessKey(). > > return serverCache.getKey(hc); > -> SessionTicketExtension.StatelessKey getKey(HandshakeContext hc) { > -> ssk = new SessionTicketExtension.StatelessKey(hc, newID); > -> StatelessKey(HandshakeContext hc, int newNum) { > -> kg.init(KEYLEN, hc.sslContext.getSecureRandom()); Done. ------------- PR: https://git.openjdk.org/jdk/pull/11590