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

Sean Mullan mullan at openjdk.org
Fri May 9 14:03:07 UTC 2025


On Thu, 8 May 2025 20:40:28 GMT, Anthony Scarpino <ascarpino at openjdk.org> wrote:

>> Hi all,
>> 
>> I need a code review of the PEM API.  Privacy-Enhanced Mail (PEM) is a format for encoding and decoding cryptographic keys and certificates.  It will be integrated into JDK24 as a Preview Feature.  Preview features does not permanently define the API and it is subject to change in future releases until it is finalized.
>> 
>> Details about this change can be seen at [PEM API JEP](https://bugs.openjdk.org/browse/JDK-8300911).
>> 
>> Thanks
>> 
>> Tony
>
> Anthony Scarpino has updated the pull request incrementally with three additional commits since the last revision:
> 
>  - comments
>  - toString update
>  - non-sealed
>    Better X509 KeyPair parsing

src/java.base/share/classes/java/security/PEMDecoder.java line 70:

> 68:  * the returned key object from a PEM containing a public and private key.
> 69:  * If only the private key is required, {@code PrivateKey.class} can be used.
> 70:  * {@class PEMRecord.class} is used for returning PEM text. If {@code tClass}

This causes a javadoc error, I think you meant `@code` instead of `@class`.

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

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


More information about the security-dev mailing list