JDK-8340337 : Release Note: the legacy mechanism check in SunPKCS11 provider is enhanced with service type
  • Type: Sub-task
  • Component: security-libs
  • Sub-Component: javax.crypto:pkcs11
  • Affected Version: 23
  • Priority: P4
  • Status: Resolved
  • Resolution: Delivered
  • Submitted: 2024-09-17
  • Updated: 2024-09-19
  • Resolved: 2024-09-17
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.
JDK 23
23Resolved
Description
Native PKCS11 mechanisms which support decryption but not encryption or signature verification but not signing are considered legacy and are disabled by default. The legacy mechanism check in SunPKCS11 provider is enhanced with the service type. For example, prior to this fix, a mechanism supporting encryption, decryption, and verification but not signing, is considered legacy and can't be used at all. After this fix, the corresponding Cipher service using this mechanism is available since both encryption and decryption are supported. However, the corresponding Signature service is not since only verification is supported. To bypass the legacy mechanism check, set the PKCS11 provider configuration attribute "allowLegacy" to true (default value: false). Note that it is the caller's responsibility to make sure the legacy mechanism is not used for the unsupported functionality, e.g. use this mechanism to sign.