[11.0.9u] RFR (XS) 8250787: Provider.put no longer registering aliases in FIPS env
Martin Balao
mbalao at redhat.com
Tue Sep 22 14:44:40 UTC 2020
Hi,
Thanks for having a look at this.
On Fri, Sep 18, 2020 at 8:01 PM David Alvarez <alvdavi at amazon.com> wrote:
> Please review the following patch for 8250787, a p2 present in
> 11.0.9-oracle we are still missing.
>
> webrev: http://cr.openjdk.java.net/~alvdavi/webrevs/8250787/webrev.11u.00/
> bug: https://bugs.openjdk.java.net/browse/JDK-8250787
>
> The problem is related to the registration of aliases in the
> java.security.Provider. Provider holds two maps, one for services
> registered using the old Provider.put (legacyMap) method and one for
> holding services registered with the newer Provider.putService
> (serviceMap). It seems that has been the case since 1.5, but it was not
> a problem until recently, as the default services were still added using
> the old Provider.put. JDK-7092821 [1] changed that, making the default
> providers use Provider.putService instead of Provider.put, and
> uncovering this latent problem.
>
> The fix is a small one, make sure that parseLegacyPut looks into both
> maps when adding a new alias. Patch pases jdk tier1 and tier2 and a test
> is included.
>
I've seen that entries from the legacyMap are also retrieved in 2
additional paths within Provider::parseLegacyPut. Don't we need to get
the Service from the new map if the previous fails? Looks to me that
these 2 additional paths are different ways of describing the alias.
Thanks,
Martin.-
More information about the jdk-updates-dev
mailing list