Class BasicConstraints

java.lang.Object
org.bouncycastle.asn1.ASN1Object
org.bouncycastle.asn1.x509.BasicConstraints
All Implemented Interfaces:
ASN1Encodable

public class BasicConstraints
extends ASN1Object
  • Constructor Details

    • BasicConstraints

      public BasicConstraints​(boolean cA)
    • BasicConstraints

      public BasicConstraints​(int pathLenConstraint)
      create a cA=true object for the given path length constraint.
      Parameters:
      pathLenConstraint -
  • Method Details

    • getInstance

      public static BasicConstraints getInstance​(ASN1TaggedObject obj, boolean explicit)
    • getInstance

      public static BasicConstraints getInstance​(Object obj)
    • fromExtensions

      public static BasicConstraints fromExtensions​(Extensions extensions)
    • isCA

      public boolean isCA()
    • getPathLenConstraint

      public BigInteger getPathLenConstraint()
    • toASN1Primitive

      public ASN1Primitive toASN1Primitive()
      Produce an object suitable for an ASN1OutputStream.
       BasicConstraints := SEQUENCE {
          cA                  BOOLEAN DEFAULT FALSE,
          pathLenConstraint   INTEGER (0..MAX) OPTIONAL
       }
       
      Specified by:
      toASN1Primitive in interface ASN1Encodable
      Specified by:
      toASN1Primitive in class ASN1Object
    • toString

      public String toString()
      Description copied from class: Object
      Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
         getClass().getName() + '@' + Integer.toHexString(hashCode())

      See Writing a useful toString method if you intend implementing your own toString method.

      Overrides:
      toString in class Object
      Returns:
      a printable representation of this object.