since: 2.66


g_tls_connection_get_channel_binding_data (
  GTlsConnection* conn,
  GTlsChannelBindingType type,
  GByteArray* data,
  GError** error


Query the TLS backend for TLS channel binding data of type for conn.

This call retrieves TLS channel binding data as specified in RFC 5056, RFC 5929, and related RFCs. The binding data is returned in data. The data is resized by the callee using GByteArray buffer management and will be freed when the data is destroyed by g_byte_array_unref(). If data is NULL, it will only check whether TLS backend is able to fetch the data (e.g. whether type is supported by the TLS backend). It does not guarantee that the data will be available though. That could happen if TLS connection does not support type or the binding data is not available yet due to additional negotiation or input required.

Available since: 2.66



Type: GTlsChannelBindingType

GTlsChannelBindingType type of data to fetch.


Type: An array of guint8

GByteArray is filled with the binding data, or NULL.

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

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 left initialized to NULL by the method 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 on success, FALSE otherwise.