Top Description Fields Methods
sun.security.x509

public Interface GeneralNameInterface

extends DerEncoder
Known Direct Implementers
sun.security.x509.IPAddressName, sun.security.x509.OtherName, sun.security.x509.RFC822Name, sun.security.x509.URIName, sun.security.x509.X400Address, sun.security.x509.X500Name, sun.security.x509.OIDName, sun.security.x509.DNSName, sun.security.x509.EDIPartyName
Imports
sun.security.util.*

This interface specifies the abstract methods which have to be implemented by all the members of the GeneralNames ASN.1 object.
Authors
Amit Kapoor, Hemma Prafullchandra

Field Summary

Modifier and TypeField and Description
public static final int
NAME_ANY

The list of names supported.

public static final int
NAME_DIFF_TYPE

The list of constraint results.

public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

constraint type above
constrains
(GeneralNameInterface
to be checked for being constrained
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.
public int
getType()

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

public int

Returns:

distance of name from root
subtreeDepth
()

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

Inherited from sun.security.util.DerEncoder:
encode

Field Detail

NAME_ANYback to summary
public static final int NAME_ANY

The list of names supported.

NAME_DIFF_TYPEback to summary
public static final int NAME_DIFF_TYPE

The list of constraint results.

NAME_DIRECTORYback to summary
public static final int NAME_DIRECTORY
NAME_DNSback to summary
public static final int NAME_DNS
NAME_EDIback to summary
public static final int NAME_EDI
NAME_IPback to summary
public static final int NAME_IP
NAME_MATCHback to summary
public static final int NAME_MATCH
NAME_NARROWSback to summary
public static final int NAME_NARROWS
NAME_OIDback to summary
public static final int NAME_OID
NAME_RFC822back to summary
public static final int NAME_RFC822
NAME_SAME_TYPEback to summary
public static final int NAME_SAME_TYPE
NAME_URIback to summary
public static final int NAME_URI
NAME_WIDENSback to summary
public static final int NAME_WIDENS
NAME_X400back to summary
public static final int NAME_X400

Method Detail

constrainsback to summary
public int constrains(GeneralNameInterface inputName) throws UnsupportedOperationException

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:GeneralNameInterface

to be checked for being constrained

Returns:int

constraint type above

Exceptions
UnsupportedOperationException:
if name is same type, but comparison operations are not supported for this name type.
getTypeback to summary
public int getType()

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

subtreeDepthback to summary
public int subtreeDepth() throws UnsupportedOperationException

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

Returns:int

distance of name from root

Exceptions
UnsupportedOperationException:
if not supported for this name type