RFR: 8263404: RsaPrivateKeySpec is always recognized as RSAPrivateCrtKeySpec in RSAKeyFactory.engineGetKeySpec [v2]

Ziyi Luo luoziyi at openjdk.java.net
Mon Mar 15 23:05:08 UTC 2021


On Mon, 15 Mar 2021 21:37:59 GMT, SalusaSecondus <github.com+829871+SalusaSecondus at openjdk.org> wrote:

>> test/jdk/java/security/KeyFactory/KeyFactoryGetKeySpecForInvalidSpec.java line 80:
>> 
>>> 78:         // === Case 1: private key is RSAPrivateCrtKey, expected spec is RSAPrivateKeySpec
>>> 79:         // === Expected: return RSAPrivateCrtKeySpec
>>> 80:         // Since RSAPrivateCrtKeySpec inherits from RSAPrivateKeySpec, we'd expect this next line to return an instance of RSAPrivateKeySpec
>> 
>> Typo? I think you mean RSAPrivateCrtKeySpec?
>
> Yup. Thank you for the catch.

This is not a typo but I found the sentence very confusing. I'll update the comment.
What I meant: `keySpec` is RSAPrivateKeySpec

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

PR: https://git.openjdk.java.net/jdk/pull/2949



More information about the security-dev mailing list