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)CordaX500Name(commonName: String?, organisationUnit: String?, organisation: String, locality: String, state: 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

Properties

commonName

val commonName: String?

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.

country

val country: String

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

locality

val locality: String

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.

organisation

val organisation: String

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

organisationUnit

val organisationUnit: String?

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

state

val state: String?

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

x500Principal

val x500Principal: X500Principal

Return the X500Principal equivalent of this name.

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

Extension Functions

contextLogger

fun Any.contextLogger(): Logger

When called from a companion object, returns the logger for the enclosing class.