Integrated: 8265372: Simplify PKCS9Attribute
Ben Perez
duke at openjdk.org
Fri Feb 16 14:54:00 UTC 2024
On Fri, 15 Dec 2023 20:34:21 GMT, Ben Perez <duke at openjdk.org> wrote:
> Refactored PKCS9Attribute to use a hash map instead of multiple arrays. The key for the hash map is an `ObjectIdentifier` and the values are a record `AttributeInfo` that stores the information previously contained in the arrays `PKCS9_VALUE_TAGS`, `VALUE_CLASSES`, and `SINGLE_VALUED`.
>
> It seems as though we should be able to get rid of constants such as `EMAIL_ADDRESS_OID` since they aren't heavily used with the hash map approach, but since the values are public it might cause compatibility issues.
>
> Another question is how to handle `RSA DSI`, `S/MIME`, `Extended-certificate`, and `Issuer Serial Number` OIDs. The prior version threw an error but in this refactor they are treated as an "unknown OID" and only throw a debug warning. This was addressed in https://bugs.openjdk.org/browse/JDK-8011867 but prior to this refactor the aforementioned OIDs were treated differently than unknown OIDs.
This pull request has now been integrated.
Changeset: 244573e7
Author: Ben Perez <ben.perez at oracle.com>
Committer: Weijun Wang <weijun at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/244573e719ddb387cb1739d3cab26b72df1e1f0a
Stats: 758 lines in 4 files changed: 226 ins; 418 del; 114 mod
8265372: Simplify PKCS9Attribute
Reviewed-by: weijun
-------------
PR: https://git.openjdk.org/jdk/pull/17132
More information about the security-dev
mailing list