CertificatePolicies (Bouncy Castle Library 1.52 API Specification)

org.bouncycastle.asn1.x509

## Class CertificatePolicies

- java.lang.Object
- - org.bouncycastle.asn1.ASN1Object
  - - org.bouncycastle.asn1.x509.CertificatePolicies

- All Implemented Interfaces:
    ASN1Encodable, Encodable

      public class CertificatePolicies
      extends ASN1Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CertificatePolicies(PolicyInformation name)` Construct a CertificatePolicies object containing one PolicyInformation.
    `CertificatePolicies(PolicyInformation[] policyInformation)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static CertificatePolicies` | `fromExtensions(Extensions extensions)` Retrieve a CertificatePolicies for a passed in Extensions object, if present.
    `static CertificatePolicies` | `getInstance(ASN1TaggedObject obj, boolean explicit)`
    `static CertificatePolicies` | `getInstance(java.lang.Object obj)`
    `PolicyInformation[]` | `getPolicyInformation()`
    `PolicyInformation` | `getPolicyInformation(ASN1ObjectIdentifier policyIdentifier)`
    `ASN1Primitive` | `toASN1Primitive()` Produce an object suitable for an ASN1OutputStream.
    `java.lang.String` | `toString()`

    - ### Methods inherited from class org.bouncycastle.asn1.ASN1Object

      `equals, getEncoded, getEncoded, hasEncodedTagValue, hashCode, toASN1Object`

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

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

- - ### Constructor Detail

    - #### CertificatePolicies

          public CertificatePolicies(PolicyInformation name)

      Construct a CertificatePolicies object containing one PolicyInformation.
      Parameters:
        `name` - the name to be contained.

    - #### CertificatePolicies

          public CertificatePolicies(PolicyInformation[] policyInformation)

  - ### Method Detail

    - #### getInstance

          public static CertificatePolicies getInstance(java.lang.Object obj)

    - #### getInstance

          public static CertificatePolicies getInstance(ASN1TaggedObject obj,
                                        boolean explicit)

    - #### fromExtensions

          public static CertificatePolicies fromExtensions(Extensions extensions)

      Retrieve a CertificatePolicies for a passed in Extensions object, if present.
      Parameters:
        `extensions` - the extensions object to be examined.
      Returns:
        the CertificatePolicies, null if the extension is not present.

    - #### getPolicyInformation

          public PolicyInformation[] getPolicyInformation()

    - #### getPolicyInformation

          public PolicyInformation getPolicyInformation(ASN1ObjectIdentifier policyIdentifier)

    - #### toASN1Primitive

          public ASN1Primitive toASN1Primitive()

      Produce an object suitable for an ASN1OutputStream.

           CertificatePolicies ::= SEQUENCE SIZE {1..MAX} OF PolicyInformation

      Specified by:
        `toASN1Primitive` in interface `ASN1Encodable`
      Specified by:
        `toASN1Primitive` in class `ASN1Object`
      Returns:
        a primitive representation of this object.

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`