RFR: 8298420: PEM API: Implementation (Preview) [v18]
Anthony Scarpino
ascarpino at openjdk.org
Thu May 15 01:31:27 UTC 2025
On Tue, 13 May 2025 21:46:26 GMT, Sean Mullan <mullan at openjdk.org> wrote:
>> Anthony Scarpino has updated the pull request incrementally with one additional commit since the last revision:
>>
>> comments on the 11th
>
> src/java.base/share/classes/java/security/PEMRecord.java line 48:
>
>> 46: *
>> 47: * <p> During the instantiation of this record, there is no validation for the
>> 48: * {@code type} or {@code pem}.
>
> The ctors throw `IllegalArgumentException` though. I think you need to be more specific about what type of validation you mean here.
Much more detailed now
> src/java.base/share/classes/java/security/PEMRecord.java line 87:
>
>> 85: if (type == null && pem != null || type != null && pem == null) {
>> 86: throw new IllegalArgumentException("\"type\" and \"pem\" must be" +
>> 87: " both null or non-null");
>
> If type and pem can be both null, and leadingData is also null (which is allowed per spec) then that should not be an error?
>
> This check may need to be updated now that non-PEM data is an error.
code has been changed
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17543#discussion_r2089975958
PR Review Comment: https://git.openjdk.org/jdk/pull/17543#discussion_r2089976358
More information about the security-dev
mailing list