JDK-8340337 : Release Note: Legacy Mechanism Check in SunPKCS11 Provider Is Enhanced with Service Type
  • Type: Sub-task
  • Component: security-libs
  • Sub-Component: javax.crypto:pkcs11
  • Affected Version:
    8u451,11.0.27-oracle,17.0.15-oracle,21.0.7-oracle,23 8u451,11.0.27-oracle,17.0.15-oracle,21.0.7-oracle,23
  • Priority: P4
  • Status: Resolved
  • Resolution: Delivered
  • Submitted: 2024-09-17
  • Updated: 2025-03-03
  • 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 11 JDK 17 JDK 21 JDK 23 JDK 8
11.0.27-oracleResolved 17.0.15-oracleResolved 21.0.7-oracleResolved 23Resolved 8u451Resolved
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. The default value is false. Note that it is the caller's responsibility to make sure the legacy mechanism is not used for the unsupported functionality.