Class PKCS11KeyStoreKeyingDataProvider

java.lang.Object
xades4j.providers.impl.KeyStoreKeyingDataProvider
xades4j.providers.impl.PKCS11KeyStoreKeyingDataProvider
All Implemented Interfaces:
KeyingDataProvider

public final class PKCS11KeyStoreKeyingDataProvider extends KeyStoreKeyingDataProvider
A specification of KeyStoreKeyingDataProvider for PKCS#11 keystores. This class uses the SUN's PKCS#11 provider, which brigdes with a native PKCS#11 library. Note that this provider may not be included in some versions of the JRE, On those scenarios this class will fail at runtime.

The builder method can be used to configure and create a new instance. If a name for the underlying PKCS#11 provider is not specified, a default value is used which is based on the native library path. Duplicate names will cause an exception.

The KeyStoreKeyingDataProvider.KeyStorePasswordProvider and KeyStoreKeyingDataProvider.KeyEntryPasswordProvider may be null, in which case the keystore protection has to be handled by the native library. If the KeyStoreKeyingDataProvider.KeyEntryPasswordProvider is supplied, the protection used to access an entry is a KeyStore.CallbackHandlerProtection that invokes the KeyStoreKeyingDataProvider.KeyEntryPasswordProvider exactly when when the password is requested.

Author:
Luís
See Also: