edu.vt.middleware.crypt.x509.types
Class BasicConstraints

java.lang.Object
  extended by edu.vt.middleware.crypt.x509.types.BasicConstraints

public class BasicConstraints
extends Object

Representation of the BasicConstraints type defined in section 4.2.1.10 of RFC 2459.

Version:
$Revision: 427 $
Author:
Middleware Services

Constructor Summary
BasicConstraints(boolean isCA)
          Creates a new instance with no path length constraint.
BasicConstraints(boolean isCA, int maxPathLength)
          Creates a new instance with the given path length constraint.
 
Method Summary
 boolean equals(Object obj)
          
 Integer getPathLengthConstraint()
           
 int hashCode()
          
 boolean isCA()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BasicConstraints

public BasicConstraints(boolean isCA)
Creates a new instance with no path length constraint.

Parameters:
isCA - Whether or not this is a CA certificate.

BasicConstraints

public BasicConstraints(boolean isCA,
                        int maxPathLength)
Creates a new instance with the given path length constraint.

Parameters:
isCA - Whether or not this is a CA certificate.
maxPathLength - Maximum number of CA certificates that may follow this one.
Method Detail

isCA

public boolean isCA()
Returns:
True if the basic constraint identifies itself as a CA certificate, false otherwise. Note that RFC 2459 indicates this field MUST BE true for a CA certificate, but that the extension SHOULD NOT be present for an end-user certificate.

getPathLengthConstraint

public Integer getPathLengthConstraint()
Returns:
The maximum number of CA certificates that may follow this one in the certificate chain or null if no path length constraints are defined.

toString

public String toString()
Overrides:
toString in class Object
Returns:
String representation containing the CA and PathLengthConstraint fields.

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object


Copyright © 2003-2011 Virginia Tech. All Rights Reserved.