Class CustomPkcs11Configuration
- All Implemented Interfaces:
Pkcs11Configuration
Pkcs11Configuration where a PKCS#11 each configuration setting is supplied.
Note: This implementation assumes that the SunPKCS11 security provider is used, or other security providers that
supports the KeyStoreSpi. See AbstractSunPkcs11Configuration.
- Author:
- Martin Lindström
-
Field Summary
Fields inherited from class se.swedenconnect.security.credential.pkcs11.AbstractSunPkcs11Configuration
DEFAULT_PROVIDER_NAME -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class se.swedenconnect.security.credential.pkcs11.AbstractSunPkcs11Configuration
getBaseProviderName, getProvider, init
-
Constructor Details
-
CustomPkcs11Configuration
public CustomPkcs11Configuration(@Nonnull String library, @Nonnull String name, @Nullable String slot, @Nullable Integer slotListIndex, @Nullable String baseProviderName) Constructor setting the library, name, slot and slotListIndex individually.The
baseProviderNameis the name of the security provider that we use to create new instances that have names according to<base-provider-name>-<instance-name>, where 'instance-name' is gotten from the configuration. Implementations wishing to use another provider than "SunPKCS11" should supply this provider name.- Parameters:
library- the PKCS#11 library pathname- the name of the HSM slotslot- the slot number/id (may benull)slotListIndex- the slot index (may benull)baseProviderName- the base provider name (if not given, SunPKCS11 is assumed)
-
-
Method Details
-
getConfigurationData
Gets the configuration data for this configuration. The data returned is supplied in theProvider.configure(String)call that is made to configure the PKCS#11 security provider.The returned string represents either a file name to an PKCS#11 configuration file or PKCS#11 configuration commands (in that case the string must be prefixed with
--.Note: For configuration objects using a pre-configured security provider, the method must return
null.- Specified by:
getConfigurationDatain classAbstractSunPkcs11Configuration- Returns:
- configuration data for a PKCS#11 provider, or
nullif no configuration is needed
-
toString
- Overrides:
toStringin classAbstractSunPkcs11Configuration
-