|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--iaik.asn1.structures.GeneralSubtree
An implementation of the ASN.1 structure GeneralSubtree
as used within the
NameConstraints
extension.
The NameConstraints
is used within CA certifcates for indicating a name
space within which all subject names in subsequent certificates in a certification
path must be located (see x.509 Certificate and CRL profile presented in RFC 2459).
Restrictions may apply to the subject distinguished name or subject alternative
names. Restrictions are defined in terms of permitted or excluded name subtrees.
Any name matching a restriction in the excludedSubtrees field is invalid regardless
of information appearing in the permittedSubtrees. Both, excludedSubtrees and
permittedSubtrees are defined as GeneralSubtrees structures consisting of
a sequence of GeneralSubtree components, as implemented by this class:
NameConstraints ::= SEQUENCE { permittedSubtrees [0] GeneralSubtrees OPTIONAL, excludedSubtrees [1] GeneralSubtrees OPTIONAL }GeneralSubtrees ::= SEQUENCE SIZE (1..MAX) OF GeneralSubtree GeneralSubtree ::= SEQUENCE { base GeneralName, minimum [0] BaseDistance DEFAULT 0, maximum [1] BaseDistance OPTIONAL }
BaseDistance ::= INTEGER (0..MAX)
GeneralName ::= CHOICE { otherName [0] OtherName, rfc822Name [1] IA5String, dNSName [2] IA5String, x400Address [3] ORAddress, directoryName [4] Name, ediPartyName [5] EDIPartyName, uniformResourceIdentifier [6] IA5String, iPAddress [7] OCTET STRING, registeredID [8] OBJECT IDENTIFIER}
When creating a GeneralSubtree
object to be used for the NameConstraints
extension, specify the
base immediately, and subsequently use the setMinimum
and setMaximum
methods for setting the base distances,
e.g.:
GeneralSubtree generalSubtree = new GeneralSubtree(new GeneralName(GeneralName.rfc822Name, "*.tu-graz.ac.at")); generalSubtree.setMinimum(1); generalSubtree.setMaximum(3);
NameConstraints
,
GeneralName
Constructor Summary | |
GeneralSubtree()
Default constructor. |
|
GeneralSubtree(GeneralName base)
Creates a new GeneralSubrtree from a base representing some GeneralName. |
Method Summary | |
void |
decode(ASN1Object obj)
Decodes a GeneralSubtree from the given ASN1Object. |
GeneralName |
getBase()
Returns the base GeneralName. |
int |
getMaximum()
Returns the maximum base distance or -1 if not set. |
int |
getMinimum()
Returns the minimum base distance. |
void |
setMaximum(int maximum)
Sets the maximum base distance. |
void |
setMinimum(int minimum)
Sets the minimum base distance. |
ASN1Object |
toASN1Object()
Returns this GeneralSubtree as (SEQUENCE) ASN1Object. |
String |
toString()
Returns a string that represents the contents of this GeneralSubtree. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public GeneralSubtree()
The minimum base distance per default is set to 0, and the maximum base
distance is set to -1 indicating that the maximum value is not set.
For explicitly setting the base distance values, use the setMinimum
and setMaximum
methods.
public GeneralSubtree(GeneralName base)
For Instance:
GeneralSubtree generalSubtree = new GeneralSubtree(new GeneralName(GeneralName.rfc822Name, "*.tu-graz.ac.at"));
The minimum base distance per default is set to 0, and the maximum base
distance is set to -1 indicating that the maximum value is not set.
For explicitly setting the base distance values, use the
setMinimum
and setMaximum
methods.
base
- the base GeneralNameMethod Detail |
public ASN1Object toASN1Object() throws CodingException
toASN1Object
in interface ASN1Type
CodingException
- if the ASN1Object cannot be createdpublic void decode(ASN1Object obj) throws CodingException
The given ASN1Object is parsed for the base GeneralName, minimum and maximum BaseDistance values.
decode
in interface ASN1Type
obj
- the GeneralSubtree as ASN1ObjectCodingException
- if a parsing error occurspublic void setMinimum(int minimum)
minimum
- the minimum base distance as intpublic void setMaximum(int maximum)
maximum
- the maximum base distance as intpublic GeneralName getBase()
public int getMinimum()
public int getMaximum()
public String toString()
toString
in class Object
|
This Javadoc may contain text parts from Internet Standard specifications (RFC 2459, 3280, 3039, 2560, 1521, 821, 822, 2253, 1319, 1321, ,2630, 2631, 2268, 3058, 2984, 2104, 2144, 2040, 2311, 2279, see copyright note) and RSA Data Security Public-Key Cryptography Standards (PKCS#1,3,5,7,8,9,10,12, see copyright note). | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |