RFR: 8296742: Illegal X509 Extension should not be created [v6]
Weijun Wang
weijun at openjdk.org
Tue Nov 22 16:37:40 UTC 2022
On Tue, 22 Nov 2022 16:22:44 GMT, Sean Mullan <mullan at openjdk.org> wrote:
>> Weijun Wang has updated the pull request incrementally with one additional commit since the last revision:
>>
>> add test
>>
>> only in patch2:
>> unchanged:
>
> src/java.base/share/classes/sun/security/x509/CRLReasonCodeExtension.java line 76:
>
>> 74: public CRLReasonCodeExtension(boolean critical, int reason)
>> 75: throws IOException {
>> 76: if (reason == 0) {
>
> Do you also want to reject reason codes < 0?
Yes, I will. Negative number is illegal for ASN.1 Enumerated Type, and the `toString` method of this class returns `UNSPECIFIED` which is equivalent to 0.
-------------
PR: https://git.openjdk.org/jdk/pull/11137
More information about the security-dev
mailing list