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
ConstructorDescriptionDefault constructor with null or empty values -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(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.ThetheSigningCertificateValidity
object must be set before.boolean
isEmpty()
This method tests if any candidate is knownvoid
setTheCertificateValidity
(CertificateValidity theCertificateValidity) This method allows to set theSigningCertificateValidity
object 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 theSigningCertificateValidity
object after the verification of its signature.theSigningCertificateValidity
object must be in the list of the candidates.- Parameters:
theCertificateValidity
- the certain signing certificate validity object
-
getTheCertificateValidity
ThetheSigningCertificateValidity
object must be set before.- Returns:
- the signing certificate validity
SigningCertificateValidity
ornull
if 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.
-