Integrated: 8365883: Fix P11Cipher to throw BadPaddingException for PKCS11 CKR_ENCRYPTED_DATA_INVALID error

Mikhail Yankelevich myankelevich at openjdk.org
Thu Feb 5 10:11:47 UTC 2026


On Fri, 30 Jan 2026 10:57:23 GMT, Mikhail Yankelevich <myankelevich at openjdk.org> wrote:

> Underlying issue: if provider returns `PKCS11Exception: CKR_ENCRYPTED_DATA_INVALID` instead of BadPaddingException - `java.security.ProviderException: doFinal()` is thrown

This pull request has now been integrated.

Changeset: fde77a9b
Author:    Mikhail Yankelevich <myankelevich at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/fde77a9b55828128eae9652726638a14ce426e09
Stats:     36 lines in 2 files changed: 23 ins; 2 del; 11 mod

8365883: Fix P11Cipher to throw BadPaddingException for PKCS11 CKR_ENCRYPTED_DATA_INVALID error

Reviewed-by: valeriep

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

PR: https://git.openjdk.org/jdk/pull/29503



More information about the security-dev mailing list