Skip navigation links

Oracle Fusion Middleware Security Engine Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10674-04


oracle.security.crypto.cert
Class X509PolicyInformation

java.lang.Object
  extended by oracle.security.crypto.cert.X509PolicyInformation

All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, oracle.security.crypto.asn1.ASN1Object, oracle.security.crypto.util.Streamable

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

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, CertificatePoliciesExtension, Serialized Form

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.List<oracle.security.crypto.asn1.ASN1Object> policyQualifiers)
          Creates a new policy information object, with the given ID and policy qualifiers.
X509PolicyInformation(oracle.security.crypto.asn1.ASN1ObjectID id, java.util.Vector<oracle.security.crypto.asn1.ASN1Object> policyQualifiers)
          Deprecated. Use X509PolicyInformation(ASN1ObjectID, List)
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<oracle.security.crypto.asn1.ASN1Object> getPolicyQualifiers()
          Deprecated. 
 java.util.ArrayList<oracle.security.crypto.asn1.ASN1Object> getPolicyQualifiersAsList()
          Returns a List 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.
 void readExternal(java.io.ObjectInput is)
           
 java.lang.String toString()
          Returns a string representation of this object.
 void writeExternal(java.io.ObjectOutput os)
           

 

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<oracle.security.crypto.asn1.ASN1Object> policyQualifiers)
Deprecated. Use X509PolicyInformation(ASN1ObjectID, List)
Creates a new policy information object, with the given ID and policy qualifiers.

X509PolicyInformation

public X509PolicyInformation(oracle.security.crypto.asn1.ASN1ObjectID id,
                             java.util.List<oracle.security.crypto.asn1.ASN1Object> 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
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

@Deprecated
public java.util.Vector<oracle.security.crypto.asn1.ASN1Object> getPolicyQualifiers()
Deprecated. 
Returns a Vector containing the policy qualifiers, or null if none are defined.

getPolicyQualifiersAsList

public java.util.ArrayList<oracle.security.crypto.asn1.ASN1Object> getPolicyQualifiersAsList()
Returns a List 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.
Overrides:
toString in class java.lang.Object
Returns:
a string representation of this object

writeExternal

public void writeExternal(java.io.ObjectOutput os)
                   throws java.io.IOException
Specified by:
writeExternal in interface java.io.Externalizable
Throws:
java.io.IOException

readExternal

public void readExternal(java.io.ObjectInput is)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Specified by:
readExternal in interface java.io.Externalizable
Throws:
java.io.IOException
java.lang.ClassNotFoundException

Skip navigation links

Oracle Fusion Middleware Security Engine Java API Reference for Oracle Security Developer Tools
11g Release 1 (11.1.1)

E10674-04


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