RFR: 8298420: PEM API: Implementation (Preview) [v2]

Anthony Scarpino ascarpino at openjdk.org
Mon Jul 29 21:06:34 UTC 2024


On Thu, 25 Jul 2024 20:25:18 GMT, Weijun Wang <weijun at openjdk.org> wrote:

>> Anthony Scarpino has updated the pull request incrementally with two additional commits since the last revision:
>> 
>>  - bad test check
>>  - internal PEMRecord optimization
>
> src/java.base/share/classes/sun/security/util/KeyUtil.java line 468:
> 
>> 466:         value = is.getDerValue();
>> 467:         // This route is for:  RSAPublic, Encrypted RSAPrivate, EC Public,
>> 468:         // Encrypted EC Private,
> 
> This looks a little too smart. I see it's only used by PKCS#8 and X.509 keys. Can we instead add 2 static methods in those 2 classes?

I do not understand this comment.  Have two copies of this method in PKCS8EKS and X509EKS?  This sounds like duplicate code to me.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17543#discussion_r1695945777



More information about the security-dev mailing list