Class CertificateTrustTime

java.lang.Object
eu.europa.esig.dss.model.timedependent.BaseTimeDependent
eu.europa.esig.dss.model.tsl.CertificateTrustTime
All Implemented Interfaces:
TimeDependent, Serializable

public class CertificateTrustTime extends BaseTimeDependent
This class defines a validity period during which a certificate is considered as a trust anchor
See Also:
  • Constructor Details

    • CertificateTrustTime

      public CertificateTrustTime(boolean trusted)
      Constructor to create either a not trusted or indefinitely trusted entry
      Parameters:
      trusted - whether the object corresponds to a trusted certificate token
    • CertificateTrustTime

      public CertificateTrustTime(Date startDate, Date endDate)
      Default constructor
      Parameters:
      startDate - Date certificate trust start time
      endDate - Date certificate trust end time
  • Method Details

    • isTrusted

      public boolean isTrusted()
      Returns whether the corresponding certificate has a trusted period
      Returns:
      TRUE if the certificate has a trusted period, FALSE otherwise
    • isTrustedAtTime

      public boolean isTrustedAtTime(Date controlTime)
      This method verifies whether the controlTime lies within the certificate trust time range
      Parameters:
      controlTime - Date to check
      Returns:
      TRUE if the certificate is trusted during the controlTime, FALSE otherwise
    • getJointTrustTime

      public CertificateTrustTime getJointTrustTime(Date startDate, Date endDate)
      This method is used to create a joint time period using the current trust time and the given period between startDate and endDate. NOTE: the method does not change the current time, but creates a new joint interval
      Parameters:
      startDate - Date the time of another period start
      endDate - Date the time of another period end
      Returns:
      CertificateTrustTime