[RFC5280] When the subjectAltName extension contains a URI, the name MUST be stored in the uniformResourceIdentifier (an IA5String). The name MUST be a non-relative URL, and MUST follow the URL syntax and encoding rules specified in [RFC 3986]. The name must include both a scheme (e.g., "http" or "ftp") and a scheme-specific-part. The scheme- specific-part must include a fully qualified domain name or IP address as the host.
As specified in [RFC 3986], the scheme name is not case-sensitive (e.g., "http" is equivalent to "HTTP"). The host part is also not case-sensitive, but other components of the scheme-specific-part may be case-sensitive. When comparing URIs, conforming implementations MUST compare the scheme and host without regard to case, but assume the remainder of the scheme-specific-part is case-sensitive.
[RFC1738] In general, URLs are written as follows:
<scheme>:<scheme-specific-part>
A URL contains the name of the scheme being used (<scheme>) followed
by a colon and then a string (the <scheme-specific-part>) whose
interpretation depends on the scheme.
While the syntax for the rest of the URL may vary depending on the particular scheme selected, URL schemes that involve the direct use of an IP-based protocol to a specified host on the Internet use a common syntax for the scheme-specific data:
//<user>:<password>@<host>:<port>/<url-path>
[RFC2732] specifies that an IPv6 address contained inside a URL
must be enclosed in square brackets (to allow distinguishing the
colons that separate IPv6 components from the colons that separate
scheme-specific data).
GeneralName, GeneralNames, GeneralNameInterface
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private DNSName | |
| private IPAddressName | |
| private final URI |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | Returns: constraint type aboveto be checked for being constrained inputName)Implements sun. Return type of constraint inputName places on this name:
|
| public void | encode(DerOutputStream
the DER stream to encode the URIName to. out)Implements sun. Encode the URI name into the DerOutputStream. |
| public boolean | Returns: true iff the names are equivalent according to RFC 5280.Overrides java. Compares this name with another, for equality. |
| public String | Returns: host name or IP address portion of full nameReturn the host name or IP address portion of the URIName |
| public Object | Returns: host name as DNSName or IPAddressNameReturn the host object type; if host name is a DNSName, then this host object does not include any initial "." on the name. |
| public String | |
| public String | |
| public int | getType()
Implements sun. Return the type of the GeneralName. |
| public URI | |
| public int | Returns: the hash code value for this objectOverrides java. Returns the hash code value for this object. |
| public static URIName | nameConstraint(DerValue
the URI name constraint value)Create the URIName object with the specified name constraint. |
| public int | Returns: distance of name from rootImplements sun. Return subtree depth of this name for purposes of determining NameConstraints minimum and maximum bounds and for calculating path lengths in name subtrees. |
| public String |
| host | back to summary |
|---|---|
| private final String host | |
| hostDNS | back to summary |
|---|---|
| private DNSName hostDNS | |
| hostIP | back to summary |
|---|---|
| private IPAddressName hostIP | |
| uri | back to summary |
|---|---|
| private final URI uri | |
| URIName | back to summary |
|---|---|
| public URIName(DerValue derValue) throws IOException Create the URIName object from the passed encoded Der value.
| |
| URIName | back to summary |
|---|---|
| public URIName(String name) throws IOException Create the URIName object with the specified name.
| |
| URIName | back to summary |
|---|---|
| pack-priv URIName(URI uri, String host, DNSName hostDNS) | |
| constrains | back to summary |
|---|---|
| public int constrains(GeneralNameInterface inputName) throws UnsupportedOperationException Implements sun. Return type of constraint inputName places on this name:
RFC5280: For URIs, the constraint applies to the host part of the name. The constraint may specify a host or a domain. Examples would be "foo.bar.com"; and ".xyz.com". When the constraint begins with a period, it may be expanded with one or more subdomains. That is, the constraint ".xyz.com" is satisfied by both abc.xyz.com and abc.def.xyz.com. However, the constraint ".xyz.com" is not satisfied by "xyz.com". When the constraint does not begin with a period, it specifies a host.
| |
| encode | back to summary |
|---|---|
| public void encode(DerOutputStream out) Implements sun. Encode the URI name into the DerOutputStream.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Compares this name with another, for equality.
| |
| getHost | back to summary |
|---|---|
| public String getHost() Return the host name or IP address portion of the URIName
| |
| getHostObject | back to summary |
|---|---|
| public Object getHostObject() Return the host object type; if host name is a DNSName, then this host object does not include any initial "." on the name.
| |
| getName | back to summary |
|---|---|
| public String getName() Returns this URI name. | |
| getScheme | back to summary |
|---|---|
| public String getScheme() Return the scheme name portion of a URIName
| |
| getType | back to summary |
|---|---|
| public int getType() Implements sun. Return the type of the GeneralName. | |
| getURI | back to summary |
|---|---|
| public URI getURI() Returns the URIName as a java.net.URI object | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Returns the hash code value for this object.
| |
| nameConstraint | back to summary |
|---|---|
| public static URIName nameConstraint(DerValue value) throws IOException Create the URIName object with the specified name constraint. URI name constraints syntax is different from SubjectAltNames, etc. See 4.2.1.10 of RFC 5280.
| |
| subtreeDepth | back to summary |
|---|---|
| public int subtreeDepth() throws UnsupportedOperationException Implements sun. Return subtree depth of this name for purposes of determining NameConstraints minimum and maximum bounds and for calculating path lengths in name subtrees.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Convert the name into user readable string. | |