On Thu, 8 May 2025 20:40:28 GMT, Anthony Scarpino <ascarp...@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 246: > 244: * > 245: * @param is InputStream containing PEM data. > 246: * @return an {@code DEREncodable} generated from the data read. s/an/a/ src/java.base/share/classes/java/security/PEMDecoder.java line 271: > 269: > 270: /** > 271: * Decodes and returns the specified class for the given PEM string. Suggest slight rewording: "Decodes and returns a {@code DEREncodable} of the specified class from the given PEM string." src/java.base/share/classes/java/security/PEMDecoder.java line 274: > 272: * {@code tClass} must extend {@link DEREncodable} and be an > appropriate > 273: * class for the PEM type. > 274: * Probably should say something about non-PEM data, ex: "For classes other than `PEMRecord`, non-PEM data before the PEM header is ignored." ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/17543#discussion_r2082403746 PR Review Comment: https://git.openjdk.org/jdk/pull/17543#discussion_r2082400586 PR Review Comment: https://git.openjdk.org/jdk/pull/17543#discussion_r2082403073