Class 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 Detail

      • CandidatesForSigningCertificate

        public CandidatesForSigningCertificate()
    • 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 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
        Throws:
        DSSException - if the SigningCertificateValidity is not present in the list of candidates then the DSSException is frown.
      • 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.