RFR: 8345221: Replace legacy with new Provider APIs in SunNativeGSS

Weijun Wang weijun at openjdk.org
Mon Dec 2 21:21:39 UTC 2024


On Fri, 29 Nov 2024 14:50:47 GMT, Francisco Ferrari Bihurriet <fferrari at openjdk.org> wrote:

> Hi, this pull request modifies the _SunNativeGSS_ security provider to stop using the legacy Provider APIs (`Provider::putAll`) and start using the new ones (`Provider::putService`). Additionally, it removes `sun.security.action.PutAllAction`, no longer used since #22256.
> 
> Changes in this pull request have been removed from #15539, as they aren't a dependency for that work, but just an opportunistic enhancement we made there. As a consequence, this pull request is the reverse of 29e9cba970fdbbd2192c8d2de1e93a03b1b0d1e1, the removal of this work from #15539.
> 
> #### Testing
> 
> As part of our testing, we observed all the tests pass in the following categories:
> 
> * `jdk:tier1` (see [GitHub Actions run](https://github.com/franferrax/jdk/actions/runs/12073939529))
> * `jdk/java/security`
> 
> Additionally, we found no regressions with respect to the baseline (959fa4a1a35a1bb650ec5888efaf3d0fc8cfb025) in the following category:
> 
> * `jdk/sun/security`
>     * We obtained the same results in both codebases (the two `<reportDir>/text/summary.txt` files are identical).
>       | Results                 |     |
>       |-------------------------|----:|
>       | Tests that passed       | 797 |
>       | Tests that failed       |  16 |
>       | Tests that had errors   |   2 |
>       | Tests that were not run |  35 |
>       | Total                   | 850 |
>     * In particular, the tests that enable the _SunNativeGSS_ security provider, all passed:
>         * [jdk/sun/security/jgss/GssContextCleanup.java](https://github.com/openjdk/jdk/blob/959fa4a1a35a1bb650ec5888efaf3d0fc8cfb025/test/jdk/sun/security/jgss/GssContextCleanup.java#L48)
>         * [jdk/sun/security/jgss/GssNameCleanup.java](https://github.com/openjdk/jdk/blob/959fa4a1a35a1bb650ec5888efaf3d0fc8cfb025/test/jdk/sun/security/jgss/GssNameCleanup.java#L47)
>         * [jdk/sun/security/krb5/auto/BasicProc.java](https://github.com/openjdk/jdk/blob/959fa4a1a35a1bb650ec5888efaf3d0fc8cfb025/test/jdk/sun/security/krb5/auto/BasicProc.java#L276)
>         * [jdk/sun/security/krb5/auto/Cleaners.java](https://github.com/openjdk/jdk/blob/959fa4a1a35a1bb650ec5888efaf3d0fc8cfb025/test/jdk/sun/security/krb5/auto/Cleaners.java#L176)
>         * [jdk/sun/security/krb5/auto/ReplayCacheTestProc.java](https://github.com/openjdk/jdk/blob/959fa4a1a35a1bb650ec5888efaf3d0fc8cfb025/test/jdk/sun/security/krb5/auto/ReplayCacheTestProc.java#L389)
>         * [jdk/sun/security/krb5/runNameEquals.sh](https://github.com/openjdk/jdk/blob/959fa4a1a35a1bb650ec5888efaf3d0fc8cf...

Do you need a `noreg-` label for the JBS issue?

src/java.security.jgss/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java line 69:

> 67: 
> 68:     @SuppressWarnings("restricted")
> 69:     private static Oid[] constructMechMap() {

Maybe change the method name? The return value is not a map now.

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

PR Comment: https://git.openjdk.org/jdk/pull/22461#issuecomment-2512876970
PR Review Comment: https://git.openjdk.org/jdk/pull/22461#discussion_r1866634591


More information about the security-dev mailing list