RFR: JDK-8308398 Move SunEC crypto provider into java.base
Weijun Wang
weijun at openjdk.org
Fri Jun 16 20:37:11 UTC 2023
On Tue, 13 Jun 2023 20:36:28 GMT, Anthony Scarpino <ascarpino at openjdk.org> wrote:
> Hi,
>
> I need a code review for moving the contents of the jdk.crypto.ec module into java.base. This moves the SunEC JCE Provider (Elliptic Curve) into java.base. EC has always been separate from the base module/pkg because of its dependence on a native library. That library was removed in JDK 16. An empty jdk.crypto.ec module will remain for compatibility, but marked as deprecated with the intent to be removed in a future release.
>
> There should be no compatibility risk for application using EC through JCE. There are no public API changes to EC, XEC, and EdDSA classes . Applications that unwisely accessing internal EC classes will need to use the java.base module.
>
> Thanks
>
> Tony
src/java.base/share/classes/sun/security/jca/ProviderConfig.java line 179:
> 177: }
> 178:
> 179: switch (provName) {
Looks like you can use a switch expression here, i.e. `p = switch ...`.
src/jdk.crypto.ec/share/classes/module-info.java line 36:
> 34: @Deprecated(since="22", forRemoval = true)
> 35: module jdk.crypto.ec {
> 36: //provides java.security.Provider with sun.security.ec.SunEC;
Just remove it.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14457#discussion_r1232745489
PR Review Comment: https://git.openjdk.org/jdk/pull/14457#discussion_r1232749460
More information about the core-libs-dev
mailing list