## InfCertificateCredentials InfCertificateCredentials — Reference-counted wrapper for gnutls_certificate_credentials_t |

## Stability Level

Unstable, unless otherwise indicated

## Functions

InfCertificateCredentials * | inf_certificate_credentials_new ()
InfCertificateCredentials * | inf_certificate_credentials_ref ()
void | inf_certificate_credentials_unref ()
gnutls_certificate_credentials_t | inf_certificate_credentials_get ()

## Types and Values

| InfCertificateCredentials

## Object Hierarchy

        GBoxed
        ╰── InfCertificateCredentials

## Includes

    #include <libinfinity/common/inf-certificate-credentials.h>

## Description

This is a thin wrapper class for gnutls_certificate_credentials_t. It provides reference counting and a boxed GType for it.

## Functions

### inf_certificate_credentials_new ()

    InfCertificateCredentials *
    inf_certificate_credentials_new (void);

Creates a new InfCertificateCredentials with an initial reference count of 1. Use `inf_certificate_credentials_get()` to access the underlying gnutls_certificate_credentials_t.

#### Returns

A new InfCertificateCredentials. Free with `inf_certificate_credentials_unref()` when no longer needed.

### inf_certificate_credentials_ref ()

    InfCertificateCredentials *
    inf_certificate_credentials_ref (InfCertificateCredentials *creds);

Increases the reference count of `creds` by 1.

#### Parameters

creds | A InfCertificateCredentials. |

#### Returns

The passed InfCertificateCredentials, `creds` .

### inf_certificate_credentials_unref ()

    void
    inf_certificate_credentials_unref (InfCertificateCredentials *creds);

Decreases the reference count of `creds` by 1. If its reference count reaches 0, then the InfCertificateCredentials will be freed.

#### Parameters

creds | A InfCertificateCredentials. |

### inf_certificate_credentials_get ()

    gnutls_certificate_credentials_t
    inf_certificate_credentials_get (InfCertificateCredentials *creds);

Provides access to the `creds` ' underlying gnutls_certificate_credentials_t.

#### Parameters

creds | A InfCertificateCredentials. |

#### Returns

`creds` ' gnutls_certificate_credentials_t.

## Types and Values

### InfCertificateCredentials

    typedef struct _InfCertificateCredentials InfCertificateCredentials;

InfCertificateCredentials is an opaque data type. You should only access it via the public API functions.