Package eu.europa.esig.dss.spi.x509
Class SignerIdentifier
java.lang.Object
eu.europa.esig.dss.spi.x509.SignerIdentifier
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor instantiating object with null values -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns 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 keyinthashCode()booleanIndicates if the SignerIdentifier is related to the current signaturebooleanisEmpty()Checks if the SignerIdentifier is empty or not NOTE: in some cases the SignerIdentifier can not contain any valuesbooleanisEquivalent(SignerIdentifier signerIdentifier) Checks if the givensignerIdentifieris equivalentbooleanisRelatedToCertificate(CertificateToken certificateToken) Checks if the current SerialInfo is related to a provided CertificateTokenvoidsetCurrent(boolean current) Sets if the SignerIdentifier is related to the current signaturevoidsetIssuerName(X500Principal name) Sets the name of the certificate's issuervoidsetSerialNumber(BigInteger serialNumber) Sets serial number of the signer certificatevoidsetSki(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-CertificateTokento check- Returns:
- TRUE if the certificateToken is related to the SerialInfo, FALSE otherwise
-
isEquivalent
Checks if the givensignerIdentifieris equivalent- Parameters:
signerIdentifier-SignerIdentifierto 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
SignerIdentifieris empty, FALSE otherwise
-
toString
-
hashCode
-
equals
-