JDK-6687725 : Internal PKCS5Padding impl should throw IllegalBlockSizeException and not BadPaddingException
  • Type: Bug
  • Component: security-libs
  • Sub-Component: javax.crypto:pkcs11
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2008-04-11
  • Updated: 2012-03-17
  • Resolved: 2011-03-07
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 7
7 b121Fixed
Description
The native PKCS11 mechanism which performs padding report error code equivalents to IllegalBlockSizeException when the padding bytes are missing. The internal PKCS5Padding impl used by SunPKCS11 provider should match this behavior so the same exception is thrown regardless whether users are using native PKCS11 mechs which supports padding or the combination of (native PKCS11 mechs which does NOT support padding + PKCS5Padding impl from SunPKCS11 provider).

Comments
EVALUATION will fix.
11-04-2008