public class X509BasicConstraints extends AbstractX509Extension
http://tools.ietf.org/html/rfc5280
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
IDENTIFIER |
private boolean |
m_cA
true if the certificate belongs to a CA |
private int |
m_pathLenConstraint
the maximal length of a certification path build from this cert to an end
entity
|
Constructor and Description |
---|
X509BasicConstraints(mybouncycastle.org.bouncycastle.asn1.ASN1Sequence a_extension)
Creates an new X509BasicConstraints object from a BouncyCastle
ASN1Sequence
|
X509BasicConstraints(boolean cA)
Creates a new X509BasicConstrains objects with the specified value for
cA.
|
X509BasicConstraints(int pathLenConstraint)
Creates a new X509BasicConstrains objects with pathLength limited to the
specified value.
|
Modifier and Type | Method and Description |
---|---|
private static byte[] |
createDEROctets(boolean cA)
Generates the DEROctets of this extension to hand over to the super
class.
|
private static byte[] |
createDEROctets(int pathLenConstraint)
Generates the DEROctets of this extension to hand over to the super
class.
|
private void |
createValue()
Instantiates a new BouncyCastle BasicConstraints from the DEROctets of
this extension and extracts the cA and pathLenConstraint values.
|
java.lang.String |
getName()
Returns the human-readable name of this extension.
|
int |
getPathLengthConstraint() |
java.util.Vector |
getValues()
This method returns all values of this extension in separated String objects.
|
boolean |
isCA() |
equals, getBCExtension, getDEROctets, getIdentifier, getInstance, hashCode, isCritical, toString
public static final java.lang.String IDENTIFIER
private boolean m_cA
true
if the certificate belongs to a CAprivate int m_pathLenConstraint
public X509BasicConstraints(boolean cA)
cA
- indicates if the certificate belongs to a CA.public X509BasicConstraints(int pathLenConstraint)
true
if a
pathLength is specified. This Extension is by default set to non-critical
according to RFC 5280.pathLenConstraint
- the maximum length of a certification Pathpublic X509BasicConstraints(mybouncycastle.org.bouncycastle.asn1.ASN1Sequence a_extension)
a_extension
- the extions as ASN1Sequenceprivate static byte[] createDEROctets(int pathLenConstraint)
pathLenConstraint
- the maximum length of a certification Pathprivate static byte[] createDEROctets(boolean cA)
cA
- indicates if the certificate belongs to a CA.private void createValue()
public boolean isCA()
public int getPathLengthConstraint()
public java.lang.String getName()
AbstractX509Extension
getName
in class AbstractX509Extension
public java.util.Vector getValues()
AbstractX509Extension
getValues
in class AbstractX509Extension
Copyright © 2023. All rights reserved.