public class

OIDName

extends Object
implements GeneralNameInterface
java.lang.Object
   ↳ sun.security.x509.OIDName

Class Overview

This class implements the OIDName as required by the GeneralNames ASN.1 object.

Summary

[Expand]
Inherited Constants
From interface sun.security.x509.GeneralNameInterface
Public Constructors
OIDName(DerValue derValue)
Create the OIDName object from the passed encoded Der value.
OIDName(ObjectIdentifier oid)
Create the OIDName object with the specified name.
OIDName(String name)
Create the OIDName from the String form of the OID
Public Methods
int constrains(GeneralNameInterface inputName)
Return type of constraint inputName places on this name:
  • NAME_DIFF_TYPE = -1: input name is different type from name (i.e.
void encode(DerOutputStream out)
Encode the OID name into the DerOutputStream.
boolean equals(Object obj)
Compares this name with another, for equality.
ObjectIdentifier getOID()
Returns this OID name.
int getType()
Return the type of the GeneralName.
int hashCode()
Returns the hash code value for this object.
int subtreeDepth()
Return subtree depth of this name for purposes of determining NameConstraints minimum and maximum bounds and for calculating path lengths in name subtrees.
String toString()
Convert the name into user readable string.
[Expand]
Inherited Methods
From class java.lang.Object
From interface sun.security.x509.GeneralNameInterface

Public Constructors

public OIDName (DerValue derValue)

Create the OIDName object from the passed encoded Der value.

Parameters
derValue the encoded DER OIDName.
Throws
IOException on error.

public OIDName (ObjectIdentifier oid)

Create the OIDName object with the specified name.

public OIDName (String name)

Create the OIDName from the String form of the OID

Parameters
name the OIDName in form "x.y.z..."
Throws
IOException on error

Public Methods

public int constrains (GeneralNameInterface inputName)

Return type of constraint inputName places on this name:

  • NAME_DIFF_TYPE = -1: input name is different type from name (i.e. does not constrain).
  • NAME_MATCH = 0: input name matches name.
  • NAME_NARROWS = 1: input name narrows name (is lower in the naming subtree)
  • NAME_WIDENS = 2: input name widens name (is higher in the naming subtree)
  • NAME_SAME_TYPE = 3: input name does not match or narrow name, but is same type.
. These results are used in checking NameConstraints during certification path verification.

Parameters
inputName to be checked for being constrained
Throws
UnsupportedOperationException if name is not exact match, but narrowing and widening are not supported for this name type.

public void encode (DerOutputStream out)

Encode the OID name into the DerOutputStream.

Parameters
out the DER stream to encode the OIDName to.
Throws
IOException on encoding errors.

public boolean equals (Object obj)

Compares this name with another, for equality.

Parameters
obj the reference object with which to compare.
Returns
  • true iff the names are identical

public ObjectIdentifier getOID ()

Returns this OID name.

public int getType ()

Return the type of the GeneralName.

public int hashCode ()

Returns the hash code value for this object.

Returns
  • a hash code value for this object.

public int subtreeDepth ()

Return subtree depth of this name for purposes of determining NameConstraints minimum and maximum bounds and for calculating path lengths in name subtrees.

Throws
UnsupportedOperationException if not supported for this name type

public String toString ()

Convert the name into user readable string.

Returns
  • a string representation of the object.