Module jpms_dss_spi

Class TrustedListsCertificateSource

All Implemented Interfaces:
eu.europa.esig.dss.model.tsl.TrustedCertificateSourceWithTime, eu.europa.esig.dss.model.tsl.TrustPropertiesCertificateSource, CertificateSource, TrustedCertificateSource, Serializable

public class TrustedListsCertificateSource extends CommonTrustedCertificateSource implements eu.europa.esig.dss.model.tsl.TrustPropertiesCertificateSource
This class allows injection of trusted certificates from Trusted Lists
See Also:
  • Constructor Details

    • TrustedListsCertificateSource

      public TrustedListsCertificateSource()
      The default constructor.
  • Method Details

    • getSummary

      public eu.europa.esig.dss.model.tsl.TLValidationJobSummary getSummary()
      Gets TL Validation job summary
      Specified by:
      getSummary in interface eu.europa.esig.dss.model.tsl.TrustPropertiesCertificateSource
      Returns:
      TLValidationJobSummary
    • setSummary

      public void setSummary(eu.europa.esig.dss.model.tsl.TLValidationJobSummary summary)
      Sets TL Validation job summary
      Specified by:
      setSummary in interface eu.europa.esig.dss.model.tsl.TrustPropertiesCertificateSource
      Parameters:
      summary - TLValidationJobSummary
    • getCertificateSourceType

      public eu.europa.esig.dss.enumerations.CertificateSourceType getCertificateSourceType()
      Description copied from interface: CertificateSource
      This method returns the certificate source type associated to the implementation class.
      Specified by:
      getCertificateSourceType in interface CertificateSource
      Overrides:
      getCertificateSourceType in class CommonTrustedCertificateSource
      Returns:
      the certificate origin
    • addCertificate

      public eu.europa.esig.dss.model.x509.CertificateToken addCertificate(eu.europa.esig.dss.model.x509.CertificateToken certificate)
      Specified by:
      addCertificate in interface CertificateSource
      Overrides:
      addCertificate in class CommonCertificateSource
      Parameters:
      certificate - the certificate you have to trust
      Returns:
      the corresponding certificate token
    • setTrustPropertiesByCertificates

      public void setTrustPropertiesByCertificates(Map<eu.europa.esig.dss.model.x509.CertificateToken,List<eu.europa.esig.dss.model.tsl.TrustProperties>> trustPropertiesByCerts)
      Specified by:
      setTrustPropertiesByCertificates in interface eu.europa.esig.dss.model.tsl.TrustPropertiesCertificateSource
    • getTrustServices

      public List<eu.europa.esig.dss.model.tsl.TrustProperties> getTrustServices(eu.europa.esig.dss.model.x509.CertificateToken token)
      Specified by:
      getTrustServices in interface eu.europa.esig.dss.model.tsl.TrustPropertiesCertificateSource
    • setTrustTimeByCertificates

      public void setTrustTimeByCertificates(Map<eu.europa.esig.dss.model.x509.CertificateToken,List<eu.europa.esig.dss.model.tsl.CertificateTrustTime>> trustTimeByCertificate)
      Specified by:
      setTrustTimeByCertificates in interface eu.europa.esig.dss.model.tsl.TrustPropertiesCertificateSource
    • getTrustTime

      public eu.europa.esig.dss.model.tsl.CertificateTrustTime getTrustTime(eu.europa.esig.dss.model.x509.CertificateToken token)
      Specified by:
      getTrustTime in interface eu.europa.esig.dss.model.tsl.TrustedCertificateSourceWithTime
    • isTrustedAtTime

      public boolean isTrustedAtTime(eu.europa.esig.dss.model.x509.CertificateToken certificateToken, Date controlTime)
      Description copied from interface: CertificateSource
      This method checks if a given certificate is trusted at the controlTime
      Specified by:
      isTrustedAtTime in interface CertificateSource
      Overrides:
      isTrustedAtTime in class CommonCertificateSource
      Parameters:
      certificateToken - the certificate to be tested
      controlTime - Date
      Returns:
      true if the certificate is trusted
    • getAlternativeOCSPUrls

      public List<String> getAlternativeOCSPUrls(eu.europa.esig.dss.model.x509.CertificateToken trustAnchor)
      Description copied from interface: TrustedCertificateSource
      Returns a list of alternative OCSP access point Urls for certificates issued by the current trust anchor
      Specified by:
      getAlternativeOCSPUrls in interface TrustedCertificateSource
      Overrides:
      getAlternativeOCSPUrls in class CommonTrustedCertificateSource
      Parameters:
      trustAnchor - CertificateToken
      Returns:
      a list of Strings
    • getAlternativeCRLUrls

      public List<String> getAlternativeCRLUrls(eu.europa.esig.dss.model.x509.CertificateToken trustAnchor)
      Description copied from interface: TrustedCertificateSource
      Returns a list of alternative CRL access point Urls for certificates issued by the current trust anchor
      Specified by:
      getAlternativeCRLUrls in interface TrustedCertificateSource
      Overrides:
      getAlternativeCRLUrls in class CommonTrustedCertificateSource
      Parameters:
      trustAnchor - CertificateToken
      Returns:
      a list of Strings
    • isTrusted

      public boolean isTrusted(eu.europa.esig.dss.model.x509.CertificateToken certificateToken)
      Description copied from interface: CertificateSource
      This method checks if a given certificate is trusted
      Specified by:
      isTrusted in interface CertificateSource
      Overrides:
      isTrusted in class CommonTrustedCertificateSource
      Parameters:
      certificateToken - the certificate to be tested
      Returns:
      true if the certificate is trusted
    • getNumberOfTrustedEntityKeys

      public int getNumberOfTrustedEntityKeys()
      Gets the number of trusted entity keys (public key + subject name)
      Returns:
      the number of trusted entity keys (public key + subject name)