RFR: 8023980: JCE doesn't provide any class to handle RSA private key in PKCS#1 [v3]
Valerie Peng
valeriep at openjdk.java.net
Thu Jan 14 20:08:08 UTC 2021
On Wed, 13 Jan 2021 16:23:17 GMT, Weijun Wang <weijun at openjdk.org> wrote:
>> Valerie Peng has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Update copyright year from 2020 to 2021.
>
> src/java.base/share/classes/sun/security/rsa/RSAKeyFactory.java line 344:
>
>> 342: if (keySpec instanceof PKCS8EncodedKeySpec) {
>> 343: return RSAPrivateCrtKeyImpl.newKey(type, "PKCS#8",
>> 344: ((PKCS8EncodedKeySpec)keySpec).getEncoded());
>
> Will you clean up the `getEncoded()` output or shall I?
Maybe it's better that you do it this time? Just so that the backport won't miss it.
> src/java.base/share/classes/sun/security/rsa/RSAPrivateCrtKeyImpl.java line 101:
>
>> 99: return new RSAPrivateKeyImpl(key.type, key.keyParams,
>> 100: key.getModulus(), key.getPrivateExponent());
>> 101: } else return key;
>
> Create a one-line block for else inside "{" and "}".
Sure.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1787
More information about the security-dev
mailing list