RFR: 8360564: Implement JEP 524: PEM Encodings of Cryptographic Objects (Second Preview) [v2]

Weijun Wang weijun at openjdk.org
Wed Sep 17 21:51:38 UTC 2025


On Mon, 15 Sep 2025 18:24:59 GMT, Anthony Scarpino <ascarpino at openjdk.org> wrote:

>> I see there could be a
>> 
>> parameters [0] ECDomainParameters {{ SECGCurveNames }} OPTIONAL,
>> 
>> Shall we skip it?
>
> This only checks if one is available in the private key material.  If there is none, null is fine.
> 
> The domain parameters are kept as part of private key SEC1v2 encoding and can be read when generating a private key with a KeyFactory.   Translating the encoding could be error-prone, and maybe incompatible.

Oh, I meant if both [0] and [1] are there you can skip [0] and read [1]. Currently you just check for [1].

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27147#discussion_r2356863706


More information about the security-dev mailing list