Package eu.europa.esig.dss.token
Class Pkcs12SignatureToken
java.lang.Object
eu.europa.esig.dss.token.AbstractSignatureTokenConnection
eu.europa.esig.dss.token.AbstractKeyStoreTokenConnection
eu.europa.esig.dss.token.KeyStoreSignatureTokenConnection
eu.europa.esig.dss.token.Pkcs12SignatureToken
- All Implemented Interfaces:
SignatureTokenConnection
,AutoCloseable
public class Pkcs12SignatureToken extends KeyStoreSignatureTokenConnection
Class holding all PKCS#12 file access logic.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Pkcs12SignatureToken(byte[] ksBytes, KeyStore.PasswordProtection password)
Creates a SignatureTokenConnection with the provided binaries to PKCS#12 KeyStore and password.Pkcs12SignatureToken(File ksFile, KeyStore.PasswordProtection password)
Creates a SignatureTokenConnection with the provided File to PKCS#12 KeyStore and password.Pkcs12SignatureToken(InputStream ksStream, KeyStore.PasswordProtection password)
Creates a SignatureTokenConnection with the provided InputStream to PKCS#12 KeyStore file and password.Pkcs12SignatureToken(String filepath, KeyStore.PasswordProtection password)
Creates a SignatureTokenConnection with the provided filepath to PKCS#12 KeyStore file and password. -
Method Summary
Methods inherited from class eu.europa.esig.dss.token.AbstractKeyStoreTokenConnection
getKey, getKey, getKeys
Methods inherited from class eu.europa.esig.dss.token.AbstractSignatureTokenConnection
createPSSParam, getSignatureInstance, sign, sign, signDigest, signDigest
-
Constructor Details
-
Pkcs12SignatureToken
Creates a SignatureTokenConnection with the provided InputStream to PKCS#12 KeyStore file and password.- Parameters:
ksStream
- the inputstreampassword
- the keystore password
-
Pkcs12SignatureToken
Creates a SignatureTokenConnection with the provided binaries to PKCS#12 KeyStore and password.- Parameters:
ksBytes
- the binariespassword
- the keystore password
-
Pkcs12SignatureToken
Creates a SignatureTokenConnection with the provided File to PKCS#12 KeyStore and password.- Parameters:
ksFile
- the keystore filepassword
- the keystore password- Throws:
IOException
- if an error occurred while reading the file
-
Pkcs12SignatureToken
public Pkcs12SignatureToken(String filepath, KeyStore.PasswordProtection password) throws IOExceptionCreates a SignatureTokenConnection with the provided filepath to PKCS#12 KeyStore file and password.- Parameters:
filepath
- the filepath of the keystorepassword
- the keystore password- Throws:
IOException
- if an error occurred while reading the file
-