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(com.tencent.kona.sun.security.util.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(com.tencent.kona.sun.security.util.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 RFC 822 and RFC 5280:
[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(com.tencent.kona.sun.security.util.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(com.tencent.kona.sun.security.util.DerOutputStream out)
encode in interface com.tencent.kona.sun.security.util.DerEncoderout - the DER stream to encode the RFC822Name to.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
[RFC 5280]: When the subjectAltName extension contains an Internet mail address, the address MUST be stored in the rfc822Name. The format of an rfc822Name is a "Mailbox" as defined in Section 4.1.2 of [RFC2821]. A Mailbox has the form "Local-part@Domain". Note that a Mailbox 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 ">".
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 type