RFR: 8288985: P11TlsKeyMaterialGenerator works with ChaCha20-Poly1305 [v2]

zzambers duke at openjdk.org
Thu Jun 23 21:38:52 UTC 2022


On Thu, 23 Jun 2022 16:47:18 GMT, Valerie Peng <valeriep at openjdk.org> wrote:

>> zzambers has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   TestKeyMaterialChaCha20.java: Added bug number
>
> src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11SecretKeyFactory.java line 104:
> 
>> 102:         if ("ChaCha20-Poly1305".equals(algorithm)) {
>> 103:             algorithm = "ChaCha20";
>> 104:         }
> 
> Have you considered adding "ChaCha20-Poly1305" into the "keyTypes" instead? Then you don't need to add the if-block here.

That would indeed be cleaner solution. I'll make this change. Thank you.

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

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



More information about the security-dev mailing list