On Thu, 7 May 2026 14:06:25 GMT, Weijun Wang <[email protected]> wrote:

>> Mikhail Yankelevich has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   minor doc change
>
> src/java.base/share/classes/sun/security/util/DerOutputStream.java line 491:
> 
>> 489:      * 1/1/1950 is the lowest date that RFC 2630 serializes to UTC time
>> 490:      */
>> 491:     private static final Instant utcLow = 
>> Instant.ofEpochMilli(-631152000000L); // Dates before 1/1/1950
> 
> `Instant.ofEpochSeconds` is simpler.

Changed in the next commit

> src/java.base/share/classes/sun/security/util/DerOutputStream.java line 541:
> 
>> 539:      * and with seconds (even if seconds=0) as per RFC 5280.
>> 540:      */
>> 541:     public DerOutputStream putGeneralizedInstant(Instant d) {
> 
> is it worth using a new method name? Maybe `putGeneralizedTime` is still OK?

Good point, fixed in the next commit

> src/java.base/share/classes/sun/security/x509/CertificateValidity.java line 
> 47:
> 
>> 45:      * YR_2050 date and time set to Jan01 00:00 2050 GMT
>> 46:      */
>> 47:     static final long YR_2050 = 2524608000000L;
> 
> Does it make sense to define YR_2050 as an `Instant`?

I believe eventually yes, but not before we transition `X509CRL...` to 
`Instant` since it's used there. There will be a cleanup after a transition is 
complete as a few methods will no longer be used

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

PR Review Comment: https://git.openjdk.org/jdk/pull/30047#discussion_r3202250648
PR Review Comment: https://git.openjdk.org/jdk/pull/30047#discussion_r3202247891
PR Review Comment: https://git.openjdk.org/jdk/pull/30047#discussion_r3202244930

Reply via email to