Class GeneralName
java.lang.Object
org.mozilla.jss.netscape.security.x509.GeneralName
- All Implemented Interfaces:
Serializable,GeneralNameInterface
This class implements the ASN.1 GeneralName object class.
The ASN.1 syntax for this is:
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
}
- Version:
- 1.7
- See Also:
-
Field Summary
FieldsFields inherited from interface org.mozilla.jss.netscape.security.x509.GeneralNameInterface
NAME_ANY, NAME_DIRECTORY, NAME_DNS, NAME_EDI, NAME_IP, NAME_OID, NAME_RFC822, NAME_URI, NAME_X400 -
Constructor Summary
ConstructorsConstructorDescriptionGeneralName(DerValue encName) Create the object from its DER encoded value.Default constructor for the class. -
Method Summary
Modifier and TypeMethodDescriptionvoidencode(DerOutputStream out) Encode the name to the specified DerOutputStream.intgetType()Return the type of the general name.toString()Return the name as user readable stringunwrap()Unwrap this GeneralName until we reach something that is not a GeneralName.booleanWhether the name is valid as a single name (e.g.booleanWhether the name is valid as a subtree name (e.g.
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
name
-
-
Constructor Details
-
GeneralName
Default constructor for the class.- Parameters:
name- the selected CHOICE from the list.
-
GeneralName
Create the object from its DER encoded value.- Parameters:
encName- the DER encoded GeneralName.- Throws:
IOException
-
-
Method Details
-
getType
public int getType()Return the type of the general name.- Specified by:
getTypein interfaceGeneralNameInterface
-
toString
Return the name as user readable string -
encode
Encode the name to the specified DerOutputStream.- Specified by:
encodein interfaceGeneralNameInterface- Parameters:
out- the DerOutputStream to encode the the GeneralName to.- Throws:
IOException- on encoding errors.
-
validSingle
public boolean validSingle()Description copied from interface:GeneralNameInterfaceWhether the name is valid as a single name (e.g. for use in Subject Alternative Name extension).- Specified by:
validSinglein interfaceGeneralNameInterface
-
validSubtree
public boolean validSubtree()Description copied from interface:GeneralNameInterfaceWhether the name is valid as a subtree name (e.g. for use in Name Constraints extension)- Specified by:
validSubtreein interfaceGeneralNameInterface
-
unwrap
Unwrap this GeneralName until we reach something that is not a GeneralName.
-