RFR: 8325162: Remove duplicate GCMParameters class [v2]
Valerie Peng
valeriep at openjdk.org
Wed Feb 14 19:00:53 UTC 2024
On Tue, 13 Feb 2024 20:58:17 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:
>> Currently we have 2 GCMParameters classes in java.base, one in sun.security.util package, the other in com.sun.crypto.provider.
>>
>> This PR merges the changes from the sun.security.util copy into com.sun.crypto.provider, and removes the sun.security.util class.
>>
>> As far as I could tell, the sun.security.util class was added to avoid exporting com.sun.crypto.provider to jdk.crypto.cryptoki. The export was introduced later in [JDK-8259319](https://bugs.openjdk.org/browse/JDK-8259319), so there's no reason to keep both copies.
>>
>> No new tests. Tier1-3 tests continue to pass.
>
> Daniel Jeliński has updated the pull request incrementally with one additional commit since the last revision:
>
> Remove the other GCMParameters
It's nice to consolidate and have only one impl for each algorithm. SunPKCS11 provider relies on other default JDK providers for algorithm parameters implementations. Having the spi impl under a specific provider's package implies the main ownership. Having the spi impl under sun.security.util implies that it's a shared utility class or library. Both has merits. I tend to go with majority since it minimizes the needed changes. As for GCMParameters, sun.security.util version contains newer changes, so we should keep that one (regardless of the package discussion).
-------------
PR Comment: https://git.openjdk.org/jdk/pull/17802#issuecomment-1944418118
More information about the security-dev
mailing list