public interface

GeneralNameInterface

sun.security.x509.GeneralNameInterface
Known Indirect Subclasses

Class Overview

This interface specifies the abstract methods which have to be implemented by all the members of the GeneralNames ASN.1 object.

Summary

Constants
int NAME_ANY The list of names supported.
int NAME_DIFF_TYPE The list of constraint results.
int NAME_DIRECTORY
int NAME_DNS
int NAME_EDI
int NAME_IP
int NAME_MATCH
int NAME_NARROWS
int NAME_OID
int NAME_RFC822
int NAME_SAME_TYPE
int NAME_URI
int NAME_WIDENS
int NAME_X400
Public Methods
abstract 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.
abstract void encode(DerOutputStream out)
Encode the name to the specified DerOutputStream.
abstract int getType()
Return the type of the general name, as defined above.
abstract 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.

Constants

public static final int NAME_ANY

The list of names supported.

Constant Value: 0 (0x00000000)

public static final int NAME_DIFF_TYPE

The list of constraint results.

Constant Value: -1 (0xffffffff)

public static final int NAME_DIRECTORY

Constant Value: 4 (0x00000004)

public static final int NAME_DNS

Constant Value: 2 (0x00000002)

public static final int NAME_EDI

Constant Value: 5 (0x00000005)

public static final int NAME_IP

Constant Value: 7 (0x00000007)

public static final int NAME_MATCH

Constant Value: 0 (0x00000000)

public static final int NAME_NARROWS

Constant Value: 1 (0x00000001)

public static final int NAME_OID

Constant Value: 8 (0x00000008)

public static final int NAME_RFC822

Constant Value: 1 (0x00000001)

public static final int NAME_SAME_TYPE

Constant Value: 3 (0x00000003)

public static final int NAME_URI

Constant Value: 6 (0x00000006)

public static final int NAME_WIDENS

Constant Value: 2 (0x00000002)

public static final int NAME_X400

Constant Value: 3 (0x00000003)

Public Methods

public abstract 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 same type, but comparison operations are not supported for this name type.

public abstract void encode (DerOutputStream out)

Encode the name to the specified DerOutputStream.

Parameters
out the DerOutputStream to encode the GeneralName to.
Throws
IOException thrown if the GeneralName could not be encoded.

public abstract int getType ()

Return the type of the general name, as defined above.

public abstract 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