RFR: 8265372: Simplify PKCS9Attribute

Weijun Wang weijun at openjdk.org
Wed Jan 3 19:14:22 UTC 2024


On Wed, 3 Jan 2024 18:43:41 GMT, Ben Perez <duke at openjdk.org> wrote:

>> src/java.base/share/classes/sun/security/pkcs/PKCS9Attribute.java line 344:
>> 
>>> 342:         info = oidMap.get(oid);
>>> 343:         Class<?> clazz = (info == null) ? BYTE_ARRAY_CLASS : info.valueClass();
>>> 344:         if (clazz == null) {
>> 
>> If we assign a class to `SIGNING_CERTIFICATE_OID`, this will never be null.
>
> Would `sun.security.pkcs.SigningCertificateInfo` be appropriate here?

I think so. In fact, I am curious why this class name has already appeared in this file but the value class assigned is still now.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17132#discussion_r1440831641



More information about the security-dev mailing list