RFR: 8341346: Add support for exporting TLS Keying Material [v12]

Artur Barashev abarashev at openjdk.org
Thu May 15 17:33:56 UTC 2025


On Thu, 15 May 2025 01:59:50 GMT, Bradford Wetmore <wetmore at openjdk.org> wrote:

>> test/jdk/javax/net/ssl/ExtendedSSLSession/ExportKeyingMaterialTests.java line 62:
>> 
>>> 60:  * produced.
>>> 61:  */
>>> 62: public class ExportKeyingMaterialTests extends SSLContextTemplate {
>> 
>> What's the reason we don't use `SSLEngineTemplate` here?
>
> There's a bug in `SSLEngine`/`SSLSocket` that prevents configuration callbacks from working as originally imagined.  I hate working around it.
> 
> The subclass constructor now calls `super()`, which then calls back to the `configure*()` methods, but you can't pass any parameters.  One of these days this should be fixed.  
> 
> I find it easier to just copy `SSLEngineTemplate.java` instead of `extends`.  
> 
> I've worked around it to remind myself this needs to be fixed someday.

Yes, I had this problem myself. Actually it's specific to `SSLEngineTemplate` because `SSLSocketTemplate` constructor doesn't call any configure methods. `Flexible Constructor Bodies` feature should address this issue.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24976#discussion_r2091667466


More information about the net-dev mailing list