Skip navigation links

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

E10674-03


oracle.security.crypto.cert.ext
Class BasicConstraintsExtension

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

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

public class BasicConstraintsExtension
extends X509Extension

Represents the Basic Constraints certificate extension from RFC 2459. This extension MUST be critical in CA certificates, and MAY be critical in end-entity certificates.

The path length constraint only makes sense if the CA flag is true. The default value for path length is null, indicating no limit on the number of following certificates in a chain. A value of 0 indicates that only an end-entity certificate may follow the certificate having this extension. Non-null values must be non-negative.

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
BasicConstraintsExtension()
          Create a new extension with the appropriate OID type.
BasicConstraintsExtension(java.math.BigInteger pathLen)
          Creates a new extension with CA flag true and the specified path length.
BasicConstraintsExtension(java.math.BigInteger pathLen, boolean critical)
          Creates a new extension with CA flag true and the specified path length.
BasicConstraintsExtension(boolean ca)
          Creates a new extension with the specified CA flag.
BasicConstraintsExtension(boolean ca, boolean critical)
          Creates a new extension with the specified CA flag.
BasicConstraintsExtension(java.io.InputStream is)
           

 

Method Summary
 boolean getCA()
          Gets the CA flag.
 java.math.BigInteger getPathLen()
          Gets the path length constraint.
 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

BasicConstraintsExtension

public BasicConstraintsExtension()
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.


BasicConstraintsExtension

public BasicConstraintsExtension(boolean ca)
Creates a new extension with the specified CA flag. Extension is critical.
Parameters:
ca - true to mark this certificate as a CA.

BasicConstraintsExtension

public BasicConstraintsExtension(boolean ca,
                                 boolean critical)
Creates a new extension with the specified CA flag.
Parameters:
ca - true to mark this certificate as a CA.
critical - true if this extension is critical, false otherwise.

BasicConstraintsExtension

public BasicConstraintsExtension(java.math.BigInteger pathLen)
Creates a new extension with CA flag true and the specified path length. Extension is critical.
Parameters:
pathLen - The allowed length of the certificate chain following the certificate having this extension. A value of null means unlimited, 0 means only an end-entity certificate may follow. Non-null values must be non-negative.

BasicConstraintsExtension

public BasicConstraintsExtension(java.math.BigInteger pathLen,
                                 boolean critical)
Creates a new extension with CA flag true and the specified path length.
Parameters:
pathLen - The allowed length of the certificate chain following the certificate having this extension. A value of null means unlimited, 0 means only an end-entity certificate may follow. Non-null values must be non-negative.
critical - true if this extension is critical, false otherwise.

BasicConstraintsExtension

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

Method Detail

getCA

public boolean getCA()
Gets the CA flag.

getPathLen

public java.math.BigInteger getPathLen()
Gets the path length constraint.
Returns:
the BigInteger path length, or null if none is defined.

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-03


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