RFR: 8375549: ConcurrentModificationException if jdk.crypto.disabledAlgorithms has multiple entries with known oid

Sean Mullan mullan at openjdk.org
Wed Jan 21 20:31:11 UTC 2026


On Tue, 20 Jan 2026 22:59:54 GMT, Valerie Peng <valeriep at openjdk.org> wrote:

> Inside the CryptoAlgorithmConstraints constructor, there is a loop looking up the known oid. Iterating over the "disabledServices" set and inserting the found oid(s) into it leads to ConcurrentModificationException when the set contains multiple entries. The proposed fix is to iterating over the array converted from the set which is also used for debugging output instead of the "disabledServices" set itself.
> 
> Thanks,
> Valerie

test/jdk/javax/crypto/Cipher/TestDisabledWithOids.java line 33:

> 31:  */
> 32: import java.security.NoSuchAlgorithmException;
> 33: import java.security.Security;

Don't think you need this import.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29335#discussion_r2714227917


More information about the security-dev mailing list