JDK-8011867 : Accept unknown PKCS #9 attributes
  • Type: Bug
  • Component: security-libs
  • Sub-Component: java.security
  • Affected Version: 6,7,8
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2013-04-10
  • Updated: 2017-09-07
  • Resolved: 2013-04-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
6u171Fixed 7u40Fixed 8 b87Fixed
Related Reports
Relates :  
We hardcoded a list of known PKCS #9 attributes inside JDK so that getValue() method can always return the correct type for one (say, String for string, ObjectIdentifier for OID). However, this means when an unknown attribute is met, an exception is thrown. It's not easy to list all attributes inside there and sometimes it's not necessary to get the actual type of an attribute unless we really need to deal with it inside the JDK.
provided test:test/sun/security/pkcs/pkcs9/UnknownAttribute.java have passed from b86 - b95 at all platform at 1.8

This was discovered when trying to solve JDK-8009636. A TSA server sends back a PKCS #9 structure with two unknown attributes.