Gcr.trust_is_certificate_distrusted
Description: Reference for Gcr.trust_is_certificate_distrusted

### Function

# Gcrtrust_is_certificate_distrusted

#### Declaration [src]

    gboolean
    gcr_trust_is_certificate_distrusted (
      unsigned char* serial_nr,
      size_t serial_nr_len,
      unsigned char* issuer,
      size_t issuer_len,
      GCancellable* cancellable,
      GError** error
    )

#### Description [src]

Checks whether the certificate that can be uniquely identified with the given `serial_nr` and `issuer` is marked as distrusted (for example by the user, or because it’s part of a CRL).

Since we can’t directly use `GcrCertificate` to fetch these values, you need to call these with the raw serial number and issuer as provided by the PKCS#11 fields `CKA_SERIAL_NR` and `CKA_ISSUER`.

#### Parameters

`serial_nr`

  Type: An array of `unsigned char`

  The serial number of the certificate.

  The length of the array is specified in the `serial_nr_len` argument.
  The data is owned by the caller of the function.

`serial_nr_len`

  Type: `size_t`

  The nr of bytes in `serial_nr`.

`issuer`

  Type: An array of `unsigned char`

  The raw issuer.

  The length of the array is specified in the `issuer_len` argument.
  The data is owned by the caller of the function.

`issuer_len`

  Type: `size_t`

  The nr of bytes in `issuer`.

`cancellable`

  Type: `GCancellable`

  A `GCancellable` or `NULL`.

  The argument can be `NULL`.
  The data is owned by the caller of the function.

`error`

  Type: `GError **`

  The return location for a recoverable error.

  The argument can be `NULL`.
  If the return location is not `NULL`, then you must initialize it to a `NULL` `GError*`.
  The argument will be left initialized to `NULL` by the function if there are no errors.
  In case of error, the argument will be set to a newly allocated `GError`; the caller will take ownership of the data, and be responsible for freeing it.

#### Return value

Type: `gboolean`

`TRUE` if the certificate is marked as distrusted.