Skip navigation links

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

E10674-01


oracle.security.crypto.cert.ext
Class ExtKeyUsageExtension

java.lang.Object
  extended by oracle.security.crypto.cert.X509Extension
      extended by oracle.security.crypto.cert.ext.ExtKeyUsageExtension

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

public class ExtKeyUsageExtension
extends X509Extension

Represents the extended key usage extension for certificates from RFC 2459.

See Also:
Serialized Form

Field Summary

 

Fields inherited from class oracle.security.crypto.cert.X509Extension
id_netscape_ce, id_netscape_ce_type, id_set_ce, id_set_ce_type, isDecoded

 

Constructor Summary
ExtKeyUsageExtension()
          Create a new extension with the appropriate OID type.
ExtKeyUsageExtension(oracle.security.crypto.asn1.ASN1ObjectID keyPurpose)
          Creates a new extension with the given key purpose OID.
ExtKeyUsageExtension(oracle.security.crypto.asn1.ASN1ObjectID keyPurpose, boolean critical)
          Creates a new extension with the given key purpose OID and critical value.
ExtKeyUsageExtension(java.io.InputStream is)
           
ExtKeyUsageExtension(java.util.Vector keyPurposes, boolean critical)
          Creates a new extension with the given vector of key purpose OIDs and critical value.

 

Method Summary
 void addKeyPurpose(oracle.security.crypto.asn1.ASN1ObjectID keyPurpose)
          Adds a key purpose OID to this extension.
 java.util.Enumeration getKeyPurposes()
          Gets the key purpose OIDs.
 boolean hasKeyPurpose(oracle.security.crypto.asn1.ASN1ObjectID keyPurpose)
          Returns true if this extension has the given key purpose OID set, otherwise returns false.
 java.lang.String toString()
          Returns a string representation of this object.

 

Methods inherited from class oracle.security.crypto.cert.X509Extension
getCritical, getType, getValue, input, inputInstance, isRecognized, length, output, readExternal, setCritical, setValue, writeExternal

 

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

 

Constructor Detail

ExtKeyUsageExtension

public ExtKeyUsageExtension()
Create a new extension with the appropriate OID type.

Note: An object created using this constructor may not be in a valid state. This constructor is intended primarily for use in conjunction with the X509Extension.input(java.io.InputStream) method.


ExtKeyUsageExtension

public ExtKeyUsageExtension(oracle.security.crypto.asn1.ASN1ObjectID keyPurpose)
Creates a new extension with the given key purpose OID. Extension is non-critical.
Parameters:
keyPurpose - The key purpose OID.

ExtKeyUsageExtension

public ExtKeyUsageExtension(oracle.security.crypto.asn1.ASN1ObjectID keyPurpose,
                            boolean critical)
Creates a new extension with the given key purpose OID and critical value.
Parameters:
keyPurpose - The key purpose OID.
critical - true if this extension is critical, false otherwise.

ExtKeyUsageExtension

public ExtKeyUsageExtension(java.util.Vector keyPurposes,
                            boolean critical)
Creates a new extension with the given vector of key purpose OIDs and critical value.
Parameters:
keyPurposes - A Vector of ASN1ObjectIDs.
critical - true if this extension is critical, false otherwise.

ExtKeyUsageExtension

public ExtKeyUsageExtension(java.io.InputStream is)
                     throws java.io.IOException
Throws:
java.io.IOException

Method Detail

addKeyPurpose

public void addKeyPurpose(oracle.security.crypto.asn1.ASN1ObjectID keyPurpose)
Adds a key purpose OID to this extension.
Parameters:
keyPurpose - The OID of the key purpose.

getKeyPurposes

public java.util.Enumeration getKeyPurposes()
Gets the key purpose OIDs.
Returns:
An Enumeration of ASN1ObjectIDs.

hasKeyPurpose

public boolean hasKeyPurpose(oracle.security.crypto.asn1.ASN1ObjectID keyPurpose)
Returns true if this extension has the given key purpose OID set, otherwise returns false.
Parameters:
keyPurpose - The OID of the key purpose to test.

toString

public java.lang.String toString()
Description copied from class: X509Extension
Returns a string representation of this object.
Overrides:
toString in class X509Extension
Returns:
a string representation

Skip navigation links

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

E10674-01


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