Class CertificateExtension

java.lang.Object
eu.europa.esig.dss.model.x509.extension.CertificateExtension
All Implemented Interfaces:
OidBasedEnum, OidDescription, Serializable
Direct Known Subclasses:
AuthorityInformationAccess, AuthorityKeyIdentifier, BasicConstraints, CertificatePolicies, CRLDistributionPoints, ExtendedKeyUsages, InhibitAnyPolicy, KeyUsage, NameConstraints, OCSPNoCheck, PolicyConstraints, QcStatements, SubjectAlternativeNames, SubjectKeyIdentifier, ValidityAssuredShortTerm

public class CertificateExtension extends Object implements OidDescription
Abstract implementation of a certificate extension
See Also:
  • Constructor Details

    • CertificateExtension

      public CertificateExtension(String oid)
      Constructor with a certificate extension OID
      Parameters:
      oid - String certificate extension OID
    • CertificateExtension

      public CertificateExtension(CertificateExtensionEnum certificateExtensionEnum)
      Constructor from a CertificateExtensionEnum
      Parameters:
      certificateExtensionEnum - CertificateExtensionEnum
  • Method Details

    • getOid

      public String getOid()
      Description copied from interface: OidBasedEnum
      This method returns the OID value
      Specified by:
      getOid in interface OidBasedEnum
      Returns:
      the OID value
    • getDescription

      public String getDescription()
      Description copied from interface: OidDescription
      This method returns the literal description of the OID
      Specified by:
      getDescription in interface OidDescription
      Returns:
      the OID description
    • isCritical

      public boolean isCritical()
      Returns whether the certificate extension is critical or not
      Returns:
      TRUE if the certificate extension is critical, FALSE otherwise
    • checkCritical

      public void checkCritical(CertificateToken certificateToken)
      Checks and sets whether the certificate extension is critical
      Parameters:
      certificateToken - CertificateToken to check
    • getOctets

      public byte[] getOctets()
      Returns DER-encoded octets of the certificate extension
      Returns:
      byte array containing DER-encoded octets of the certificate extension
    • setOctets

      public void setOctets(byte[] octets)
      Sets DER-encoded octets of the certificate extension
      Parameters:
      octets - byte array containing DER-encoded octets of the certificate extension