Function

Gcrtrust_is_certificate_pinned

Declaration [src]

gboolean
gcr_trust_is_certificate_pinned (
  GcrCertificate* certificate,
  const gchar* purpose,
  const gchar* peer,
  GCancellable* cancellable,
  GError** error
)

Description [src]

Check if certificate is pinned for purpose to communicate with peer. A pinned certificate overrides all other certificate verification.

This call may block, see gcr_trust_is_certificate_pinned_async() for the non-blocking version.

In the case of an error, FALSE is also returned. Check error to detect if an error occurred.

Parameters

certificate GcrCertificate
 

A GcrCertificate to check.

 The data is owned by the caller of the function.
purpose const gchar*
 

The purpose string.

 The data is owned by the caller of the function.
 The value is a NUL terminated UTF-8 string.
peer const gchar*
 

The peer for this pinned.

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

A GCancellable.

 The argument can be NULL.
 The data is owned by the caller of the function.
error GError **
  The return location for a GError*, or NULL.

Return value

Returns: gboolean
 

TRUE if the certificate is pinned for the host and purpose.