Class ExtendedKeyUsageCondition

java.lang.Object
eu.europa.esig.dss.tsl.dto.condition.ExtendedKeyUsageCondition
All Implemented Interfaces:
Condition, Serializable

public class ExtendedKeyUsageCondition extends Object implements Condition
ExtendedKeyUsage Presence: This field is optional. Description: It provides a non empty list of key purposes values to match with the correspondent KeyPurposes present in the ExtendedKeyUsage certificate Extension. The assertion is verified if the ExtendedKeyUsage Extension is present in the certificate and all key purposes provided are present in the certificate ExtendedKeyUsage Extension. Format: A non-empty sequence of KeyPurposes, whose semantic shall be as defined in X.509 [1] for the ExtendedKeyUsage Extension. For the formal definition see ExtendedKeyUsage element in the schema referenced by clause C.2 (point 3).
See Also:
  • Constructor Details

    • ExtendedKeyUsageCondition

      public ExtendedKeyUsageCondition(List<String> oids)
      Default constructor
      Parameters:
      oids - a list of extended key usages to check
  • Method Details

    • getKeyPurposeIds

      public final List<String> getKeyPurposeIds()
      Returns the list key purpose IDs to be checked against the certificate’s extended key usage extension.
      Returns:
      an unmodifiable list, possibly empty; never null
    • check

      public boolean check(CertificateToken certificateToken)
      Description copied from interface: Condition
      Returns true if the condition is evaluated to true for the given certificate.
      Specified by:
      check in interface Condition
      Parameters:
      certificateToken - CertificateToken to be checked
      Returns:
      true if the condition is filled
    • toString

      public String toString(String indent)
      Description copied from interface: Condition
      Returns a string representation of the condition
      Specified by:
      toString in interface Condition
      Parameters:
      indent - the indentation to be used
      Returns:
      a human readable condition
    • toString

      public String toString()
      Overrides:
      toString in class Object