public class BasicConstraintsExtension extends 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.
The ASN.1 syntax for this extension is:
BasicConstraints ::= SEQUENCE {
cA BOOLEAN DEFAULT FALSE,
pathLenConstraint INTEGER (0..MAX) OPTIONAL
}
Extension| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
NAME |
critical, extensionId, extensionValue| Constructor and Description |
|---|
BasicConstraintsExtension(java.lang.Boolean critical,
boolean ca,
int len)
Constructor for this object with specified criticality.
|
BasicConstraintsExtension(boolean ca,
int len)
Default constructor for this object.
|
BasicConstraintsExtension(java.lang.Boolean critical,
java.lang.Object value)
Create the extension from the passed DER encoded value of the same.
|
| Modifier and Type | Method and Description |
|---|---|
void |
encode(com.tencent.kona.sun.security.util.DerOutputStream out)
Encode this extension value to the output stream.
|
java.lang.String |
getName()
Return the name of this extension.
|
int |
getPathLen() |
boolean |
isCa() |
java.lang.String |
toString()
Return user readable form of extension.
|
encode, equals, getExtensionId, getExtensionValue, getId, getValue, hashCode, isCritical, newExtensionpublic static final java.lang.String NAME
public BasicConstraintsExtension(boolean ca,
int len)
ca - true, if the subject of the Certificate is a CA.len - specifies the depth of the certification path.public BasicConstraintsExtension(java.lang.Boolean critical,
boolean ca,
int len)
critical - true, if the extension should be marked criticalca - true, if the subject of the Certificate is a CA.len - specifies the depth of the certification path.public BasicConstraintsExtension(java.lang.Boolean critical,
java.lang.Object value)
throws java.io.IOException
critical - flag indicating if extension is critical or notvalue - an array containing the DER encoded bytes of the extension.java.lang.ClassCastException - if value is not an array of bytesjava.io.IOException - on error.