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
-
Fields inherited from class eu.europa.esig.dss.token.AbstractSignatureTokenConnection
LOG
-
-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface eu.europa.esig.dss.token.SignatureTokenConnection
close
-
-
-
-
Method Detail
-
getKeys
public List<DSSPrivateKeyEntry> getKeys() throws DSSException
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
public DSSPrivateKeyEntry getKey(String alias)
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
public DSSPrivateKeyEntry getKey(String alias, KeyStore.PasswordProtection passwordProtection)
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
-
-