# SslCertificate.DName

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# DName

*** ** * ** ***

Kotlin \|[Java](https://developer.android.com/reference/android/net/http/SslCertificate.DName "View this page in Java")  

```
open class DName
```

|---|--------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                 ||
| ↳ | [android.net.http.SslCertificate.DName](https://developer.android.com/reference/kotlin/android/net/http/SslCertificate.DName#) |

A distinguished name helper class: a 3-tuple of:

- the most specific common name (CN)
- the most specific organization (O)
- the most specific organizational unit (OU)

<br />

## Summary

|                                                                                                                    Public constructors                                                                                                                     ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [DName](https://developer.android.com/reference/kotlin/android/net/http/SslCertificate.DName#DName(kotlin.String))`(`dName:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` Creates a new `DName` from a string. |

|                                                                                                 Public methods                                                                                                 ||
|----------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------|
| open [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | [getCName](https://developer.android.com/reference/kotlin/android/net/http/SslCertificate.DName#getCName())`()` <br /> |
| open [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | [getDName](https://developer.android.com/reference/kotlin/android/net/http/SslCertificate.DName#getDName())`()` <br /> |
| open [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | [getOName](https://developer.android.com/reference/kotlin/android/net/http/SslCertificate.DName#getOName())`()` <br /> |
| open [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | [getUName](https://developer.android.com/reference/kotlin/android/net/http/SslCertificate.DName#getUName())`()` <br /> |

## Public constructors

### DName

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
DName(dName: String!)
```

Creates a new `DName` from a string. The attributes are assumed to come in most significant to least significant order which is true of human readable values returned by methods such as `X500Principal.getName()`. Be aware that the underlying sources of distinguished names such as instances of `X509Certificate` are encoded in least significant to most significant order, so make sure the value passed here has the expected ordering of attributes.

## Public methods

### getCName

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun getCName(): String!
```

|                                                                    Return                                                                    ||
|-----------------------------------------------------------------------------------|-----------------------------------------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | The most specific Common-name (CN) component of this name |

### getDName

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun getDName(): String!
```

|                                                                      Return                                                                       ||
|-----------------------------------------------------------------------------------|----------------------------------------------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | The distinguished name (normally includes CN, O, and OU names) |

### getOName

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun getOName(): String!
```

|                                                                    Return                                                                    ||
|-----------------------------------------------------------------------------------|-----------------------------------------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | The most specific Organization (O) component of this name |

### getUName

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
open fun getUName(): String!
```

|                                                                        Return                                                                        ||
|-----------------------------------------------------------------------------------|-------------------------------------------------------------------|
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | The most specific Organizational Unit (OU) component of this name |