public class NameConstraintsExtension extends X509Extension
Note that this implementation always sets the minimum subtree base distance to 0
(the default) and always omits the maximum.
id_netscape_ce, id_netscape_ce_type, id_set_ce, id_set_ce_type, isDecoded
Constructor and Description |
---|
NameConstraintsExtension()
Create a new extension with the appropriate OID type.
|
NameConstraintsExtension(java.io.InputStream is) |
NameConstraintsExtension(java.util.List<GeneralName> permitted, java.util.List<GeneralName> excluded)
Creates a new extension with the given permitted and/or excluded subtree lists.
|
NameConstraintsExtension(java.util.List<GeneralName> permitted, java.util.List<GeneralName> excluded, boolean critical)
Creates a new extension with the given permitted and/or excluded subtree lists and critical flag.
|
NameConstraintsExtension(java.util.Vector<GeneralName> permitted, java.util.Vector<GeneralName> excluded)
Deprecated.
|
NameConstraintsExtension(java.util.Vector<GeneralName> permitted, java.util.Vector<GeneralName> excluded, boolean critical)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addExcludedSubtree(GeneralName name) |
void |
addPermittedSubtree(GeneralName name) |
java.util.Vector<GeneralName> |
getExcludedSubtrees()
Deprecated.
|
java.util.ArrayList<GeneralName> |
getExcludedSubtreesAsList()
Gets the excluded subtrees defined for this extension.
|
java.util.Vector<GeneralName> |
getPermittedSubtrees()
Deprecated.
|
java.util.ArrayList<GeneralName> |
getPermittedSubtreesAsList()
Gets the permitted subtrees defined for this extension.
|
java.lang.String |
toString()
Returns a string representation of this object.
|
getCritical, getType, getValue, input, inputInstance, isRecognized, length, output, readExternal, setCritical, setValue, writeExternal
public NameConstraintsExtension()
Note: An object created using this constructor may not be in a valid state. This constructor is intended primarily for use in conjunction with the X509Extension.input(java.io.InputStream)
method.
public NameConstraintsExtension(java.util.Vector<GeneralName> permitted, java.util.Vector<GeneralName> excluded)
NameConstraintsExtension(List, List)
permitted
- A Vector
of GeneralNames
which are the permitted subtrees for this Name Constraints extension (may be null
).excluded
- A Vector
of GeneralNames
which are the excluded subtrees for this Name Constraints extension (may be null
).public NameConstraintsExtension(java.util.List<GeneralName> permitted, java.util.List<GeneralName> excluded)
permitted
- A List
of GeneralNames
which are the permitted subtrees for this Name Constraints extension (may be null
).excluded
- A List
of GeneralNames
which are the excluded subtrees for this Name Constraints extension (may be null
).public NameConstraintsExtension(java.util.Vector<GeneralName> permitted, java.util.Vector<GeneralName> excluded, boolean critical)
NameConstraintsExtension(List, List, boolean)
permitted
- A Vector
of GeneralNames
which are the permitted subtrees for this Name Constraints extension (may be null
).excluded
- A Vector
of GeneralNames
which are the excluded subtrees for this Name Constraints extension (may be null
).critical
- true
if this extension is critical, false
otherwise.public NameConstraintsExtension(java.util.List<GeneralName> permitted, java.util.List<GeneralName> excluded, boolean critical)
permitted
- A List
of GeneralNames
which are the permitted subtrees for this Name Constraints extension (may be null
).excluded
- A List
of GeneralNames
which are the excluded subtrees for this Name Constraints extension (may be null
).critical
- true
if this extension is critical, false
otherwise.public NameConstraintsExtension(java.io.InputStream is) throws java.io.IOException
java.io.IOException
public java.util.Vector<GeneralName> getPermittedSubtrees()
getPermittedSubtreesAsList()
Vector
of GeneralName
s, or null
if none are defined.public java.util.ArrayList<GeneralName> getPermittedSubtreesAsList()
ArrayList
of GeneralName
s, or null
if none are defined.public java.util.Vector<GeneralName> getExcludedSubtrees()
getExcludedSubtreesAsList()
Vector
of GeneralName
s, or null
if none are defined.public java.util.ArrayList<GeneralName> getExcludedSubtreesAsList()
ArrayList
of GeneralName
s, or null
if none are defined.public void addPermittedSubtree(GeneralName name)
public void addExcludedSubtree(GeneralName name)
public java.lang.String toString()
X509Extension
toString
in class X509Extension