RFR: 8365883: Fix P11Cipher to throw BadPaddingException for PKCS11 CKR_ENCRYPTED_DATA_INVALID error [v3]

Valerie Peng valeriep at openjdk.org
Tue Feb 3 22:36:32 UTC 2026


On Tue, 3 Feb 2026 11:07:32 GMT, Mikhail Yankelevich <myankelevich at openjdk.org> wrote:

>> Actually, what do you think about throwing an exception here, something like 
>> 
>> 
>> throw new RuntimeException("Expected IBSE thrown");
>> 
>> 
>> it shouldn't happen, so failing the test should be valid IMO
>
> Changed now, what do you think?

Yes, this is also fine. But the message should be different, i.e. the opposite.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29503#discussion_r2761281247



More information about the security-dev mailing list