Integrated: 8246797: A convenient method to read OPTIONAL element

Weijun Wang weijun at openjdk.java.net
Mon Sep 13 18:10:20 UTC 2021


On Mon, 23 Aug 2021 14:52:46 GMT, Weijun Wang <weijun at openjdk.org> 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.

This pull request has now been integrated.

Changeset: fc0f8542
Author:    Weijun Wang <weijun at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/fc0f8542c387e7f25992cc7eaa2bb45aeace3c39
Stats:     307 lines in 6 files changed: 214 ins; 34 del; 59 mod

8246797: A convenient method to read OPTIONAL element

Reviewed-by: jnimeh, valeriep

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

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



More information about the security-dev mailing list