RFR: 8277976: Break up SEQUENCE in X509Certificate::getSubjectAlternativeNames and X509Certificate::getIssuerAlternativeNames in otherName [v6]

Weijun Wang weijun at openjdk.java.net
Thu Feb 17 03:13:14 UTC 2022


On Wed, 16 Feb 2022 21:56:36 GMT, Sean Mullan <mullan at openjdk.org> wrote:

>> Weijun Wang has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   retell the formats
>
> src/java.base/share/classes/java/security/cert/X509Certificate.java line 595:
> 
>> 593:      * returned as byte arrays containing the ASN.1 DER encoded form of the
>> 594:      * name. There may be a third entry in the list for their {@code type-id}
>> 595:      * in string form, and a fourth entry for their {@code value} as either
> 
> I think "its" is more grammatically correct than "their".

The whole paragraph uses plural forms like "IPv4 address names are" and "OID names are", so I also use "otherNames are" and "their". I admit I don't feel comfortable too.

> src/java.base/share/classes/java/security/cert/X509Certificate.java line 597:
> 
>> 595:      * in string form, and a fourth entry for their {@code value} as either
>> 596:      * a string (if the value is a valid supported character string)
>> 597:      * or (otherwise) a byte array containing the ASN.1 DER encoded from of
> 
> I don't think you need "(otherwise)" - it is redundant since you already say "either ... or".

OK.

> src/java.base/share/classes/java/security/cert/X509Certificate.java line 597:
> 
>> 595:      * in string form, and a fourth entry for their {@code value} as either
>> 596:      * a string (if the value is a valid supported character string)
>> 597:      * or (otherwise) a byte array containing the ASN.1 DER encoded from of
> 
> typo: s/from/form/

Oops.

> src/java.base/share/classes/java/security/cert/X509Certificate.java line 612:
> 
>> 610:      *
>> 611:      * @implNote The JDK SUN provider supports the third and fourth
>> 612:      * otherName elements.
> 
> I would probably use "entries" instead of "elements" to be consistent with the previous wording.

Good.

> test/jdk/sun/security/x509/OtherName/Parse.java line 27:
> 
>> 25:  * @test
>> 26:  * @bug 8277976
>> 27:  * @summary Break up SEQUENCE in X509Certiticate::getSubjectAlternativeNames
> 
> Typo: s/X509Certiticate/X509Certificate/ 
> (also on line 28)

On no.

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

PR: https://git.openjdk.java.net/jdk/pull/7167



More information about the security-dev mailing list