|
||||||||||
| 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 PKIX internet draft draft-ietf-pkix-ipki-part1-07.txt).
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. |
java.lang.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 GeneralName| Method Detail |
public ASN1Object toASN1Object()
throws CodingException
public void decode(ASN1Object obj)
throws CodingException
The given ASN1Object is parsed for the base GeneralName, minimum and maximum BaseDistance values.
obj - the GeneralSubtree as ASN1Objectpublic 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 java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||