Top Description Fields Constructors Methods
org.bouncycastle.asn1.x509

public Class GeneralSubtree

extends ASN1Object
Class Inheritance
Imports
java.math.BigInteger, org.bouncycastle.asn1.ASN1EncodableVector, .ASN1Integer, .ASN1Object, .ASN1Primitive, .ASN1Sequence, .ASN1TaggedObject, .DERSequence, .DERTaggedObject

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
org.bouncycastle.asn1.x509.NameConstraints

Field Summary

Modifier and TypeField and Description
private GeneralName
private ASN1Integer
private ASN1Integer
private static final BigInteger

Constructor Summary

AccessConstructor and Description
private
public
GeneralSubtree(GeneralName
A restriction.
base
,
BigInteger
Minimum
minimum
,
BigInteger
Maximum
maximum
)

Constructor from a given details.

public

Method Summary

Modifier and TypeMethod and Description
public GeneralName
public static GeneralSubtree
getInstance(ASN1TaggedObject o, boolean explicit)

public static GeneralSubtree
public BigInteger
public BigInteger
public ASN1Primitive

Returns:

a ASN1Primitive
toASN1Primitive
()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Produce an object suitable for an ASN1OutputStream.
Inherited from org.bouncycastle.asn1.ASN1Object:
encodeToencodeToequalsgetEncodedgetEncodedhasEncodedTagValuehashCode

Field Detail

baseback to summary
private GeneralName base
maximumback to summary
private ASN1Integer maximum
minimumback to summary
private ASN1Integer minimum
ZEROback to summary
private static final BigInteger ZERO

Constructor Detail

GeneralSubtreeback to summary
private GeneralSubtree(ASN1Sequence seq)
GeneralSubtreeback to summary
public GeneralSubtree(GeneralName base, BigInteger minimum, 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:GeneralName

A restriction.

minimum:BigInteger

Minimum

maximum:BigInteger

Maximum

GeneralSubtreeback to summary
public GeneralSubtree(GeneralName base)

Method Detail

getBaseback to summary
public GeneralName getBase()
getInstanceback to summary
public static GeneralSubtree getInstance(ASN1TaggedObject o, boolean explicit)
getInstanceback to summary
public static GeneralSubtree getInstance(Object obj)
getMaximumback to summary
public BigInteger getMaximum()
getMinimumback to summary
public BigInteger getMinimum()
toASN1Primitiveback to summary
public ASN1Primitive toASN1Primitive()

Implements abstract org.bouncycastle.asn1.ASN1Object.toASN1Primitive.

Implements org.bouncycastle.asn1.ASN1Encodable.toASN1Primitive.

Produce an object suitable for an ASN1OutputStream. Returns:

      GeneralSubtree ::= SEQUENCE 
      {
        base                    GeneralName,
        minimum         [0]     BaseDistance DEFAULT 0,
        maximum         [1]     BaseDistance OPTIONAL 
      }
Returns:ASN1Primitive

a ASN1Primitive