Package eu.europa.esig.dss.validation
Class CandidatesForSigningCertificate
- java.lang.Object
-
- eu.europa.esig.dss.validation.CandidatesForSigningCertificate
-
- All Implemented Interfaces:
Serializable
public class CandidatesForSigningCertificate extends Object implements Serializable
This class holds the list of the candidates for the signing certificate of the main signature.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CandidatesForSigningCertificate()
-
Method Summary
Modifier and Type Method Description voidadd(CertificateValidity certificateValidity)This method allows to add a candidate for the signing certificate.List<CertificateValidity>getCertificateValidityList()List<CertificateToken>getSigningCertificateTokenList()CertificateValiditygetTheBestCandidate()This method returns the best candidate for the signing certificate.CertificateValiditygetTheCertificateValidity()ThetheSigningCertificateValidityobject must be set before.voidsetTheCertificateValidity(CertificateValidity theCertificateValidity)This method allows to set theSigningCertificateValidityobject after the verification of its signature.
-
-
-
Method Detail
-
getCertificateValidityList
public List<CertificateValidity> getCertificateValidityList()
- Returns:
- the list of candidates for the signing certificate.
-
getSigningCertificateTokenList
public List<CertificateToken> getSigningCertificateTokenList()
- Returns:
- the list of candidates for the signing certificate.
-
add
public void add(CertificateValidity certificateValidity)
This method allows to add a candidate for the signing certificate.- Parameters:
certificateValidity- A new candidate with its validity.
-
setTheCertificateValidity
public void setTheCertificateValidity(CertificateValidity theCertificateValidity) throws DSSException
This method allows to set theSigningCertificateValidityobject after the verification of its signature.theSigningCertificateValidityobject must be in the list of the candidates.- Parameters:
theCertificateValidity- the certain signing certificate validity object- Throws:
DSSException- if theSigningCertificateValidityis not present in the list of candidates then theDSSExceptionis frown.
-
getTheCertificateValidity
public CertificateValidity getTheCertificateValidity()
ThetheSigningCertificateValidityobject must be set before.- Returns:
- the signing certificate validity
SigningCertificateValidityornullif such a certificate was not identified.
-
getTheBestCandidate
public CertificateValidity getTheBestCandidate()
This method returns the best candidate for the signing certificate. The only way to be sure that it is the right one is to validate the signature.- Returns:
- The valid signing certificate, if there is no valid certificate then the first one is returned.
-
-