Package eu.europa.esig.dss.model.tsl
Class CertificateTrustTime
java.lang.Object
eu.europa.esig.dss.model.timedependent.BaseTimeDependent
eu.europa.esig.dss.model.tsl.CertificateTrustTime
- All Implemented Interfaces:
TimeDependent,Serializable
This class defines a validity period during which a certificate is considered as a trust anchor
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCertificateTrustTime(boolean trusted) Constructor to create either a not trusted or indefinitely trusted entryCertificateTrustTime(Date startDate, Date endDate) Default constructor -
Method Summary
Modifier and TypeMethodDescriptiongetJointTrustTime(Date startDate, Date endDate) This method is used to create a joint time period using the current trust time and the given period betweenstartDateandendDate.booleanReturns whether the corresponding certificate has a trusted periodbooleanisTrustedAtTime(Date controlTime) This method verifies whether thecontrolTimelies within the certificate trust time rangeMethods inherited from class eu.europa.esig.dss.model.timedependent.BaseTimeDependent
equals, getEndDate, getStartDate, hashCode, toString
-
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
Default constructor
-
-
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
This method verifies whether thecontrolTimelies within the certificate trust time range- Parameters:
controlTime-Dateto check- Returns:
- TRUE if the certificate is trusted during the
controlTime, FALSE otherwise
-
getJointTrustTime
This method is used to create a joint time period using the current trust time and the given period betweenstartDateandendDate. NOTE: the method does not change the current time, but creates a new joint interval- Parameters:
startDate-Datethe time of another period startendDate-Datethe time of another period end- Returns:
CertificateTrustTime
-