Gcr.Certificate.get_subject_part

### Method

# Gcr Certificateget_subject_part

#### Declaration [src]

    gchar*
    gcr_certificate_get_subject_part (
      GcrCertificate* self,
      const gchar* part
    )

#### Description [src]

Get a part of the DN of the subject of this certificate.

Examples of a `part` might be the ‘OU’ (organizational unit) or the ‘CN’ (common name). Only the value of that part of the DN is returned.

The string returned should be freed by the caller when no longer required.

#### Parameters

`part`

  Type: `const gchar*`

  A DN type string or OID.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

#### Return value

Type: `gchar*`

The allocated part of the subject DN, or `NULL` if no such part is present.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The return value can be `NULL`.
The value is a NUL terminated UTF-8 string.