Methods Summary |
---|
public static org.bouncycastle.asn1.x509.BasicConstraints | getInstance(org.bouncycastle.asn1.ASN1TaggedObject obj, boolean explicit)
return getInstance(ASN1Sequence.getInstance(obj, explicit));
|
public static org.bouncycastle.asn1.x509.BasicConstraints | getInstance(java.lang.Object obj)
if (obj == null || obj instanceof BasicConstraints)
{
return (BasicConstraints)obj;
}
else if (obj instanceof ASN1Sequence)
{
return new BasicConstraints((ASN1Sequence)obj);
}
throw new IllegalArgumentException("unknown object in factory");
|
public java.math.BigInteger | getPathLenConstraint()
if (pathLenConstraint != null)
{
return pathLenConstraint.getValue();
}
return null;
|
public boolean | isCA()
return (cA != null) && cA.isTrue();
|
public org.bouncycastle.asn1.DERObject | toASN1Object()Produce an object suitable for an ASN1OutputStream.
BasicConstraints := SEQUENCE {
cA BOOLEAN DEFAULT FALSE,
pathLenConstraint INTEGER (0..MAX) OPTIONAL
}
ASN1EncodableVector v = new ASN1EncodableVector();
if (cA != null)
{
v.add(cA);
if (pathLenConstraint != null)
{
v.add(pathLenConstraint);
}
}
return new DERSequence(v);
|
public java.lang.String | toString()
if (pathLenConstraint == null)
{
if (cA == null)
{
return "BasicConstraints: isCa(false)";
}
return "BasicConstraints: isCa(" + this.isCA() + ")";
}
return "BasicConstraints: isCa(" + this.isCA() + "), pathLenConstraint = " + pathLenConstraint.getValue();
|