Remove fields that were holding provider objects in the image heap (and thus initialized at build time). Move all JDK providers (that can be moved) to runtime initialization (see SecurityServicesFeature.java).
Allow the loading of security providers via the service loading mechanism (see ServiceLoaderFeature.java).
Use a separate structure to support provider verification (see SecurityProvidersSupport), avoiding the need to keep provider objects in the image heap (see SecuritySubstitutions).
Allow the instantiation of the security provider at run-time by modifying substitutions in SecuritySubstitutions.
Remove the build-time initialization of XMLDSigRI from TrustStoreManager.
Update SecurityServiceTest to align with the new changes.
The code walkthrough:
SecurityServicesFeature.java
).ServiceLoaderFeature.java
).SecurityProvidersSupport
), avoiding the need to keep provider objects in the image heap (seeSecuritySubstitutions
).SecuritySubstitutions
.XMLDSigRI
fromTrustStoreManager
.SecurityServiceTest
to align with the new changes.