RFR: 8264864: Multiple byte tag not supported by ASN.1 encoding

Weijun Wang weijun at openjdk.java.net
Thu Apr 8 01:25:02 UTC 2021


This code change does not intend to support multiple byte tags. Instead, it aims to fail more gracefully when such a tag is encountered. For `DerValue` constructors from an encoding (type I), an `IOException` will be thrown since it's already in the throws clause. For constructors from tag and value (type II), an `IllegalArgumentException` will be thrown. All existing type II callers inside JDK use tag numbers smaller than 31.

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

Commit messages:
 - 8264864: Multiple byte tag not supported by ASN.1 encoding

Changes: https://git.openjdk.java.net/jdk/pull/3391/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=3391&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8264864
  Stats: 78 lines in 2 files changed: 77 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/3391.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/3391/head:pull/3391

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


More information about the security-dev mailing list