On Thu, 13 Feb 2025 18:43:01 GMT, Daniel Jeliński <djelin...@openjdk.org> wrote:
>> Ah ok. So I assume TLS 1.3 is using a different code path or KDF. > > TLS 1.3 uses HKDF, and doesn't work with SunPKCS11 yet, see > [JDK-8278640](https://bugs.openjdk.org/browse/JDK-8278640) I'd like to clarify the usage of `SunTlsKeyMaterial` and `SunTls12KeyMaterial` KGs first. Is `SunTlsKeyMaterial` KG expected to handle specs indicating TLS1.2 version? Is `SunTls12KeyMaterial` KeyGenerator expected to handle specs indicating SSL3.0 version? Looking at SunJCE provider's impls, `SunTlsKeyMaterial` and `SunTls12KeyMaterial` KGs are considered equivalent, e.g. one being the alias of the other. SunPKCS11 provider defines them separately mapping to different native mechs, however sharing the same impl class. Looking at the current code, it seems that `SunTls12KeyMaterial` will always set `supportSSLv3` to false which should reject specs indicating SSL3.0 version. There seems to be an inconsistency between SunJCE provider and SunPKCS11 provider? In addition, we should check that the particular mechanism is supported? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/23583#discussion_r1962442625