On Tue, 24 Aug 2021 14:24:00 GMT, Weijun Wang <[email protected]> wrote:
>> This code change adds new methods to `DerInputStream` to easily and safely >> read optional fields in a ASN.1 DER-encoded value. It also adds several >> wrapping methods to `DerValue` to avoid unnecessary memory copying when >> calling by an internal method. >> >> The new methods are applied to `OAEPParameters` to show out how they work. A >> new regression test is added to show that not only the new methods are >> simper but they are safer and more correct. > > Weijun Wang has updated the pull request incrementally with one additional > commit since the last revision: > > best practice for reading DEFAULT, switch expression, etc src/java.base/share/classes/sun/security/util/DerValue.java line 306: > 304: > 305: /** > 306: * Wraps a byte array at a single DerValue. nit: at=>as src/java.base/share/classes/sun/security/util/DerValue.java line 319: > 317: > 318: /** > 319: * Wraps a byte array at a single DerValue. nit: at=>as ------------- PR: https://git.openjdk.java.net/jdk/pull/5221
