# SslCertificate.DName

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Ctors](https://developer.android.com/reference/android/net/http/SslCertificate.DName#pubctors)\|[Methods](https://developer.android.com/reference/android/net/http/SslCertificate.DName#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/net/http/SslCertificate.DName#inhmethods)  

# SslCertificate.DName

*** ** * ** ***

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

`
public


class
SslCertificate.DName
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|---------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.net.http.SslCertificate.DName |

<br />

*** ** * ** ***

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)

  ## Summary

  |                                                                                                        ### Public constructors                                                                                                         ||
  |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
  | ` `[DName](https://developer.android.com/reference/android/net/http/SslCertificate.DName#DName(java.lang.String))`(`[String](https://developer.android.com/reference/java/lang/String)` dName) ` Creates a new`DName`from a string. |

  |                                                                                 ### Public methods                                                                                  ||
  |-----------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|
  | ` `[String](https://developer.android.com/reference/java/lang/String) | ` `[getCName](https://developer.android.com/reference/android/net/http/SslCertificate.DName#getCName())`() ` |
  | ` `[String](https://developer.android.com/reference/java/lang/String) | ` `[getDName](https://developer.android.com/reference/android/net/http/SslCertificate.DName#getDName())`() ` |
  | ` `[String](https://developer.android.com/reference/java/lang/String) | ` `[getOName](https://developer.android.com/reference/android/net/http/SslCertificate.DName#getOName())`() ` |
  | ` `[String](https://developer.android.com/reference/java/lang/String) | ` `[getUName](https://developer.android.com/reference/android/net/http/SslCertificate.DName#getUName())`() ` |

  | ### Inherited methods |
  |-----------------------|---|
  | From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

  ## Public constructors

  ### DName

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

  ```
  public DName (String dName)
  ```

  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.

  <br />

  |        Parameters        ||
  |---------|-----------------|
  | `dName` | `String` <br /> |

  ## Public methods

  ### getCName

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

  ```
  public String getCName ()
  ```

  <br />

  <br />

  |                                                               Returns                                                                ||
  |--------------------------------------------------------------------|------------------------------------------------------------------|
  | [String](https://developer.android.com/reference/java/lang/String) | The most specific Common-name (CN) component of this name <br /> |

  ### getDName

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

  ```
  public String getDName ()
  ```

  <br />

  <br />

  |                                                                  Returns                                                                  ||
  |--------------------------------------------------------------------|-----------------------------------------------------------------------|
  | [String](https://developer.android.com/reference/java/lang/String) | The distinguished name (normally includes CN, O, and OU names) <br /> |

  ### getOName

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

  ```
  public String getOName ()
  ```

  <br />

  <br />

  |                                                               Returns                                                                ||
  |--------------------------------------------------------------------|------------------------------------------------------------------|
  | [String](https://developer.android.com/reference/java/lang/String) | The most specific Organization (O) component of this name <br /> |

  ### getUName

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

  ```
  public String getUName ()
  ```

  <br />

  <br />

  |                                                                   Returns                                                                    ||
  |--------------------------------------------------------------------|--------------------------------------------------------------------------|
  | [String](https://developer.android.com/reference/java/lang/String) | The most specific Organizational Unit (OU) component of this name <br /> |