X509Extension (Bouncy Castle Library 1.85 API Specification)
Date: 2026-07-12

org.bouncycastle.asn1.x509

## Class X509Extension

- java.lang.Object
- - org.bouncycastle.asn1.x509.X509Extension

- Deprecated.
  use Extension

      public class X509Extension
      extends java.lang.Object

  an object for the elements in the X.509 V3 extension block.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static ASN1ObjectIdentifier` | `auditIdentity` Deprecated. Audit identity extension in attribute certificates.
    `static ASN1ObjectIdentifier` | `authorityInfoAccess` Deprecated. Authority Info Access
    `static ASN1ObjectIdentifier` | `authorityKeyIdentifier` Deprecated. Authority Key Identifier
    `static ASN1ObjectIdentifier` | `basicConstraints` Deprecated. Basic Constraints
    `static ASN1ObjectIdentifier` | `biometricInfo` Deprecated. BiometricInfo
    `static ASN1ObjectIdentifier` | `certificateIssuer` Deprecated. Certificate Issuer
    `static ASN1ObjectIdentifier` | `certificatePolicies` Deprecated. Certificate Policies
    `static ASN1ObjectIdentifier` | `cRLDistributionPoints` Deprecated. CRL Distribution Points
    `static ASN1ObjectIdentifier` | `cRLNumber` Deprecated. CRL Number
    `static ASN1ObjectIdentifier` | `deltaCRLIndicator` Deprecated. Delta CRL indicator
    `static ASN1ObjectIdentifier` | `extendedKeyUsage` Deprecated. Extended Key Usage
    `static ASN1ObjectIdentifier` | `freshestCRL` Deprecated. Freshest CRL
    `static ASN1ObjectIdentifier` | `id_rdna_trustAnchorID` Deprecated. | `static ASN1ObjectIdentifier` | `inhibitAnyPolicy` Deprecated. Inhibit Any Policy
    `static ASN1ObjectIdentifier` | `instructionCode` Deprecated. Hold Instruction Code
    `static ASN1ObjectIdentifier` | `invalidityDate` Deprecated. Invalidity Date
    `static ASN1ObjectIdentifier` | `issuerAlternativeName` Deprecated. Issuer Alternative Name
    `static ASN1ObjectIdentifier` | `issuingDistributionPoint` Deprecated. Issuing Distribution Point
    `static ASN1ObjectIdentifier` | `keyUsage` Deprecated. Key Usage
    `static ASN1ObjectIdentifier` | `logoType` Deprecated. Logo Type
    `static ASN1ObjectIdentifier` | `nameConstraints` Deprecated. Name Constraints
    `static ASN1ObjectIdentifier` | `noRevAvail` Deprecated. NoRevAvail extension in attribute certificates.
    `static ASN1ObjectIdentifier` | `policyConstraints` Deprecated. Policy Constraints
    `static ASN1ObjectIdentifier` | `policyMappings` Deprecated. Policy Mappings
    `static ASN1ObjectIdentifier` | `privateKeyUsagePeriod` Deprecated. Private Key Usage Period
    `static ASN1ObjectIdentifier` | `qCStatements` Deprecated. QCStatements
    `static ASN1ObjectIdentifier` | `reasonCode` Deprecated. Reason code
    `static ASN1ObjectIdentifier` | `subjectAlternativeName` Deprecated. Subject Alternative Name
    `static ASN1ObjectIdentifier` | `subjectDirectoryAttributes` Deprecated. Subject Directory Attributes
    `static ASN1ObjectIdentifier` | `subjectInfoAccess` Deprecated. Subject Info Access
    `static ASN1ObjectIdentifier` | `subjectKeyIdentifier` Deprecated. Subject Key Identifier
    `static ASN1ObjectIdentifier` | `targetInformation` Deprecated. TargetInformation extension in attribute certificates.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `X509Extension(ASN1Boolean critical, ASN1OctetString value)` Deprecated.
    `X509Extension(boolean critical, ASN1OctetString value)` Deprecated.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ASN1Primitive` | `convertValueToObject(X509Extension ext)` Deprecated. Convert the value of the passed in extension to an object
    `boolean` | `equals(java.lang.Object o)` Deprecated.
    `ASN1Encodable` | `getParsedValue()` Deprecated.
    `ASN1OctetString` | `getValue()` Deprecated.
    `int` | `hashCode()` Deprecated.
    `boolean` | `isCritical()` Deprecated.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### subjectDirectoryAttributes

          public static final ASN1ObjectIdentifier subjectDirectoryAttributes

      Deprecated.
      Subject Directory Attributes

    - #### subjectKeyIdentifier

          public static final ASN1ObjectIdentifier subjectKeyIdentifier

      Deprecated.
      Subject Key Identifier

    - #### keyUsage

          public static final ASN1ObjectIdentifier keyUsage

      Deprecated.
      Key Usage

    - #### privateKeyUsagePeriod

          public static final ASN1ObjectIdentifier privateKeyUsagePeriod

      Deprecated.
      Private Key Usage Period

    - #### subjectAlternativeName

          public static final ASN1ObjectIdentifier subjectAlternativeName

      Deprecated.
      Subject Alternative Name

    - #### issuerAlternativeName

          public static final ASN1ObjectIdentifier issuerAlternativeName

      Deprecated.
      Issuer Alternative Name

    - #### basicConstraints

          public static final ASN1ObjectIdentifier basicConstraints

      Deprecated.
      Basic Constraints

    - #### cRLNumber

          public static final ASN1ObjectIdentifier cRLNumber

      Deprecated.
      CRL Number

    - #### reasonCode

          public static final ASN1ObjectIdentifier reasonCode

      Deprecated.
      Reason code

    - #### instructionCode

          public static final ASN1ObjectIdentifier instructionCode

      Deprecated.
      Hold Instruction Code

    - #### invalidityDate

          public static final ASN1ObjectIdentifier invalidityDate

      Deprecated.
      Invalidity Date

    - #### deltaCRLIndicator

          public static final ASN1ObjectIdentifier deltaCRLIndicator

      Deprecated.
      Delta CRL indicator

    - #### issuingDistributionPoint

          public static final ASN1ObjectIdentifier issuingDistributionPoint

      Deprecated.
      Issuing Distribution Point

    - #### certificateIssuer

          public static final ASN1ObjectIdentifier certificateIssuer

      Deprecated.
      Certificate Issuer

    - #### nameConstraints

          public static final ASN1ObjectIdentifier nameConstraints

      Deprecated.
      Name Constraints

    - #### cRLDistributionPoints

          public static final ASN1ObjectIdentifier cRLDistributionPoints

      Deprecated.
      CRL Distribution Points

    - #### certificatePolicies

          public static final ASN1ObjectIdentifier certificatePolicies

      Deprecated.
      Certificate Policies

    - #### policyMappings

          public static final ASN1ObjectIdentifier policyMappings

      Deprecated.
      Policy Mappings

    - #### authorityKeyIdentifier

          public static final ASN1ObjectIdentifier authorityKeyIdentifier

      Deprecated.
      Authority Key Identifier

    - #### policyConstraints

          public static final ASN1ObjectIdentifier policyConstraints

      Deprecated.
      Policy Constraints

    - #### extendedKeyUsage

          public static final ASN1ObjectIdentifier extendedKeyUsage

      Deprecated.
      Extended Key Usage

    - #### freshestCRL

          public static final ASN1ObjectIdentifier freshestCRL

      Deprecated.
      Freshest CRL

    - #### inhibitAnyPolicy

          public static final ASN1ObjectIdentifier inhibitAnyPolicy

      Deprecated.
      Inhibit Any Policy

    - #### authorityInfoAccess

          public static final ASN1ObjectIdentifier authorityInfoAccess

      Deprecated.
      Authority Info Access

    - #### subjectInfoAccess

          public static final ASN1ObjectIdentifier subjectInfoAccess

      Deprecated.
      Subject Info Access

    - #### logoType

          public static final ASN1ObjectIdentifier logoType

      Deprecated.
      Logo Type

    - #### biometricInfo

          public static final ASN1ObjectIdentifier biometricInfo

      Deprecated.
      BiometricInfo

    - #### qCStatements

          public static final ASN1ObjectIdentifier qCStatements

      Deprecated.
      QCStatements

    - #### auditIdentity

          public static final ASN1ObjectIdentifier auditIdentity

      Deprecated.
      Audit identity extension in attribute certificates.

    - #### id_rdna_trustAnchorID

          public static final ASN1ObjectIdentifier id_rdna_trustAnchorID

      Deprecated.

      - #### noRevAvail

            public static final ASN1ObjectIdentifier noRevAvail

        Deprecated.
        NoRevAvail extension in attribute certificates.

      - #### targetInformation

            public static final ASN1ObjectIdentifier targetInformation

        Deprecated.
        TargetInformation extension in attribute certificates.

    - ### Constructor Detail

      - #### X509Extension

            public X509Extension(ASN1Boolean critical,
                                 ASN1OctetString value)

        Deprecated.

      - #### X509Extension

            public X509Extension(boolean critical,
                                 ASN1OctetString value)

        Deprecated.

    - ### Method Detail

      - #### isCritical

            public boolean isCritical()

        Deprecated.

      - #### getValue

            public ASN1OctetString getValue()

        Deprecated.

      - #### getParsedValue

            public ASN1Encodable getParsedValue()

        Deprecated.

      - #### hashCode

            public int hashCode()

        Deprecated.
        Overrides:
          `hashCode` in class `java.lang.Object`

      - #### equals

            public boolean equals(java.lang.Object o)

        Deprecated.
        Overrides:
          `equals` in class `java.lang.Object`

      - #### convertValueToObject

            public static ASN1Primitive convertValueToObject(X509Extension ext)
                                                      throws java.lang.IllegalArgumentException

        Deprecated.
        Convert the value of the passed in extension to an object
        Parameters:
          `ext` - the extension to parse
        Returns:
          the object the value string contains
        Throws:
          `java.lang.IllegalArgumentException` - if conversion is not possible