Class CandidatesForSigningCertificate

java.lang.Object
eu.europa.esig.dss.spi.x509.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 Details

  • Method Details

    • getCertificateValidityList

      public List<CertificateValidity> getCertificateValidityList()
      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
    • 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)
      This method allows to set the SigningCertificateValidity 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

      public CertificateValidity getTheCertificateValidity()
      The theSigningCertificateValidity object must be set before.
      Returns:
      the signing certificate validity SigningCertificateValidity or null if 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.