Class RemoteSignatureTokenConnectionImpl

java.lang.Object
eu.europa.esig.dss.ws.server.signing.common.RemoteSignatureTokenConnectionImpl
All Implemented Interfaces:
RemoteSignatureTokenConnection

public class RemoteSignatureTokenConnectionImpl extends Object implements RemoteSignatureTokenConnection
Default implementation of a remote signing service
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default construction instantiating object with null token connection
  • Method Summary

    Modifier and Type
    Method
    Description
    eu.europa.esig.dss.ws.server.signing.dto.RemoteKeyEntry
    getKey(String alias)
    Retrieves a key by its alias
    List<eu.europa.esig.dss.ws.server.signing.dto.RemoteKeyEntry>
    Retrieves all the available keys (private keys entries) from the token.
    void
    setToken(eu.europa.esig.dss.token.AbstractKeyStoreTokenConnection token)
    Sets the connection to the KeyStore
    eu.europa.esig.dss.ws.dto.SignatureValueDTO
    sign(eu.europa.esig.dss.ws.dto.ToBeSignedDTO toBeSigned, eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm, String alias)
    This method signs the toBeSigned data with the digest digestAlgorithm and the given alias.
    eu.europa.esig.dss.ws.dto.SignatureValueDTO
    sign(eu.europa.esig.dss.ws.dto.ToBeSignedDTO toBeSigned, eu.europa.esig.dss.enumerations.SignatureAlgorithm signatureAlgorithm, String alias)
    This method signs the toBeSigned data with the digest signatureAlgorithm and the given alias.
    eu.europa.esig.dss.ws.dto.SignatureValueDTO
    signDigest(eu.europa.esig.dss.ws.dto.DigestDTO digest, eu.europa.esig.dss.enumerations.SignatureAlgorithm signatureAlgorithm, String alias)
    This method signs the digest data with a signatureAlgorithm and the given alias.
    eu.europa.esig.dss.ws.dto.SignatureValueDTO
    signDigest(eu.europa.esig.dss.ws.dto.DigestDTO digest, String alias)
    This method signs the digest data with the given alias.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RemoteSignatureTokenConnectionImpl

      public RemoteSignatureTokenConnectionImpl()
      Default construction instantiating object with null token connection
  • Method Details

    • setToken

      public void setToken(eu.europa.esig.dss.token.AbstractKeyStoreTokenConnection token)
      Sets the connection to the KeyStore
      Parameters:
      token - AbstractKeyStoreTokenConnection
    • getKeys

      public List<eu.europa.esig.dss.ws.server.signing.dto.RemoteKeyEntry> getKeys() throws eu.europa.esig.dss.model.DSSException
      Description copied from interface: RemoteSignatureTokenConnection
      Retrieves all the available keys (private keys entries) from the token.
      Specified by:
      getKeys in interface RemoteSignatureTokenConnection
      Returns:
      List of encapsulated private keys
      Throws:
      eu.europa.esig.dss.model.DSSException - If there is any problem during the retrieval process
    • getKey

      public eu.europa.esig.dss.ws.server.signing.dto.RemoteKeyEntry getKey(String alias) throws eu.europa.esig.dss.model.DSSException
      Description copied from interface: RemoteSignatureTokenConnection
      Retrieves a key by its alias
      Specified by:
      getKey in interface RemoteSignatureTokenConnection
      Parameters:
      alias - the key alias to retrieve
      Returns:
      the RemoteKeyEntry with the given alias
      Throws:
      eu.europa.esig.dss.model.DSSException
    • sign

      public eu.europa.esig.dss.ws.dto.SignatureValueDTO sign(eu.europa.esig.dss.ws.dto.ToBeSignedDTO toBeSigned, eu.europa.esig.dss.enumerations.DigestAlgorithm digestAlgorithm, String alias) throws eu.europa.esig.dss.model.DSSException
      Description copied from interface: RemoteSignatureTokenConnection
      This method signs the toBeSigned data with the digest digestAlgorithm and the given alias.
      Specified by:
      sign in interface RemoteSignatureTokenConnection
      Parameters:
      toBeSigned - The data that need to be signed
      digestAlgorithm - The digest algorithm to be used before signing
      alias - The key alias to be used
      Returns:
      The array of bytes representing the signature value
      Throws:
      eu.europa.esig.dss.model.DSSException - If there is any problem during the signature process
    • sign

      public eu.europa.esig.dss.ws.dto.SignatureValueDTO sign(eu.europa.esig.dss.ws.dto.ToBeSignedDTO toBeSigned, eu.europa.esig.dss.enumerations.SignatureAlgorithm signatureAlgorithm, String alias) throws eu.europa.esig.dss.model.DSSException
      Description copied from interface: RemoteSignatureTokenConnection
      This method signs the toBeSigned data with the digest signatureAlgorithm and the given alias.
      Specified by:
      sign in interface RemoteSignatureTokenConnection
      Parameters:
      toBeSigned - The data that need to be signed
      signatureAlgorithm - The signature algorithm to be used for signing
      alias - The key alias to be used
      Returns:
      The array of bytes representing the signature value
      Throws:
      eu.europa.esig.dss.model.DSSException - If there is any problem during the signature process
    • signDigest

      public eu.europa.esig.dss.ws.dto.SignatureValueDTO signDigest(eu.europa.esig.dss.ws.dto.DigestDTO digest, String alias) throws eu.europa.esig.dss.model.DSSException
      Description copied from interface: RemoteSignatureTokenConnection
      This method signs the digest data with the given alias.
      Specified by:
      signDigest in interface RemoteSignatureTokenConnection
      Parameters:
      digest - The digested data that need to be signed
      alias - The key alias to be used
      Returns:
      the signature value representation with the used algorithm and the binary value
      Throws:
      eu.europa.esig.dss.model.DSSException - If there is any problem during the signature process
    • signDigest

      public eu.europa.esig.dss.ws.dto.SignatureValueDTO signDigest(eu.europa.esig.dss.ws.dto.DigestDTO digest, eu.europa.esig.dss.enumerations.SignatureAlgorithm signatureAlgorithm, String alias) throws eu.europa.esig.dss.model.DSSException
      Description copied from interface: RemoteSignatureTokenConnection
      This method signs the digest data with a signatureAlgorithm and the given alias.
      Specified by:
      signDigest in interface RemoteSignatureTokenConnection
      Parameters:
      digest - The digested data that need to be signed
      signatureAlgorithm - The signature algorithm to be used for signing
      alias - The key alias to be used
      Returns:
      the signature value representation with the used algorithm and the binary value
      Throws:
      eu.europa.esig.dss.model.DSSException - If there is any problem during the signature process