Package eu.europa.esig.dss.spi.x509
Class CertificateValidity
java.lang.Object
eu.europa.esig.dss.spi.x509.CertificateValidity
- All Implemented Interfaces:
Serializable
public class CertificateValidity extends Object implements Serializable
This class stores the information about the validity of the signing certificate.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description CertificateValidity(CertificateToken certificateToken)
This constructor create an object containing all information concerning the validity of a candidate for the signing certificate.CertificateValidity(CertificateIdentifier certificateIdentifier)
This constructor create an object containing all information concerning the validity of a candidate for the signing certificate which is based only on theCertificateIdentifier
.CertificateValidity(PublicKey publicKey)
This constructor create an object containing all information concerning the validity of a candidate for the signing certificate which is based only on thePublicKey
. -
Method Summary
Modifier and Type Method Description CertificateToken
getCertificateToken()
PublicKey
getPublicKey()
If thecertificateToken
is not null then the associatedPublicKey
will be returned otherwise the providedpublicKey
is returned.CertificateIdentifier
getSignerInfo()
Returns the associatedCertificateIdentifier
NOTE: can return nullboolean
isDigestEqual()
boolean
isDigestPresent()
boolean
isDistinguishedNameEqual()
boolean
isIssuerSerialPresent()
Indicates if the IssuerSerial (issuerAndSerialNumber) is present in the signature.boolean
isResponderIdMatch()
boolean
isResponderIdPresent()
boolean
isSerialNumberEqual()
boolean
isSignerIdMatch()
boolean
isValid()
This method returnstrue
if the certificate digest or IssuerSerial/issuerAndSerialNumber match or the certificate is signed.void
setDigestEqual(boolean digestEqual)
void
setDigestPresent(boolean digestPresent)
void
setDistinguishedNameEqual(boolean distinguishedNameEqual)
void
setIssuerSerialPresent(boolean issuerSerialPresent)
void
setResponderIdMatch(boolean responderIdMatch)
void
setResponderIdPresent(boolean responderIdPresent)
void
setSerialNumberEqual(boolean serialNumberEqual)
void
setSignerIdMatch(boolean signerIdMatch)
-
Constructor Details
-
CertificateValidity
This constructor create an object containing all information concerning the validity of a candidate for the signing certificate.- Parameters:
certificateToken
- the candidate for the signing certificate
-
CertificateValidity
This constructor create an object containing all information concerning the validity of a candidate for the signing certificate which is based only on thePublicKey
. To be used in case of a non AdES signature.- Parameters:
publicKey
- thePublicKey
associated to the signing certificate.
-
CertificateValidity
This constructor create an object containing all information concerning the validity of a candidate for the signing certificate which is based only on theCertificateIdentifier
. To be used in case of a non AdES signature.- Parameters:
certificateIdentifier
- theCertificateIdentifier
associated to the signing certificate
-
-
Method Details
-
getPublicKey
If thecertificateToken
is not null then the associatedPublicKey
will be returned otherwise the providedpublicKey
is returned. NOTE: can return null- Returns:
- the public key associated with this instance.
-
getSignerInfo
Returns the associatedCertificateIdentifier
NOTE: can return null- Returns:
CertificateIdentifier
-
getCertificateToken
-
isSignerIdMatch
public boolean isSignerIdMatch() -
setSignerIdMatch
public void setSignerIdMatch(boolean signerIdMatch) -
isDigestPresent
public boolean isDigestPresent() -
setDigestPresent
public void setDigestPresent(boolean digestPresent) -
isDigestEqual
public boolean isDigestEqual() -
setDigestEqual
public void setDigestEqual(boolean digestEqual) -
isIssuerSerialPresent
public boolean isIssuerSerialPresent()Indicates if the IssuerSerial (issuerAndSerialNumber) is present in the signature.- Returns:
-
setIssuerSerialPresent
public void setIssuerSerialPresent(boolean issuerSerialPresent) -
isSerialNumberEqual
public boolean isSerialNumberEqual() -
setSerialNumberEqual
public void setSerialNumberEqual(boolean serialNumberEqual) -
setDistinguishedNameEqual
public void setDistinguishedNameEqual(boolean distinguishedNameEqual) -
isDistinguishedNameEqual
public boolean isDistinguishedNameEqual() -
isResponderIdPresent
public boolean isResponderIdPresent() -
setResponderIdPresent
public void setResponderIdPresent(boolean responderIdPresent) -
isResponderIdMatch
public boolean isResponderIdMatch() -
setResponderIdMatch
public void setResponderIdMatch(boolean responderIdMatch) -
isValid
public boolean isValid()This method returnstrue
if the certificate digest or IssuerSerial/issuerAndSerialNumber match or the certificate is signed.- Returns:
true
if the certificate digest matches.
-