On Wed, 2 Sep 2026 17:33:18 GMT, Valerie Peng <[email protected]> wrote:

>> Andreas Chmielewski has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Review comments
>
> src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11TlsExtendedMasterSecretGenerator.java
>  line 84:
> 
>> 82: 
>> 83:         int tlsVersion = (spec.getMajorVersion() << 8) | 
>> spec.getMinorVersion();
>> 84:         if (tlsVersion != 0x0303) {
> 
> Hmm, the same-named impl from SunJCE provider supports older TlsVersion. Also 
> RFC7627 does not limit this to TLS 1.2 only. Since this is used by JSSE 
> implementations, maybe you should not put extra limitation here?

That's correct. RFC 7627 clearly defines EMS for TLS versions prior to TLS 1.2 
as well.

https://docs.oasis-open.org/pkcs11/pkcs11-spec/v3.2/pkcs11-spec-v3.2.html

However, this implementation is backed by PKCS#11 EMS derivation mechanisms 
(CKM_TLS12_EXTENDED_MASTER_KEY_DERIVE and 
CKM_TLS12_EXTENDED_MASTER_KEY_DERIVE_DH), which are specified as TLS 1.2 
mechanisms in PKCS#11 v3.2. Since no corresponding non-TLS-1.2 EMS derivation 
mechanisms are defined by PKCS#11, this provider implementation can only 
support TLS 1.2 EMS derivation. So we should not remove this limitation here.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/32081#discussion_r3922201226

Reply via email to