Gcr.CertificateRequest.encode

### Method

# Gcr CertificateRequestencode

#### Declaration [src]

    guchar*
    gcr_certificate_request_encode (
      GcrCertificateRequest* self,
      gboolean textual,
      gsize* length
    )

#### Description [src]

Encode the certificate request. It must have been completed with `gcr_certificate_request_complete()` or `gcr_certificate_request_complete_async()`.

If `textual` is `FALSE`, the output is a DER encoded certificate request.

If `textual` is `TRUE`, the output is encoded as text. For PKCS#10 requests this is done using the OpenSSL style PEM encoding.

#### Parameters

`textual` | `gboolean`
| Whether to encode output as text.
`length` | `gsize*`
| Location to place length of returned data.
| The argument will be set by the function.

#### Return value

Returns: | An array of `guchar`
| The encoded certificate request.
| The length of the array is in the `length` argument.
| The caller of the method takes ownership of the data, and is responsible for freeing it.