Package org.gudy.bouncycastle.asn1.x509
Class GeneralSubtree
- java.lang.Object
-
- org.gudy.bouncycastle.asn1.ASN1Encodable
-
- org.gudy.bouncycastle.asn1.x509.GeneralSubtree
-
- All Implemented Interfaces:
DEREncodable
public class GeneralSubtree extends ASN1Encodable
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
-
-
Field Summary
Fields Modifier and Type Field Description private GeneralName
base
private DERInteger
maximum
private DERInteger
minimum
private static java.math.BigInteger
ZERO
-
Fields inherited from class org.gudy.bouncycastle.asn1.ASN1Encodable
BER, DER
-
-
Constructor Summary
Constructors Constructor Description GeneralSubtree(ASN1Sequence seq)
GeneralSubtree(GeneralName base)
GeneralSubtree(GeneralName base, java.math.BigInteger minimum, java.math.BigInteger maximum)
Constructor from a given details.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GeneralName
getBase()
static GeneralSubtree
getInstance(java.lang.Object obj)
static GeneralSubtree
getInstance(ASN1TaggedObject o, boolean explicit)
java.math.BigInteger
getMaximum()
java.math.BigInteger
getMinimum()
DERObject
toASN1Object()
Produce an object suitable for an ASN1OutputStream.-
Methods inherited from class org.gudy.bouncycastle.asn1.ASN1Encodable
equals, getDEREncoded, getDERObject, getEncoded, getEncoded, hashCode
-
-
-
-
Field Detail
-
ZERO
private static final java.math.BigInteger ZERO
-
base
private GeneralName base
-
minimum
private DERInteger minimum
-
maximum
private DERInteger maximum
-
-
Constructor Detail
-
GeneralSubtree
public GeneralSubtree(ASN1Sequence seq)
-
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 isnull
, maximum is absent.- Parameters:
base
- A restriction.minimum
- Minimummaximum
- Maximum
-
GeneralSubtree
public GeneralSubtree(GeneralName base)
-
-
Method Detail
-
getInstance
public static GeneralSubtree getInstance(ASN1TaggedObject o, boolean explicit)
-
getInstance
public static GeneralSubtree getInstance(java.lang.Object obj)
-
getBase
public GeneralName getBase()
-
getMinimum
public java.math.BigInteger getMinimum()
-
getMaximum
public java.math.BigInteger getMaximum()
-
toASN1Object
public DERObject toASN1Object()
Produce an object suitable for an ASN1OutputStream. Returns:GeneralSubtree ::= SEQUENCE { base GeneralName, minimum [0] BaseDistance DEFAULT 0, maximum [1] BaseDistance OPTIONAL }
- Specified by:
toASN1Object
in classASN1Encodable
- Returns:
- a DERObject
-
-