Package eu.europa.esig.dss.token
Class AbstractKeyStoreTokenConnection
java.lang.Object
eu.europa.esig.dss.token.AbstractSignatureTokenConnection
eu.europa.esig.dss.token.AbstractKeyStoreTokenConnection
- All Implemented Interfaces:
SignatureTokenConnection,AutoCloseable
- Direct Known Subclasses:
KeyStoreSignatureTokenConnection,MSCAPISignatureToken,Pkcs11SignatureToken
public abstract class AbstractKeyStoreTokenConnection extends AbstractSignatureTokenConnection
-
Field Summary
-
Constructor Summary
Constructors Constructor Description AbstractKeyStoreTokenConnection() -
Method Summary
Modifier and Type Method Description DSSPrivateKeyEntrygetKey(String alias)This method allows to retrieve a DSSPrivateKeyEntry by aliasDSSPrivateKeyEntrygetKey(String alias, KeyStore.PasswordProtection passwordProtection)This method allows to retrieve a DSSPrivateKeyEntry by aliasList<DSSPrivateKeyEntry>getKeys()Retrieves all the available keys (private keys entries) from the token.Methods inherited from class eu.europa.esig.dss.token.AbstractSignatureTokenConnection
createPSSParam, getSignatureInstance, sign, sign, signDigest, signDigest
-
Constructor Details
-
AbstractKeyStoreTokenConnection
public AbstractKeyStoreTokenConnection()
-
-
Method Details
-
getKeys
Description copied from interface:SignatureTokenConnectionRetrieves all the available keys (private keys entries) from the token.- Returns:
- List of encapsulated private keys
- Throws:
DSSException- If there is any problem during the retrieval process
-
getKey
This method allows to retrieve a DSSPrivateKeyEntry by alias- Parameters:
alias- the expected entry alias- Returns:
- the private key or null if the alias does not exist
-
getKey
This method allows to retrieve a DSSPrivateKeyEntry by alias- Parameters:
alias- the expected entry aliaspasswordProtection- key password- Returns:
- the private key or null if the alias does not exist
-