Skip to content

Commit 05a28f7

Browse files
Update JCASecurityServices.md to align with new changes.
1 parent fd36d43 commit 05a28f7

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

docs/reference-manual/native-image/JCASecurityServices.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,17 @@ The report will detail all registered service classes, the API methods that trig
3636

3737
> Note: The `--enable-all-security-services` option is now deprecated and it will be removed in a future release.
3838
39+
## Provider initialization
40+
41+
Security providers are initialized at build time by default.
42+
To move their initialization to run time, you can use the flag `--future-defaults=all` or `--future-defaults=run-time-initialized-jdk`.
43+
3944
## Provider Registration
4045

4146
The `native-image` builder captures the list of providers and their preference order from the underlying JVM.
4247
The provider order is specified in the `java.security` file under `<java-home>/conf/security/java.security`.
43-
New security providers cannot be registered at run time; all providers must be statically configured at executable build time.
48+
New security providers cannot be registered at run time by default (see the section above); all providers must be statically configured at executable build time.
49+
If the user specifies `--future-defaults=all` or `--future-defaults=run-time-initialized-jdk` (to move initialization to run time), then a specific properties file can be used via the command line flag `-Djava.security.properties=<path>`.
4450

4551
## Providers Reordering at Run Time
4652

@@ -52,6 +58,9 @@ Security.removeProvider("BC");
5258
Security.insertProviderAt(bcProvider, 1);
5359
```
5460

61+
If `--future-defaults=all` or `--future-defaults=run-time-initialized-jdk` is enabled, the list of providers is constructed at run time.
62+
The same approach to manipulating providers can then be used.
63+
5564
## SecureRandom
5665

5766
The `SecureRandom` implementations open the `/dev/random` and `/dev/urandom` files which are used as sources.

0 commit comments

Comments
 (0)