public class RFC822Name extends java.lang.Object implements GeneralNameInterface
GeneralName,
GeneralNames,
GeneralNameInterfaceNAME_ANY, NAME_DIFF_TYPE, NAME_DIRECTORY, NAME_DNS, NAME_EDI, NAME_IP, NAME_MATCH, NAME_NARROWS, NAME_OID, NAME_RFC822, NAME_SAME_TYPE, NAME_URI, NAME_WIDENS, NAME_X400| Constructor and Description |
|---|
RFC822Name(DerValue derValue)
Create the RFC822Name object from the passed encoded Der value.
|
RFC822Name(java.lang.String name)
Create the RFC822Name object with the specified name.
|
| Modifier and Type | Method and Description |
|---|---|
int |
constrains(GeneralNameInterface inputName)
Return constraint type:
NAME_DIFF_TYPE = -1: input name is different type from name (i.e.
|
void |
encode(DerOutputStream out)
Encode the RFC822 name into the DerOutputStream.
|
boolean |
equals(java.lang.Object obj)
Compares this name with another, for equality.
|
java.lang.String |
getName()
Return the actual name value of the GeneralName.
|
int |
getType()
Return the type of the GeneralName.
|
int |
hashCode()
Returns the hash code value for this object.
|
void |
parseName(java.lang.String name)
Parse an RFC822Name string to see if it is a valid
addr-spec according to IETF RFC822 and RFC2459:
[local-part@]domain
|
int |
subtreeDepth()
Return subtree depth of this name for purposes of determining
NameConstraints minimum and maximum bounds.
|
java.lang.String |
toString()
Convert the name into user readable string.
|
public RFC822Name(DerValue derValue) throws java.io.IOException
derValue - the encoded DER RFC822Name.java.io.IOException - on error.public RFC822Name(java.lang.String name)
throws java.io.IOException
name - the RFC822Name.java.io.IOException - on invalid input namepublic void parseName(java.lang.String name)
throws java.io.IOException
local-part@ could be empty for an RFC822Name NameConstraint, but the domain at least must be non-empty. Case is not significant.
name - the RFC822Name stringjava.io.IOException - if name is not validpublic int getType()
getType in interface GeneralNameInterfacepublic java.lang.String getName()
public void encode(DerOutputStream out) throws java.io.IOException
encode in interface GeneralNameInterfaceout - the DER stream to encode the RFC822Name to.java.io.IOException - on encoding errors.public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic int constrains(GeneralNameInterface inputName) throws java.lang.UnsupportedOperationException
[RFC2459] When the subjectAltName extension contains an Internet mail address, the address MUST be included as an rfc822Name. The format of an rfc822Name is an "addr-spec" as defined in RFC 822 [RFC 822]. An addr-spec has the form "local-part@domain". Note that an addr-spec has no phrase (such as a common name) before it, has no comment (text surrounded in parentheses) after it, and is not surrounded by "<" and ">". Note that while upper and lower case letters are allowed in an RFC 822 addr-spec, no significance is attached to the case.
constrains in interface GeneralNameInterfaceinputName - to be checked for being constrainedjava.lang.UnsupportedOperationException - if name is not exact match, but narrowing and widening are
not supported for this name type.public int subtreeDepth()
throws java.lang.UnsupportedOperationException
subtreeDepth in interface GeneralNameInterfacejava.lang.UnsupportedOperationException - if not supported for this name typeCopyright © 2020. All Rights Reserved.