WockyTLSHandler

WockyTLSHandler

Functions

Properties

gboolean ignore-ssl-errors Read / Write / Construct

Types and Values

Object Hierarchy

    GObject
    ╰── WockyTLSHandler

Description

Functions

WockyTLSHandlerVerifyAsyncFunc ()

void
(*WockyTLSHandlerVerifyAsyncFunc) (WockyTLSHandler *self,
                                   WockyTLSSession *tls_session,
                                   const gchar *peername,
                                   GStrv extra_identities,
                                   GAsyncReadyCallback callback,
                                   gpointer user_data);

WockyTLSHandlerVerifyFinishFunc ()

gboolean
(*WockyTLSHandlerVerifyFinishFunc) (WockyTLSHandler *self,
                                    GAsyncResult *res,
                                    GError **error);

wocky_tls_handler_new ()

WockyTLSHandler *
wocky_tls_handler_new (gboolean ignore_ssl_errors);

wocky_tls_handler_verify_async ()

void
wocky_tls_handler_verify_async (WockyTLSHandler *self,
                                WockyTLSSession *tls_session,
                                const gchar *peername,
                                GStrv extra_identities,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

wocky_tls_handler_verify_finish ()

gboolean
wocky_tls_handler_verify_finish (WockyTLSHandler *self,
                                 GAsyncResult *result,
                                 GError **error);

wocky_tls_handler_add_ca ()

gboolean
wocky_tls_handler_add_ca (WockyTLSHandler *self,
                          const gchar *path);

Adds a single CA certificate, or directory full of CA certificates, to the set used to check certificates. By default, Wocky will check the system-wide certificate directory (as determined at compile time), so you need only add additional CA paths if you want to trust additional CAs.

Parameters

self

a WockyTLSHandler instance

 

path

a path to a directory or file containing PEM encoded CA certificates

 

Returns

TRUE if path could be resolved to an absolute path. Note that this does not indicate that there was actually a file or directory there or that any CAs were actually found. The CAs won't actually be loaded until just before the TLS session setup is attempted.


wocky_tls_handler_forget_cas ()

void
wocky_tls_handler_forget_cas (WockyTLSHandler *self);

Removes all known locations for CA certificates, including the system-wide certificate directory and any paths added by previous calls to wocky_tls_handler_add_ca(). This is only useful if you want Wocky to distrust your system CAs for some reason.

Parameters

self

a WockyTLSHandler instance

 

wocky_tls_handler_add_crl ()

gboolean
wocky_tls_handler_add_crl (WockyTLSHandler *self,
                           const gchar *path);

Adds a single certificate revocation list file, or a directory of CRLs, to the set used to check certificates. Unlike for CA certificates, there is typically no good default path, so no CRLs are used by default. The path to use depends on the CRL-management software you use; dirmngr (for example) will cache CRLs in /var/cache/dirmngr/crls.d.

Parameters

self

a WockyTLSHandler instance

 

path

a path to a directory or file containing PEM encoded CRL certificates

 

Returns

TRUE if path could be resolved to an absolute path. Note that this does not indicate that there was actually a file or directory there or that any CRLs were actually found. The CRLs won't actually be loaded until just before the TLS session setup is attempted.


wocky_tls_handler_get_cas ()

GSList *
wocky_tls_handler_get_cas (WockyTLSHandler *self);

Gets the CA certificate search path, including any extra paths added with wocky_tls_handler_add_ca().

Parameters

self

a WockyTLSHandler instance

 

Returns

the paths to search for CA certificates.

[transfer none][element-type utf8]


wocky_tls_handler_get_crl ()

GSList *
wocky_tls_handler_get_crl (WockyTLSHandler *self);

Gets the CRL search path, consisting of all paths added with wocky_tls_handler_add_crl().

Parameters

self

a WockyTLSHandler instance

 

Returns

the CRL search path.

[transfer none][element-type utf8]

Types and Values

struct WockyTLSHandlerClass

struct WockyTLSHandlerClass {
  WockyTLSHandlerVerifyAsyncFunc verify_async_func;
  WockyTLSHandlerVerifyFinishFunc verify_finish_func;
};

The class of a WockyTLSHandler.

Members

WockyTLSHandlerVerifyAsyncFunc verify_async_func;

a function to call to start an asychronous verify operation; see wocky_tls_handler_verify_async() for more details

 

WockyTLSHandlerVerifyFinishFunc verify_finish_func;

a function to call to finish an asychronous verify operation; see wocky_tls_handler_verify_finish() for more details

 

Property Details

The “ignore-ssl-errors” property

  “ignore-ssl-errors”        gboolean

Whether to ignore recoverable SSL errors (certificate insecurity/expiry etc).

Flags: Read / Write / Construct

Default value: FALSE