corda / net.corda.core.identity / CordaX500Name

CordaX500Name

data class CordaX500Name

X.500 distinguished name data type customised to how Corda uses names. This restricts the attributes to those Corda supports, and requires that organisation, locality and country attributes are specified. See also RFC 4519 for the underlying attribute type definitions

Constructors

<init>

CordaX500Name(commonName: String, organisation: String, locality: String, country: String)
CordaX500Name(organisation: String, locality: String, country: String)

X.500 distinguished name data type customised to how Corda uses names. This restricts the attributes to those Corda supports, and requires that organisation, locality and country attributes are specified. See also RFC 4519 for the underlying attribute type definitions

CordaX500Name(commonName: String?, organisationUnit: String?, organisation: String, locality: String, state: String?, country: String)

Properties

commonName

optional name by the which the entity is usually known. Used only for services (for organisations, the organisation property is the name). Corresponds to the "CN" attribute type.

val commonName: String?

country

country the organisation is in, as an ISO 3166-1 2-letter country code. Corresponds to the "C" attribute type.

val country: String

locality

locality of the organisation, typically nearest major city. For distributed services this would be where one of the organisations is based. Corresponds to the "L" attribute type.

val locality: String

organisation

name of the organisation. Corresponds to the "O" attribute type.

val organisation: String

organisationUnit

optional name of a unit within the organisation. Corresponds to the "OU" attribute type.

val organisationUnit: String?

state

the full name of the state or province the organisation is based in. Corresponds to the "ST" attribute type.

val state: String?

x500Principal

Return the X500Principal equivalent of this name.

val x500Principal: X500Principal

Functions

toString

fun toString(): String

Companion Object Properties

LENGTH_COUNTRY

const val LENGTH_COUNTRY: Int

MAX_LENGTH_COMMON_NAME

const val MAX_LENGTH_COMMON_NAME: Int

MAX_LENGTH_LOCALITY

const val MAX_LENGTH_LOCALITY: Int

MAX_LENGTH_ORGANISATION

const val MAX_LENGTH_ORGANISATION: Int

MAX_LENGTH_ORGANISATION_UNIT

const val MAX_LENGTH_ORGANISATION_UNIT: Int

MAX_LENGTH_STATE

const val MAX_LENGTH_STATE: Int

Companion Object Functions

build

fun build(principal: X500Principal): CordaX500Name

parse

fun parse(name: String): CordaX500Name