Integrated: 8280890: Cannot use '-Djava.system.class.loader' with class loader in signed JAR

Sean Mullan mullan at openjdk.java.net
Mon Feb 7 14:10:13 UTC 2022


On Tue, 1 Feb 2022 21:54:29 GMT, Sean Mullan <mullan at openjdk.org> wrote:

> This fixes a bootstrapping issue if a custom system class loader is set with the `-Djava.system.class.loader` option and the custom class loader is inside a signed JAR.  In order to load the custom class loader, the runtime must verify the signed JAR first, and the algorithm constraint code tries to load a `Locale` provider using a `ServiceLoader` before the class loader is set, and this causes a `ServiceConfigurationError`.
> 
> The fix removes a dependency from the security algorithm "denyAfter" constraint parsing code on the `Calendar` API which uses a `ServiceLoader` for gathering default locale information. Instead the `ZonedDateTime` API is now used, which simplifies the code and removes some unnecessary code from `keytool` as well.

This pull request has now been integrated.

Changeset: a0f6f240
Author:    Sean Mullan <mullan at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/a0f6f2409ea61ff9ed9dc2e2b46e309c751d456d
Stats:     186 lines in 4 files changed: 142 ins; 28 del; 16 mod

8280890: Cannot use '-Djava.system.class.loader' with class loader in signed JAR

Reviewed-by: weijun, hchao

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

PR: https://git.openjdk.java.net/jdk/pull/7316


More information about the security-dev mailing list