[jdk25u-dev] RFR: 8358159: Empty mode/padding in cipher transformations

Roland Mesde duke at openjdk.org
Tue Dec 16 20:37:40 UTC 2025


Backporting JDK-8358159: Empty mode/padding in cipher transformations.

Cipher transformation strings with empty mode or padding components (e.g., "AES/ /NoPadding") incorrectly throw 
NoSuchAlgorithmException instead of being processed normally. This commit fixes the issue by treating empty mode or padding strings as null values during transformation parsing.

For parity with Oracle JDK.

Ran related tests on linux-x64, linux-aarch64, macos-aarch64 and windows-x64:

(Passed) - make test TEST=test/jdk/javax/crypto

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

Commit messages:
 - Backport 3ff83ec49e561c44dd99508364b8ba068274b63a

Changes: https://git.openjdk.org/jdk25u-dev/pull/95/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk25u-dev&pr=95&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8358159
  Stats: 68 lines in 2 files changed: 62 ins; 0 del; 6 mod
  Patch: https://git.openjdk.org/jdk25u-dev/pull/95.diff
  Fetch: git fetch https://git.openjdk.org/jdk25u-dev.git pull/95/head:pull/95

PR: https://git.openjdk.org/jdk25u-dev/pull/95


More information about the jdk-updates-dev mailing list