All Packages Class Hierarchy This Package Previous Next Index
Class iaik.x509.extensions.BasicConstraints
java.lang.Object
|
+----iaik.x509.V3Extension
|
+----iaik.x509.extensions.BasicConstraints
- public class BasicConstraints
- extends V3Extension
This class implements the BasicConstraints Extension.
The basic constraints extension identifies whether the subject of the
certificate is a CA and how deep a certification path may exist
through that CA. This profile requires the use of this extension,
and it shall be critical for all certificates issued to CAs.
-
BasicConstraints()
- Default constructor.
-
BasicConstraints(boolean)
- Creates a new BasicConstraints extension.
-
BasicConstraints(boolean, int)
- Creates a new BasicConstraints extension.
-
ca()
- Returns true if the subject is a CA.
-
getObjectID()
- Returns the object ID of this extension
-
getPathLenConstraint()
- Returns the pathLenConstraint value.
-
hashCode()
- Returns a hashcode for this identity.
-
init(ASN1Object)
- Inits this implementation of an extension with an ASN1Object.
-
setCa(boolean)
- Sets the cA value, true if the subject is a CA.
-
setPathLenConstraint(int)
- Sets the pathLenConstraint value.
-
toASN1Object()
- Returns the value of this extension as ASN1Object.
-
toString()
- Returns a string that represents the contents of the extensions.
BasicConstraints
public BasicConstraints()
- Default constructor. Creates an empty object.
BasicConstraints
public BasicConstraints(boolean ca,
int plc)
- Creates a new BasicConstraints extension.
- Parameters:
- ca - is the subject a CA
- plc - how deep a certification path may exist
BasicConstraints
public BasicConstraints(boolean ca)
- Creates a new BasicConstraints extension.
- Parameters:
- ca - is the subject a CA
getObjectID
public ObjectID getObjectID()
- Returns the object ID of this extension
- Returns:
- the object ID
- Overrides:
- getObjectID in class V3Extension
init
public void init(ASN1Object obj) throws ExtensionException
- Inits this implementation of an extension with an ASN1Object.
The ASN1Object is the extensionValue from ASN.1 type "Extension".
The ASN1Object is the one created by toASN1Object().
- Parameters:
- obj - the extensionValue as ASN1Object
- Throws: ExtensionException
- if the extension could not be parsed
- Overrides:
- init in class V3Extension
- See Also:
- toASN1Object
toASN1Object
public ASN1Object toASN1Object() throws ExtensionException
- Returns the value of this extension as ASN1Object.
The ASN1Object is the extensionValue from ASN.1 type "Extension".
The created ASN1Object is same, which is the parameter to
method init.
- Returns:
- the value of the extension as ASN1Object
- Throws: ExtensionException
- if the extension could not be created
- Overrides:
- toASN1Object in class V3Extension
- See Also:
- init
setPathLenConstraint
public void setPathLenConstraint(int plc)
- Sets the pathLenConstraint value.
- Parameters:
- plc - the pathLenConstraint value
setCa
public void setCa(boolean ca)
- Sets the cA value, true if the subject is a CA.
- Parameters:
- ca - the cA value, true if the subject is a CA
getPathLenConstraint
public int getPathLenConstraint()
- Returns the pathLenConstraint value.
- Returns:
- the pathLenConstraint value
ca
public boolean ca()
- Returns true if the subject is a CA.
- Returns:
- true if the subject is a CA
hashCode
public int hashCode()
- Returns a hashcode for this identity.
- Returns:
- a hash code for this identity
- Overrides:
- hashCode in class V3Extension
toString
public String toString()
- Returns a string that represents the contents of the extensions.
- Returns:
- the string representation
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index