Re: RFR: 8359388: Stricter checking for cipher transformations [v6]

2025-07-07 Thread Valerie Peng
> 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 transf

Re: RFR: 8359388: Stricter checking for cipher transformations [v6]

2025-07-07 Thread Sean Mullan
On Mon, 7 Jul 2025 21:08:55 GMT, Valerie Peng wrote: >> 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

Re: RFR: 8359388: Stricter checking for cipher transformations [v5]

2025-07-07 Thread Valerie Peng
On Wed, 2 Jul 2025 19:19:10 GMT, Sean Mullan wrote: >> Valerie Peng has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Updated to use List.of() per Sean's comment. > > test/jdk/javax/crypto/Cipher/TestEmptyModePadding.java line 27: > >> 25

Re: RFR: 8359388: Stricter checking for cipher transformations [v5]

2025-07-02 Thread Sean Mullan
On Wed, 2 Jul 2025 16:31:55 GMT, Valerie Peng wrote: >> 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

Re: RFR: 8359388: Stricter checking for cipher transformations [v5]

2025-07-02 Thread Valerie Peng
> 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 transf

Re: RFR: 8359388: Stricter checking for cipher transformations [v4]

2025-07-02 Thread Valerie Peng
On Tue, 1 Jul 2025 22:42:11 GMT, Sean Mullan wrote: >> Valerie Peng has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Updated test per 2nd round of Mikhail's review comments. > > src/java.base/share/classes/javax/crypto/Cipher.java line 47

Re: RFR: 8359388: Stricter checking for cipher transformations [v4]

2025-07-01 Thread Sean Mullan
On Wed, 18 Jun 2025 06:27:13 GMT, Valerie Peng wrote: >> 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

Re: RFR: 8359388: Stricter checking for cipher transformations [v2]

2025-06-18 Thread Valerie Peng
On Tue, 17 Jun 2025 10:21:42 GMT, Mikhail Yankelevich wrote: >> Valerie Peng has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Updated test per Mikhail's review comments. > > test/jdk/javax/crypto/Cipher/TestEmptyModePadding.java line 37:

Re: RFR: 8359388: Stricter checking for cipher transformations [v4]

2025-06-17 Thread Valerie Peng
> 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 transf

Re: RFR: 8359388: Stricter checking for cipher transformations [v2]

2025-06-17 Thread Valerie Peng
On Tue, 17 Jun 2025 10:21:40 GMT, Mikhail Yankelevich wrote: >> Valerie Peng has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Updated test per Mikhail's review comments. > > test/jdk/javax/crypto/Cipher/TestEmptyModePadding.java line 30:

Re: RFR: 8359388: Stricter checking for cipher transformations [v3]

2025-06-17 Thread Valerie Peng
> 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 transf

Re: RFR: 8359388: Stricter checking for cipher transformations [v2]

2025-06-17 Thread Mikhail Yankelevich
On Mon, 16 Jun 2025 21:32:16 GMT, Valerie Peng wrote: >> src/java.base/share/classes/javax/crypto/Cipher.java line 348: >> >>> 346: transformation.substring(0, endIdx).trim()); >>> 347: if (algo.isEmpty()) { >>> 348: throw new NoSuchAlgorithmException("Invalid

Re: RFR: 8359388: Stricter checking for cipher transformations [v2]

2025-06-17 Thread Mikhail Yankelevich
On Mon, 16 Jun 2025 22:20:10 GMT, Valerie Peng wrote: >> 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

Re: RFR: 8359388: Stricter checking for cipher transformations

2025-06-16 Thread Valerie Peng
On Mon, 16 Jun 2025 13:49:38 GMT, Mikhail Yankelevich wrote: >> 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 consi

Re: RFR: 8359388: Stricter checking for cipher transformations [v2]

2025-06-16 Thread Valerie Peng
> 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 transf

Re: RFR: 8359388: Stricter checking for cipher transformations

2025-06-16 Thread Mikhail Yankelevich
On Fri, 13 Jun 2025 17:32:12 GMT, Valerie Peng wrote: > 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 "un