On Fri, 6 Feb 2026 16:17:44 GMT, Mikhail Yankelevich <[email protected]> 
wrote:

> Currently implementation of the test relies on changing the last byte of the 
> cypher to mess up the padding lines. However if the last bit is already 0 the 
> padding will not be taken into account and the result will have no error but 
> will be a garbage output. Current test doesn't take this into account. 
> 
> The fix should encode the test text without padding and decode with padding 
> to make sure that the bad padding exception is thrown.
> 
> Kudos to @djelinski for assisting with finding the issue vs RFC!
> 
> Also added a bug id which was missing

This pull request has now been integrated.

Changeset: 4ab05d25
Author:    Mikhail Yankelevich <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/4ab05d25c170036cd85155c45e58930fedf614a4
Stats:     19 lines in 1 file changed: 12 ins; 1 del; 6 mod

8377318: Force bad padding exception in TestPKCS5PaddingError.java at all times

Co-authored-by: Daniel JeliƄski <[email protected]>
Reviewed-by: valeriep

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

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

Reply via email to