public class DistributionPointName
extends java.lang.Object
DistributionPointName as used
by the CRLDistributionPoints extension.
The DistributionPointName structure is defined as:
DistributionPointName ::= CHOICE {
fullName [0] GeneralNames,
nameRelativeToCRLIssuer [1] RelativeDistinguishedName }
The fullName field is a GeneralNames structure,
and the nameRelativeToCRLIssuer field is a Name
structure. Refer to the corresponding documentation for details on
these structures.
Standard set and get methods are
provided for each field.
CRLDistributionPoints,
Name,
GeneralNames| Constructor and Description |
|---|
DistributionPointName()
Deprecated.
Creates a new (empty)
DistributionPointName object. |
DistributionPointName(ASN1Object obj)
Deprecated.
Constructs a
DistributionPointName from an
ASN1Object. |
DistributionPointName(ASN1Type asn1Type)
Deprecated.
Creates a new
DistributionPointName object from a
distribution point name. |
| Modifier and Type | Method and Description |
|---|---|
Name |
getDirectoryName(Name parent)
Deprecated.
Returns the internal value of this
DistributionPointName
object as an absolute X.500 distinguished name. |
ASN1Type |
getDistributionPointName()
Deprecated.
Returns the distribution point name parameter.
|
void |
setDistributionPointName(ASN1Type dpn)
Deprecated.
Sets the distribution point name parameter.
|
ASN1Object |
toASN1Object()
Deprecated.
Returns this
DistributionPointName as an
ASN1Object. |
java.lang.String |
toString()
Deprecated.
Returns a string that represents the contents of this
DistributionPointName structure. |
public DistributionPointName()
DistributionPointName object.public DistributionPointName(ASN1Type asn1Type)
DistributionPointName object from a
distribution point name.
asn1Type - the distribution point namepublic DistributionPointName(ASN1Object obj) throws CodingException
DistributionPointName from an
ASN1Object.
The ASN1Object is expected to be a CONTEXT_SPECIFIC
structure containing either a GeneralNames object (tagged
zero) or a Name object (tagged one).
An internal object is constructed as appropriate, based on the tag
value. If the ASN1Object is not a
CONTEXT_SPECIFIC structure, or the tag has an illegal value,
an exception of type CodingException is thrown.
obj - the DistributionPointName as an
ASN1ObjectCodingException - if the ASN1Object is not a
DistributionPointNamepublic ASN1Object toASN1Object() throws CodingException
DistributionPointName as an
ASN1Object.
If the internal representation of this DistributionPointName
is a GeneralNames object, the CONTEXT_SPECIFIC
ASN1Object is tagged as choice zero. If the
internal representation is an instance of a Name object,
the ASN1Object is tagged as choice one. If
neither of these conditions is true, an exception of type
CodingException is thrown.
DistributionPointName as an
ASN1ObjectCodingException - if an error occurred while constructing the
ASN1Objectpublic void setDistributionPointName(ASN1Type dpn) throws java.lang.IllegalArgumentException
The ASN1Type argument must be an instance of either a
GeneralNames class or a Name class. The
GeneralNames type is used to represent an absolute path
name, while the Name type is used for relative path names.
dpn - the distribution point namejava.lang.IllegalArgumentException - if dpn is neither a GeneralNames
nor a NameGeneralNames,
Namepublic ASN1Type getDistributionPointName()
The internal representation of the distribution point name is returned
as an ASN1Type object. The calling application is
responsible for testing this value to determine if it is an instance of
the GeneralNames class or of the Name class.
The calling application should then act accordingly. For example:
ASN1Type temp = name.getDistributionPointName();
if (temp instanceof GeneralNames)
GeneralNames general = (GeneralNames)temp;
else
Name name = (Name)temp;
GeneralNames or as NameGeneralNames,
Namepublic java.lang.String toString()
DistributionPointName structure.
toString in class java.lang.Objectpublic Name getDirectoryName(Name parent)
DistributionPointName
object as an absolute X.500 distinguished name.
The full DN is the name itself if it is not relative, or the concatenation of the full DN of the CRL issuer and the RDNs of this name. In either case, this method returns the full DN of the distribution point.
parent - the full DN of the CRL issuer; may be null if this
distribution point name is not a relative DNnull if
none is set