RFR: 8249783: Simplify DerValue and DerInputStream [v2]

Valerie Peng valeriep at openjdk.java.net
Tue Sep 29 03:29:47 UTC 2020


On Sat, 26 Sep 2020 00:21:10 GMT, Weijun Wang <weijun at openjdk.org> wrote:

>> src/java.base/share/classes/sun/security/util/DerValue.java line 584:
>> 
>>> 582:         }
>>> 583:         // TODO
>>> 584:         return new BigInteger(1, buffer, start, end - start).intValue();
>> 
>> More info for what to do? - // TODO
>> Enumerated is just integer, is there any spec/doc saying it's non-negative? All I can find is just integer.
>
> Maybe that's what I meant? The positive thing?
> 
> I'll refactor `getBigIntegerInternal()` so this method will call it.

Existing impl does not make it positive, so I am not sure why you changed it here.

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

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



More information about the security-dev mailing list