RFR: 8359388: Stricter checking for cipher transformations [v6]
Valerie Peng
valeriep at openjdk.org
Mon Jul 7 21:08:55 UTC 2025
> Based on the javadoc of `javax.crypto.Cipher` class, the cipher transformation should be either "algorithm/mode/padding" or
> "algorithm". When parsing the transformation, space(s) is trimmed off and empty strings are considered as "unspecified". This PR adds checks to ensure that transformations with empty "mode" and/or "padding" value in the "algorithm/mode/padding" form leads to `NoSuchAlgorithmException`. This reverts some changes made in [https://bugs.openjdk.org/browse/JDK-8358159](https://bugs.openjdk.org/browse/JDK-8358159) which allows empty mode and/or padding in the transformations.
>
>
> Thanks in advance for the review~
Valerie Peng has updated the pull request incrementally with one additional commit since the last revision:
Remove bug id 8358159 from the test.
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/25808/files
- new: https://git.openjdk.org/jdk/pull/25808/files/def1f55b..a02eef2f
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=25808&range=05
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=25808&range=04-05
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/25808.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/25808/head:pull/25808
PR: https://git.openjdk.org/jdk/pull/25808
More information about the security-dev
mailing list