|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--codec.asn1.ASN1AbstractType
|
+--codec.asn1.ASN1Choice
|
+--codec.x509.GeneralName
This class represents the GeneralName data type as denoted in X.509. It implements the following ASN1 data structure:
GeneralName ::= CHOICE {
otherName [0] IMPLICIT OtherName
rfc822Name [1] IMPLICIT IA5String
dNSName [2] IMPLICIT IA5String
x400Address [3] IMPLICIT ORAAddress
directoryName [4] IMPLICIT Name
ediPartyName [5] IMPLICIT EDIPartyName
uniformRessourceIdentifier [6] IMPLICIT IA5String
iPAddress [7] IMPLICIT OCTET STRING
registeredID [8] IMPLICIT OBJECT IDENTIFIER
}
OtherName ::= SEQUENCE {
type-id OBJECT IDENTIFIER,
value [0] EXPLICIT ANY DEFINED BY type-id
}
Note that x400Address and ediPartyName are not yet implemented and will cause
exceptions to be thrown.
| Field Summary | |
static int |
TYPE_DIRECTORY_NAME
This value indicates the choice "directoryName" |
static int |
TYPE_DNS_NAME
This value indicates the choice "dNSName" |
static int |
TYPE_EDI_PARTY_NAME
This value indicates the choice "ediPartyName" |
static int |
TYPE_IP_ADDRESS
This value indicates the choice "iPAddress" |
static int |
TYPE_OTHER_NAME
This value indicates the choice "otherName" |
static int |
TYPE_REGISTERED_ID
This value indicates the choice "registeredID" |
static int |
TYPE_RFC822_NAME
This value indicates the choice "rfc822Name" |
static int |
TYPE_UNIFORM_RESOURCE_IDENTIFIER
This value indicates the choice "uniformResourceIdentifier" |
static int |
TYPE_X400_ADDRESS
This value indicates the choice "x400Address" |
| Constructor Summary | |
GeneralName()
Builds the structure of the class ready for decoding |
|
| Method Summary | |
ASN1Type |
getGeneralName()
Returns the actual Name as ASN1Type. |
void |
setDirectoryName(Name dirname)
Set the GeneralName as a directoryName. |
void |
setDNSName(ASN1IA5String dnsname)
Set the GeneralName as a dNSName.Note that the ASN1IA5String object is cloned so that no side effects can occur! |
void |
setIPAddress(byte[] address)
Set the GeneralName as a iPAddress. |
void |
setRegisteredID(ASN1ObjectIdentifier oid)
Set the GeneralName as a registeredID. |
void |
setRfc822Name(ASN1IA5String rfcname)
Set the GeneralName as a rfc822Namename. |
void |
setUniformResourceIdentifier(ASN1IA5String unirid)
Set the GeneralName as uniformResourceIdentifier.Note that the ASN1IA5String object is cloned so that no side effects can occur! |
String |
toString()
This method returns a "human-readable" string representation of this object's state |
| Methods inherited from class codec.asn1.ASN1Choice |
addType, checkConstraints, clear, decode, encode, getInnerType, getTag, getTagClass, getType, getValue, isExplicit, isType, setConstraint, setExplicit, setInnerType, trimToSize |
| Methods inherited from class codec.asn1.ASN1AbstractType |
getConstraint, isOptional, readExternal, setOptional, writeExternal |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int TYPE_OTHER_NAME
public static final int TYPE_RFC822_NAME
public static final int TYPE_DNS_NAME
public static final int TYPE_X400_ADDRESS
public static final int TYPE_DIRECTORY_NAME
public static final int TYPE_EDI_PARTY_NAME
public static final int TYPE_UNIFORM_RESOURCE_IDENTIFIER
public static final int TYPE_IP_ADDRESS
public static final int TYPE_REGISTERED_ID
| Constructor Detail |
public GeneralName()
| Method Detail |
public ASN1Type getGeneralName()
throws X509Exception
X509Exception - if there was a bad tagpublic void setDirectoryName(Name dirname)
dirname - the name to be setpublic void setDNSName(ASN1IA5String dnsname)
dnsname - the name to be set
public void setIPAddress(byte[] address)
throws InvalidParameterException
address - the address to be set (must be either 8 or 32 bytes)InvalidParameterException - if length of address is not 8 or 32 bytes.public void setRegisteredID(ASN1ObjectIdentifier oid)
oid - the name to be setpublic void setRfc822Name(ASN1IA5String rfcname)
rfcname - the name to be setpublic void setUniformResourceIdentifier(ASN1IA5String unirid)
unirid - the name to be setpublic String toString()
toString in class ASN1Choice
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||