Class SignerIdentifier

java.lang.Object
eu.europa.esig.dss.spi.x509.SignerIdentifier
All Implemented Interfaces:
Serializable

public class SignerIdentifier extends Object implements Serializable
Represents an ASN.1 SignerId DTO
See Also:
  • Constructor Details

    • SignerIdentifier

      public SignerIdentifier()
      Default constructor instantiating object with null values
  • Method Details

    • getIssuerName

      public X500Principal getIssuerName()
      Returns the name of the certificate issuer
      Returns:
      X500Principal
    • setIssuerName

      public void setIssuerName(X500Principal name)
      Sets the name of the certificate's issuer
      Parameters:
      name - X500Principal
    • getSerialNumber

      public BigInteger getSerialNumber()
      Returns the serial number of the signer certificate
      Returns:
      BigInteger
    • setSerialNumber

      public void setSerialNumber(BigInteger serialNumber)
      Sets serial number of the signer certificate
      Parameters:
      serialNumber - BigInteger
    • getSki

      public byte[] getSki()
      Returns SHA-1 of the certificate's public key
      Returns:
      byte array representation of the SHA-1
    • setSki

      public void setSki(byte[] ski)
      Sets SHA-1 of the certificate's public key
      Parameters:
      ski - byte array
    • isCurrent

      public boolean isCurrent()
      Indicates if the SignerIdentifier is related to the current signature
      Returns:
      TRUE if it is related to the current signature, FALSE otherwise
    • setCurrent

      public void setCurrent(boolean current)
      Sets if the SignerIdentifier is related to the current signature
      Parameters:
      current - if related to the current signature
    • getIssuerSerialEncoded

      public byte[] getIssuerSerialEncoded()
      Returns DER-encoded IssuerSerial representation of the object. NOTE: the issuerName and SerialNumber must be defined! Returns null in the opposite case
      Returns:
      a byte array of the encoded IssuerSerial
    • isRelatedToCertificate

      public boolean isRelatedToCertificate(CertificateToken certificateToken)
      Checks if the current SerialInfo is related to a provided CertificateToken
      Parameters:
      certificateToken - CertificateToken to check
      Returns:
      TRUE if the certificateToken is related to the SerialInfo, FALSE otherwise
    • isEquivalent

      public boolean isEquivalent(SignerIdentifier signerIdentifier)
      Checks if the given signerIdentifier is equivalent
      Parameters:
      signerIdentifier - SignerIdentifier to compare
      Returns:
      TRUE if the given object is equivalent, FALSE otherwise
    • isEmpty

      public boolean isEmpty()
      Checks if the SignerIdentifier is empty or not NOTE: in some cases the SignerIdentifier can not contain any values
      Returns:
      TRUE if the SignerIdentifier is empty, FALSE otherwise
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object