Class GeneralSubtree

  • All Implemented Interfaces:
    ASN1Encodable, Encodable

    public class GeneralSubtree
    extends ASN1Object
    Class for containing a restriction object subtrees in NameConstraints. See RFC 3280.
           
           GeneralSubtree ::= SEQUENCE 
           {
             base                    GeneralName,
             minimum         [0]     BaseDistance DEFAULT 0,
             maximum         [1]     BaseDistance OPTIONAL 
           }
     
    See Also:
    NameConstraints
    • Constructor Detail

      • GeneralSubtree

        public GeneralSubtree​(GeneralName base,
                              java.math.BigInteger minimum,
                              java.math.BigInteger maximum)
        Constructor from a given details. According RFC 3280, the minimum and maximum fields are not used with any name forms, thus minimum MUST be zero, and maximum MUST be absent.

        If minimum is null, zero is assumed, if maximum is null, maximum is absent.

        Parameters:
        base - A restriction.
        minimum - Minimum
        maximum - Maximum
      • GeneralSubtree

        public GeneralSubtree​(GeneralName base)
    • Method Detail

      • getInstance

        public static GeneralSubtree getInstance​(java.lang.Object obj)
      • getMinimum

        public java.math.BigInteger getMinimum()
      • getMaximum

        public java.math.BigInteger getMaximum()
      • toASN1Primitive

        public ASN1Primitive toASN1Primitive()
        Produce an object suitable for an ASN1OutputStream. Returns:
               GeneralSubtree ::= SEQUENCE 
               {
                 base                    GeneralName,
                 minimum         [0]     BaseDistance DEFAULT 0,
                 maximum         [1]     BaseDistance OPTIONAL 
               }
         
        Specified by:
        toASN1Primitive in interface ASN1Encodable
        Specified by:
        toASN1Primitive in class ASN1Object
        Returns:
        a ASN1Primitive