Package org.wso2.carbon.server
Class PKCS11ProviderRegistrar
java.lang.Object
org.wso2.carbon.server.PKCS11ProviderRegistrar
Adds the SunPKCS11 providers configured in carbon.xml (
[[security.pkcs11_provider]] in deployment.toml)
to the JVM. It runs in the launcher, before OSGi starts, so the providers exist before key stores are loaded and
before Tomcat starts its HTTPS connector.
Providers are appended after the providers that are already registered, so the JDK providers stay first. A
provider that is already registered under the same name (for example through -Djava.security.properties)
is kept and the carbon.xml entry is skipped.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
PKCS11ProviderRegistrar
public PKCS11ProviderRegistrar()
-
-
Method Details
-
register
Register the PKCS11 providers configured in the given carbon.xml.- Parameters:
carbonXml- Rendered carbon.xml.carbonHome- Carbon home, used for ${carbon.home} and relative configuration file paths.- Returns:
- Names of the providers added to the JVM.
- Throws:
IllegalStateException- If the configuration is invalid or a provider can't be created.
-