Package eu.europa.esig.dss.spi.x509
Class CandidatesForSigningCertificate
java.lang.Object
eu.europa.esig.dss.spi.x509.CandidatesForSigningCertificate
- All Implemented Interfaces:
Serializable
This class holds the list of the candidates for the signing certificate of the main signature.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor with null or empty values -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(CertificateValidity certificateValidity) This method allows to add a candidate for the signing certificate.Gets a certificate validity listThis method returns the best candidate for the signing certificate.ThetheSigningCertificateValidityobject must be set before.booleanisEmpty()This method tests if any candidate is knownvoidsetTheCertificateValidity(CertificateValidity theCertificateValidity) This method allows to set theSigningCertificateValidityobject after the verification of its signature.
-
Constructor Details
-
CandidatesForSigningCertificate
public CandidatesForSigningCertificate()Default constructor with null or empty values
-
-
Method Details
-
getCertificateValidityList
Gets a certificate validity list- Returns:
- the list of candidates for the signing certificate.
-
isEmpty
public boolean isEmpty()This method tests if any candidate is known- Returns:
- true is no candidate is known
-
add
This method allows to add a candidate for the signing certificate.- Parameters:
certificateValidity- A new candidate with its validity.
-
setTheCertificateValidity
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
-
getTheCertificateValidity
ThetheSigningCertificateValidityobject must be set before.- Returns:
- the signing certificate validity
SigningCertificateValidityornullif such a certificate was not identified.
-
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.
-