Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools Security Engine Java API Reference 10g Release 3 (10.1.3) B25381-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.security.crypto.cert
Class X509PolicyInformation

`java.lang.Object
oracle.security.crypto.cert.X509PolicyInformation`

All Implemented Interfaces:
  oracle.security.crypto.asn1.ASN1Object, oracle.security.crypto.util.Streamable

public class X509PolicyInformation
extends java.lang.Object
implements oracle.security.crypto.asn1.ASN1Object

A class that represents the X.509v3 `PolicyInformation` data type. The X.509v3 `CertificatePolicies` extension consists of a sequence of such objects. Each instance consists of an ID which identifies the policy, and one or more policy qualifiers.

See Also:
  `X509`, `X509Extension`, `PKIX`, `oracle.security.crypto.cert.extension.CertificatePoliciesExtension`

Constructor Summary
`X509PolicyInformation()` Creates a new, empty policy information object.
`X509PolicyInformation(oracle.security.crypto.asn1.ASN1ObjectID id)` Creates a new policy information object, with the given ID, and no policy qualifiers.
`X509PolicyInformation(oracle.security.crypto.asn1.ASN1ObjectID id, java.util.Vector policyQualifiers)` Creates a new policy information object, with the given ID and policy qualifiers.
`X509PolicyInformation(java.io.InputStream is)`

Method Summary
`void` | `addCPSPointer(java.lang.String uri)` Add a Certificate Practice Statement (CPS Pointer) policy qualifier with the given URI to this certificate policy.
`void` | `addPolicyQualifier(oracle.security.crypto.asn1.ASN1ObjectID qualifierID, oracle.security.crypto.asn1.ASN1Object qualifier)` Add a policy qualifier to this certificate policy.
`void` | `addUserNotice(java.lang.String organization, int[] noticeNumbers, java.lang.String explicitText)` Add a User Notice policy qualifier to this certificate policy.
`oracle.security.crypto.asn1.ASN1ObjectID` | `getID()` Returns the policy ID.
`java.util.Vector` | `getPolicyQualifiers()` Returns a `Vector` containing the policy qualifiers, or `null` if none are defined.
`void` | `input(java.io.InputStream is)` Read from the specified input stream.
`int` | `length()` Returns length of ASN.1 encoding.
`void` | `output(java.io.OutputStream os)` Output to the specified output stream.
`java.lang.String` | `toString()` Returns a string representation of this object.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### X509PolicyInformation

    public X509PolicyInformation()

  Creates a new, empty policy information object. This constructor is intended primarily for use in conjunction with the `input(java.io.InputStream)` method.

### X509PolicyInformation

    public X509PolicyInformation(oracle.security.crypto.asn1.ASN1ObjectID id)

  Creates a new policy information object, with the given ID, and no policy qualifiers.

### X509PolicyInformation

    public X509PolicyInformation(oracle.security.crypto.asn1.ASN1ObjectID id,
                                 java.util.Vector policyQualifiers)

  Creates a new policy information object, with the given ID and policy qualifiers.

### X509PolicyInformation

    public X509PolicyInformation(java.io.InputStream is)
                          throws java.io.IOException

Method Detail

### addPolicyQualifier

    public void addPolicyQualifier(oracle.security.crypto.asn1.ASN1ObjectID qualifierID,
                                   oracle.security.crypto.asn1.ASN1Object qualifier)

  Add a policy qualifier to this certificate policy.

  Note: If this `X509PolicyInformation` is the special policy `PKIX.anyPolicy`, the qualifier must be one of `PKIX.id_qt_cps` or `PKIX.id_qt_unotice`.

  Parameters:
    `qualifierID` - The OID identifying the policy qualifier.
    `qualifier` - The value of the policy qualifier.
  See Also:
    `addCPSPointer(java.lang.String)`, `addUserNotice(java.lang.String, int[], java.lang.String)`

### addCPSPointer

    public void addCPSPointer(java.lang.String uri)

  Add a Certificate Practice Statement (CPS Pointer) policy qualifier with the given URI to this certificate policy.

### addUserNotice

    public void addUserNotice(java.lang.String organization,
                              int[] noticeNumbers,
                              java.lang.String explicitText)

  Add a User Notice policy qualifier to this certificate policy.

  Both `organization` and `noticeNumbers` may be `null`, but not one of them; `explicitText` may be `null`.

  Note that RFC-2459 specifies a limit of 200 characters for `organization` and `explicitText`.

### getID

    public oracle.security.crypto.asn1.ASN1ObjectID getID()

  Returns the policy ID.

### getPolicyQualifiers

    public java.util.Vector getPolicyQualifiers()

  Returns a `Vector` containing the policy qualifiers, or `null` if none are defined.

### input

    public void input(java.io.InputStream is)
               throws java.io.IOException

  Read from the specified input stream.
  Specified by:
    `input` in interface `oracle.security.crypto.util.Streamable`
  Throws:
    `java.io.IOException`

### output

    public void output(java.io.OutputStream os)
                throws java.io.IOException

  Output to the specified output stream.
  Specified by:
    `output` in interface `oracle.security.crypto.util.Streamable`
  Throws:
    `java.io.IOException`

### length

    public int length()

  Returns length of ASN.1 encoding.
  Specified by:
    `length` in interface `oracle.security.crypto.util.Streamable`

### toString

    public java.lang.String toString()

  Returns a string representation of this object.
  Returns:
    a string representation of this object

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools Security Engine Java API Reference 10g Release 3 (10.1.3) B25381-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005, 2006 , Oracle. All rights reserved.