Package eu.europa.esig.dss.spi.x509
Class SignerIdentifier
java.lang.Object
eu.europa.esig.dss.spi.x509.SignerIdentifier
-
Constructor Summary
ConstructorDescriptionDefault constructor instantiating object with null values -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the name of the certificate issuerbyte[]
Returns DER-encoded IssuerSerial representation of the object.Returns the serial number of the signer certificatebyte[]
getSki()
Returns SHA-1 of the certificate's public keyint
hashCode()
boolean
Indicates if the SignerIdentifier is related to the current signatureboolean
isEmpty()
Checks if the SignerIdentifier is empty or not NOTE: in some cases the SignerIdentifier can not contain any valuesboolean
isEquivalent
(SignerIdentifier signerIdentifier) Checks if the givensignerIdentifier
is equivalentboolean
isRelatedToCertificate
(CertificateToken certificateToken) Checks if the current SerialInfo is related to a provided CertificateTokenvoid
setCurrent
(boolean current) Sets if the SignerIdentifier is related to the current signaturevoid
setIssuerName
(X500Principal name) Sets the name of the certificate's issuervoid
setSerialNumber
(BigInteger serialNumber) Sets serial number of the signer certificatevoid
setSki
(byte[] ski) Sets SHA-1 of the certificate's public keytoString()
-
Constructor Details
-
SignerIdentifier
public SignerIdentifier()Default constructor instantiating object with null values
-
-
Method Details
-
getIssuerName
Returns the name of the certificate issuer- Returns:
X500Principal
-
setIssuerName
Sets the name of the certificate's issuer- Parameters:
name
-X500Principal
-
getSerialNumber
Returns the serial number of the signer certificate- Returns:
BigInteger
-
setSerialNumber
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
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
Checks if the givensignerIdentifier
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
-
hashCode
-
equals
-