Class KeyUsageCondition
java.lang.Object
eu.europa.esig.dss.tsl.dto.condition.KeyUsageCondition
- All Implemented Interfaces:
Condition
,Serializable
Condition based on the certificate key usage
- See Also:
-
Constructor Summary
ConstructorDescriptionKeyUsageCondition
(KeyUsageBit bit, boolean value) Constructs a new KeyUsageCondition.KeyUsageCondition
(String usage, boolean value) Constructs a new KeyUsageCondition. -
Method Summary
Modifier and TypeMethodDescriptionboolean
check
(CertificateToken certificateToken) Returns true if the condition is evaluated to true for the given certificate.final KeyUsageBit
getBit()
Returns the key usage to be checked.final boolean
getValue()
Returns the required bit value of the key usage to be checked.toString()
Returns a string representation of the condition
-
Constructor Details
-
KeyUsageCondition
Constructs a new KeyUsageCondition.- Parameters:
bit
- the key usagevalue
- the required value of the key usage bit
-
KeyUsageCondition
Constructs a new KeyUsageCondition.- Parameters:
usage
- the key usagevalue
- the required value of the key usage bit
-
-
Method Details
-
getBit
-
getValue
public final boolean getValue()Returns the required bit value of the key usage to be checked.- Returns:
- the required bit value of the key usage to be checked
-
check
Description copied from interface:Condition
Returns true if the condition is evaluated to true for the given certificate. -
toString
-
toString
-